Re: Exit signal received with output pending

Thierry Bousch (bousch%linotte.uucp@topo.math.u-psud.fr)
Sun, 10 Mar 1996 12:45:06 +0100 (MET)


David Fox writes:

> The program below demonstrates what I believe is a Linux bug. It
> starts a child process and starts reading the child's standard output.
> It exits when it receives a SIGCHLD signal indicating that the child
> has exited. It seems to me that this signal should not be received
> until end of file is received on the child's standard output.

This is not a bug. When the parent receives SIGCHLD, the child has
exited and has written all its output on stdout. On the other hand, the
pipe connecting the parent and the child may still contain data. AFAIK
this is standard Unix behaviour.

Thierry.