]> git.ipfire.org Git - thirdparty/git.git/commit - daemon.c
git-daemon: Simplify dead-children reaping logic
authorStephen R. van den Berg <srb@cuci.nl>
Thu, 14 Aug 2008 18:02:20 +0000 (20:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Aug 2008 00:43:53 +0000 (17:43 -0700)
commit695605b5080e1957bd9dab1fed35a7fee9814297
tree431e52d4942526f47a76a02237ceadff2a6b2932
parent6a992e9e1da08af3e36ab90d5f5b7ee8077630ce
git-daemon: Simplify dead-children reaping logic

Move almost all code out of the child_handler() into check_dead_children().
The fact that systemcalls get interrupted by signals allows us to
make the SIGCHLD signal handler almost a no-op by simply running
check_dead_children() right before waiting on poll().

In case some systems do not interrupt systemcalls upon signal receipt,
all zombies will eventually be collected before the next poll() cycle.

Signed-off-by: Stephen R. van den Berg <srb@cuci.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon.c