diff --git a/main.c b/main.c index 7926161..f53cc9d 100644 --- a/main.c +++ b/main.c @@ -145,7 +145,10 @@ int main() } } else //pid > 0 father + { + pidOfChild = pid; waitpid(pid,&status,0); + } free(path); free(exe);