X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fguestfsd.c;h=e18ab311c5d5bad4dc253a1aef8daae89658f18b;hb=6cdd349e6964636c2b7ae71453dca33716dda486;hp=6a9b60d95c4d564239fc3eb18e719f1717f0e652;hpb=2b2651a6907e1d7c56b7839594fb6ab8ec5ffd89;p=libguestfs.git diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 6a9b60d..e18ab31 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -694,6 +694,7 @@ commandrvf (char **stdoutput, char **stderror, int flags, } if (pid == 0) { /* Child process running the command. */ + signal (SIGPIPE, SIG_DFL); close (0); if (flag_copy_stdin) { dup2 (stdin_fd[0], 0); @@ -782,9 +783,13 @@ commandrvf (char **stdoutput, char **stderror, int flags, quit = 0; while (quit < 2) { + again: rset2 = rset; r = select (MAX (so_fd[0], se_fd[0]) + 1, &rset2, NULL, NULL, NULL); if (r == -1) { + if (errno == EINTR) + goto again; + perror ("select"); quit: if (stdoutput) free (*stdoutput);