diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-30 18:51:16 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-03-30 18:51:16 +0000 |
commit | 035d83f1ea3272b966e18af74bfbbc6db998794e (patch) | |
tree | 6070bd83d5fca33ed7dfddddd0b9a353cfe41a97 /usr.bin/ssh/sftp-int.c | |
parent | bd9101d48251cf6d83985ffb983174516431cf09 (diff) |
check waitpid for EINTR; based on patch from peter@ifm.liu.se
Diffstat (limited to 'usr.bin/ssh/sftp-int.c')
-rw-r--r-- | usr.bin/ssh/sftp-int.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c index 9f22ed0454e..d4331419c9d 100644 --- a/usr.bin/ssh/sftp-int.c +++ b/usr.bin/ssh/sftp-int.c @@ -26,7 +26,7 @@ /* XXX: recursive operations */ #include "includes.h" -RCSID("$OpenBSD: sftp-int.c,v 1.45 2002/03/19 06:32:56 mpech Exp $"); +RCSID("$OpenBSD: sftp-int.c,v 1.46 2002/03/30 18:51:15 markus Exp $"); #include <glob.h> @@ -178,8 +178,9 @@ local_do_shell(const char *args) strerror(errno)); _exit(1); } - if (waitpid(pid, &status, 0) == -1) - fatal("Couldn't wait for child: %s", strerror(errno)); + while (waitpid(pid, &status, 0) == -1) + if (errno != EINTR) + fatal("Couldn't wait for child: %s", strerror(errno)); if (!WIFEXITED(status)) error("Shell exited abormally"); else if (WEXITSTATUS(status)) |