diff --git a/bench.py b/bench.py index 0e93ff0..9aa7eb2 100644 --- a/bench.py +++ b/bench.py @@ -6,6 +6,6 @@ time_start = time.time() subprocess.check_output('./isspam books/*.txt', shell=True) print("Time C:",time.time() - time_start) time_start = time.time() -subprocess.check_output('./risspam books/*.txt', shell=True) +subprocess.check_output('./risspam -p books/*.txt', shell=True) print("Time Rust:",time.time() - time_start) print("***end benchmark***") diff --git a/isspam b/isspam index adb20b9..2674267 100755 Binary files a/isspam and b/isspam differ diff --git a/retoor_c/isspam.c b/retoor_c/isspam.c index 97584fa..ee5d288 100644 --- a/retoor_c/isspam.c +++ b/retoor_c/isspam.c @@ -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;