]> git.itanic.dy.fi Git - rrdd/commit
process: Improve harvest_zombies
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 15 May 2012 19:07:18 +0000 (22:07 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Tue, 15 May 2012 19:07:21 +0000 (22:07 +0300)
commit67d811389d984b08c49b5715de1f92ff73c1a41e
treeb543c757f83ecb1cb4eedb62a9059b454fa63b5d
parent3e33fcfe26d0b6c68db0af99015f22b908fde9b7
process: Improve harvest_zombies

Use wait4 instead of waitpid. This makes it possible to get resource
usage information from the child that exited. The user and system time
is printed out for curious developer to inspect.

If a child happens to be stopped or continued, we are now ignoring
those state changes. This prevents zombie processes to be left in case
something special happens to the child.

Further improvement is that it is possible to tell whether the child
was killed with some signal or if it exited with a code.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
process.c