nbd-client: do not leave child processes in the zombie state
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 15 Jun 2012 23:43:23 +0000 (03:43 +0400)
committerWouter Verhelst <w@uter.be>
Thu, 21 Jun 2012 19:53:06 +0000 (21:53 +0200)
commit731fab3529aedcc7ca1b26c0a87b1f1dc51f7935
tree24beb7adb56837f214ea55be6df84c17095e4b55
parent847b8445edc14988fb8e44de10de03d6ba01123e
nbd-client: do not leave child processes in the zombie state

Change SIGCHLD handler to SIG_DFL with SA_NOCLDWAIT flag set, to avoid
transforming child processes into zombies when they terminate.  Since
the main process is inevitably blocked in NBD_DO_IT ioctl at the time
when child processes terminate, this is the simplest way to get rid of
zombie processes.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Wouter Verhelst <w@uter.be>
nbd-client.c