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
@@ -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 "buffer.h" #include "xmalloc.h" @@ -176,8 +176,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)) |