Closed aosync closed 3 years ago
Given the usage of wait4() it would be more appropriate to use wait3() in your given solution. Neither wait3() nor wait4() will be used, because they are both non-standard. waitpid() is a better solution.
That being said, I'll implement reaping later today.
Is there any update on this?
@dilyn-corner Yes, this was done quite some time ago, I just never pushed it. I'll push it as soon as I can.
The solution to this is handling SIGCHLD then use
wait4((pid_t) -1, NULL, WNOHANG, NULL);
to reap any orphaned process when one gets killed.