Re: [Libguestfs] [PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.

2016-04-14 Thread Eric Blake
On 04/14/2016 11:26 AM, Richard W.M. Jones wrote: > Thanks: Eric Blake. > --- > src/Makefile.am| 1 + > src/command.c | 7 ++ > src/guestfs-internal.h | 4 +++ > src/launch-direct.c| 11 +++-- > src/launch-uml.c | 11 +++-- > src/umask.c| 10 ++

[Libguestfs] [PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.

2016-04-14 Thread Richard W.M. Jones
As Eric Blake noted in: https://www.redhat.com/archives/libguestfs/2016-April/msg00154.html libguestfs doesn't correctly handle the case where waitpid receives a SIGCHLD signal and the main program has registered a non-restartable signal handler. In this case waitpid would return -EINTR and we wou

[Libguestfs] [PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.

2016-04-14 Thread Richard W.M. Jones
Thanks: Eric Blake. --- src/Makefile.am| 1 + src/command.c | 7 ++ src/guestfs-internal.h | 4 +++ src/launch-direct.c| 11 +++-- src/launch-uml.c | 11 +++-- src/umask.c| 10 ++-- src/wait.c | 67 ++