diff options
author | 2002-03-30 18:51:15 +0000 | |
---|---|---|
committer | 2002-03-30 18:51:15 +0000 | |
commit | d16f19a93e36c7bfdc110ac4610d165f1a74de66 (patch) | |
tree | 0fd94b045ace9ce27a3a8f09d8f8fe82b4a33bcf /usr.bin/ssh/sftp-int.c | |
parent | implement WEP in wi_do_hostencrypt() (diff) | |
download | wireguard-openbsd-d16f19a93e36c7bfdc110ac4610d165f1a74de66.tar.xz wireguard-openbsd-d16f19a93e36c7bfdc110ac4610d165f1a74de66.zip |
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)) |