On Thu, 30 Jan 2020, Marc Espie wrote:
> So, basically, if we start arbitrary commands, then
> the classic loop
> /* Wait for the child to exit. */
> while (waitpid(cpid, &status, 0) == -1 && errno == EINTR)
> continue;
>
> is not quite enough.
>
> See the small note in manpag
So, basically, if we start arbitrary commands, then
the classic loop
/* Wait for the child to exit. */
while (waitpid(cpid, &status, 0) == -1 && errno == EINTR)
continue;
is not quite enough.
See the small note in manpages (not only us, but everyone):
WIFSTOPPED(status