AdaShoelace / hadlock

X window manager
MIT License
156 stars 9 forks source link

Avoid zombie child processes #17

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hadlock spawns children without taking care of SIGCHLD, which leads to zombies. We can either wait()/waitpid() or let the kernel know that we don't care by ignoring SIGCHLD.

The solution uses nix::sys::signal unconditionally, since Hadlock is an X11 wm, and it's reasonable to assume a suitable nix::sys environment.

AdaShoelace commented 5 years ago

Very reasonable change! Thanks for catching that Hadlock might produce zombies.

Just make the changes I commented above and I'll merge it in.

Thanks!