X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fguestfsd.c;h=ac8750c1e96b984843cfc6d81bd5d0420e21bda7;hb=4de124debf181ff6af38617b80c2355627e38d35;hp=b3154a6067232cca1cf2ad6a32f1205d328a4cd2;hpb=91324e0a732fe592f2eecd5b541c731bf4f34b74;p=libguestfs.git diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index b3154a6..ac8750c 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -130,7 +130,7 @@ main (int argc, char *argv[]) int c; char *cmdline; - chdir ("/"); + ignore_value (chdir ("/")); if (winsock_init () == -1) error (EXIT_FAILURE, 0, "winsock initialization failed"); @@ -679,6 +679,8 @@ commandrvf (char **stdoutput, char **stderror, int flags, } if (pid == 0) { /* Child process running the command. */ + signal (SIGALRM, SIG_DFL); + signal (SIGPIPE, SIG_DFL); close (0); if (flag_copy_stdin) { dup2 (stdin_fd[0], 0); @@ -767,9 +769,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);