Systemd/src/activate
Evgeny Vereshchagin 5488e52d28 activate: improve SIGCHLD handler
* Don't lose children exit codes

* Don't receive notification when child processes stop
Eliminates annoying "Child died"-messages:
$ ./systemd-socket-activate -l 2000 --inetd -a cat
^Z
[1]+  Stopped                 ./systemd-socket-activate -l 2000 --inetd -a cat

$ bg %1
[1]+ ./systemd-socket-activate -l 2000 --inetd -a cat &
Child 15657 died with code 20

$ ps u 15657
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
ubuntu   15657  0.0  0.0   4540   680 pts/2    S    00:34   0:00 cat

* Don't fail to reap some zombie children
Fixes
$ ./systemd-socket-activate -l 2000 --inetd -a cat &
$ for i in {1..1000}; do echo a | nc localhost 2000 & done
$ ps f
...
18235 pts/2    Ss     0:01 -bash
15849 pts/2    S      0:00  \_ ./systemd-socket-activate -l 2000 --inetd
-a cat
16081 pts/2    Z      0:00  |   \_ [cat] <defunct>
16381 pts/2    Z      0:00  |   \_ [cat] <defunct>
and many more zombies
...
2016-04-05 14:34:04 +00:00
..
Makefile build-sys: add Makefile symlink for src/activate/ 2013-11-07 03:09:59 +01:00
activate.c activate: improve SIGCHLD handler 2016-04-05 14:34:04 +00:00