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-11 11:07:37 +0100 |
commit | 2e4669d6e7053b0347b265d4f330e8873525bd3e (patch) | |
tree | e4c1871fa83c4ce1946e58c0eb940d821ed262bf | |
parent | f6c8665a72c3ecadf0b24029f7c6840aafd33c81 (diff) | |
download | libguestfs-2e4669d6e7053b0347b265d4f330e8873525bd3e.tar.gz libguestfs-2e4669d6e7053b0347b265d4f330e8873525bd3e.tar.xz libguestfs-2e4669d6e7053b0347b265d4f330e8873525bd3e.zip |
daemon: When running commands, restart select if we receive a signal.
(cherry picked from commit 6e5f64089631622167e60df25ee009ef83df5170)
-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 977f170c..e18ab311 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -783,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); |