Sweets / hummingbird

Hummingbird init system for Linux based operating systems.
MIT License
247 stars 7 forks source link

Hummingbird probably doesn't reap zombies (dead orphaned processes) #14

Closed aosync closed 3 years ago

aosync commented 3 years ago

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.

Sweets commented 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.

dilyn-corner commented 3 years ago

Is there any update on this?

Sweets commented 3 years ago

@dilyn-corner Yes, this was done quite some time ago, I just never pushed it. I'll push it as soon as I can.