diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-04-02 20:48:19 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-04-02 20:48:19 +0000 |
commit | 47fd8112b5ad0e83d895e5be9342b70832ea3075 (patch) | |
tree | 8a72a7bd0295430d833bd1b6469dfabd5616dc6a /sftp-int.c | |
parent | 03f3932829d5246d41c26b3d9f9482c618356430 (diff) |
- markus@cvs.openbsd.org 2002/03/30 18:51:15
[monitor.c serverloop.c sftp-int.c sftp.c sshd.c]
check waitpid for EINTR; based on patch from peter@ifm.liu.se
Diffstat (limited to 'sftp-int.c')
-rw-r--r-- | sftp-int.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sftp-int.c b/sftp-int.c index 46cbd4a12..5b1d3848e 100644 --- a/sftp-int.c +++ b/sftp-int.c | |||
@@ -26,7 +26,7 @@ | |||
26 | /* XXX: recursive operations */ | 26 | /* XXX: recursive operations */ |
27 | 27 | ||
28 | #include "includes.h" | 28 | #include "includes.h" |
29 | RCSID("$OpenBSD: sftp-int.c,v 1.45 2002/03/19 06:32:56 mpech Exp $"); | 29 | RCSID("$OpenBSD: sftp-int.c,v 1.46 2002/03/30 18:51:15 markus Exp $"); |
30 | 30 | ||
31 | #include "buffer.h" | 31 | #include "buffer.h" |
32 | #include "xmalloc.h" | 32 | #include "xmalloc.h" |
@@ -176,8 +176,9 @@ local_do_shell(const char *args) | |||
176 | strerror(errno)); | 176 | strerror(errno)); |
177 | _exit(1); | 177 | _exit(1); |
178 | } | 178 | } |
179 | if (waitpid(pid, &status, 0) == -1) | 179 | while (waitpid(pid, &status, 0) == -1) |
180 | fatal("Couldn't wait for child: %s", strerror(errno)); | 180 | if (errno != EINTR) |
181 | fatal("Couldn't wait for child: %s", strerror(errno)); | ||
181 | if (!WIFEXITED(status)) | 182 | if (!WIFEXITED(status)) |
182 | error("Shell exited abormally"); | 183 | error("Shell exited abormally"); |
183 | else if (WEXITSTATUS(status)) | 184 | else if (WEXITSTATUS(status)) |