Re: [dev] [st] [PATCH] Fix sigchld

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Mon, 27 Apr 2015 10:42:05 +0200

Hi,

> Only wait for termination of the shell.
...
> - if(waitpid(pid, &stat, 0) < 0)
> + if((p = waitpid(pid, &stat, WNOHANG)) < 0)
> die("Waiting for pid %hd failed: %s\n", pid, strerror(errno));


I don't understand this patch. The master process only has one child,
the shell, so you only can wait for it. If you receives the signal is
because the child already died, so I don't see the point of adding
WNOHANG. Can you explain a bit better what you want to do?

Regards,
Received on Mon Apr 27 2015 - 10:42:05 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 27 2015 - 10:48:13 CEST