diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-04-01 15:27:46 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-04-01 16:05:30 +0100 |
commit | 6e5f64089631622167e60df25ee009ef83df5170 (patch) | |
tree | c5112e59514b0903d767fb8382ed569db536487b /daemon | |
parent | 42938f6faf9e724130be28f8e67d3c291bb81cba (diff) | |
download | libguestfs-6e5f64089631622167e60df25ee009ef83df5170.tar.gz libguestfs-6e5f64089631622167e60df25ee009ef83df5170.tar.xz libguestfs-6e5f64089631622167e60df25ee009ef83df5170.zip |
daemon: When running commands, restart select if we receive a signal.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/guestfsd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 36328893..1c695eb6 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -768,9 +768,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); |