- 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
diff --git a/sftp.c b/sftp.c
index f576ed3..e408654 100644
--- a/sftp.c
+++ b/sftp.c
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 
-RCSID("$OpenBSD: sftp.c,v 1.27 2002/03/19 10:49:35 markus Exp $");
+RCSID("$OpenBSD: sftp.c,v 1.28 2002/03/30 18:51:15 markus Exp $");
 
 /* XXX: short-form remote directory listings (like 'ls -C') */
 
@@ -246,8 +246,10 @@
 	if (infile != stdin)
 		fclose(infile);
 
-	if (waitpid(sshpid, NULL, 0) == -1)
-		fatal("Couldn't wait for ssh process: %s", strerror(errno));
+	while (waitpid(sshpid, NULL, 0) == -1)
+		if (errno != EINTR)
+			fatal("Couldn't wait for ssh process: %s",
+			    strerror(errno));
 
 	exit(0);
 }