Rewrite signals management to more up to date API.
Also implement support for zombies. This will prevent daemon from leaking child processes.