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 /monitor.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 'monitor.c')
-rw-r--r-- | monitor.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor.c,v 1.8 2002/03/27 17:45:42 mouring Exp $"); | 28 | RCSID("$OpenBSD: monitor.c,v 1.9 2002/03/30 18:51:15 markus Exp $"); |
29 | 29 | ||
30 | #include <openssl/dh.h> | 30 | #include <openssl/dh.h> |
31 | 31 | ||
@@ -1211,8 +1211,9 @@ mm_answer_term(int socket, Buffer *req) | |||
1211 | /* The child is terminating */ | 1211 | /* The child is terminating */ |
1212 | session_destroy_all(&mm_session_close); | 1212 | session_destroy_all(&mm_session_close); |
1213 | 1213 | ||
1214 | if (waitpid(monitor->m_pid, &status, 0) == -1) | 1214 | while (waitpid(monitor->m_pid, &status, 0) == -1) |
1215 | exit(1); | 1215 | if (errno != EINTR) |
1216 | exit(1); | ||
1216 | 1217 | ||
1217 | res = WIFEXITED(status) ? WEXITSTATUS(status) : 1; | 1218 | res = WIFEXITED(status) ? WEXITSTATUS(status) : 1; |
1218 | 1219 | ||