Skip to content

Commit ea19d56

Browse files
committed
gestion zombis done
1 parent 304e17f commit ea19d56

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/shell.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@
1515
#include "csapp.h"
1616

1717

18+
void handler(int sig){
19+
while(waitpid(-1, NULL, WNOHANG|WUNTRACED) > 0){}
20+
}
21+
1822

1923
int main()
2024
{
25+
Signal(SIGCHLD,handler);
2126
while (1) {
2227
struct cmdline *l;
2328
int i;

0 commit comments

Comments
 (0)