From 47fd8112b5ad0e83d895e5be9342b70832ea3075 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Tue, 2 Apr 2002 20:48:19 +0000 Subject: - 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 --- sftp-int.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sftp-int.c') 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 @@ /* 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)) -- cgit v1.2.3