diff options
author | Willy Tarreau <w@1wt.eu> | 2006-07-16 14:53:23 +0200 |
---|---|---|
committer | Willy Tarreau <willy@wtap.(none)> | 2006-07-26 11:51:23 +0200 |
commit | f179c4f810adddd808eddf0312cdb08673824ac2 (patch) | |
tree | f96b4c5521a74a06a41e07a2c1624402e555e337 /init/init.c | |
parent | [RELEASE] flxutils-0.1.11.3 (diff) | |
download | flxutils-f179c4f810adddd808eddf0312cdb08673824ac2.tar.xz |
[RELEASE] flxutils-0.1.12v0.1.12
Diffstat (limited to 'init/init.c')
-rw-r--r-- | init/init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c index b73234e..d8d1906 100644 --- a/init/init.c +++ b/init/init.c @@ -1528,11 +1528,12 @@ int main(int argc, char **argv, char **envp) { return 1; } else if (res > 0) { + int ret; print("<E>xec(parent) : waiting for termination\n"); - while (wait(&error) != res) + while (((ret = wait(&error)) != -1) && (ret != res)) print("<E>xec(parent) : signal received\n"); - error = (WIFEXITED(error) > 0) ? WEXITSTATUS(error) : 1; + error = (ret == -1) || ((WIFEXITED(error) > 0) ? WEXITSTATUS(error) : 1); print("<E>xec(parent) : child exited\n"); } else { |