diff options
author | toni <matzeton@googlemail.com> | 2016-07-03 17:41:09 +0200 |
---|---|---|
committer | toni <matzeton@googlemail.com> | 2016-07-03 17:41:09 +0200 |
commit | 3ddc8f8a7531208ffd867489c34f4c74e1acd667 (patch) | |
tree | b65f0e7d3001888675ef69fef4eb4563af70bae4 | |
parent | 0b20f315b07be0ae178d859c98576ae34330ff54 (diff) |
wait(...) bug fixed
-rw-r--r-- | src/main.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -174,11 +174,8 @@ main(int argc, char **argv) break; } } - waitpid(child, &c_status, WNOHANG); - if ( WIFEXITED(c_status) == 0 ) { - logs("%s\n", "waiting for child"); - wait(&c_status); - } + logs("%s\n", "waiting for child"); + wait(&child); memset(pbuf, '\0', IPC_MQSIZ+1); } else { /* fork error */ |