Skip to content

Commit e28fa91

Browse files
committed
reap children properly
1 parent 1731310 commit e28fa91

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

echosrv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ void tcp_echo(struct listen_endpoint* listen_socket)
112112
exit(0);
113113
}
114114
close(in_socket);
115+
waitpid(-1, NULL, WNOHANG);
115116
}
116117
}
117118

0 commit comments

Comments
 (0)