Displaying 3 results from an estimated 3 matches for "guestfs_int_waitpid".
2016 Apr 14
0
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
...#include <sys/stat.h>
-#include <sys/wait.h>
#include <sys/select.h>
#ifdef HAVE_SYS_TIME_H
@@ -692,10 +691,8 @@ wait_command (struct command *cmd)
{
int status;
- if (waitpid (cmd->pid, &status, 0) == -1) {
- perrorf (cmd->g, "waitpid");
+ if (guestfs_int_waitpid (cmd->g, cmd->pid, &status, "command") == -1)
return -1;
- }
cmd->pid = 0;
@@ -902,7 +899,7 @@ guestfs_int_cmd_close (struct command *cmd)
free (cmd->outbuf.buffer);
if (cmd->pid > 0)
- waitpid (cmd->pid, NULL, 0);
+ guestfs_int_waitpid_...
2016 Apr 14
2
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
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 would print an error,
but actually we should retry this case.
This adds two new internal functions,
2016 May 18
3
[PATCH v2 0/2] src: introduce an helper version struct
Hi,
this adds an helper version struct, and uses it in the backends (for the
libvirt and qemu versions) and inspection code. This also moves common
code to that, so it is not repeated in many places.
This should help with the small refactoring proposed with
https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html
Thanks,
Pino Toscano (2):
src: start unifying version handling