feat: add forking per-file processing in C version and enable parallel flag in Rust benchmark

Add fork() call in retoor_c/isspam.c main loop to spawn child process for each input file, allowing parallel analysis. Update bench.py to pass -p flag to Rust binary risspam for enabling parallel execution mode. Rebuild isspam binary to reflect the C source changes.
This commit is contained in:
2024-12-01 21:32:23 +00:00
parent a5fb2b9c3c
commit 6ce4c8b9cd
3 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -313,12 +313,14 @@ int main(int argc, char *argv[]) {
if (argc > 1) {
for (int i = 1; i < argc; i++) {
pid_t pid = fork();
if(!pid){
printf("File: %s\n", argv[i]);
analyze_file(argv[i]);
printf("\n");
return 0;
}
}
return 0;