I am using the signalfd() function in non-blocking mode and the close on exec() feature also turned on:
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGCHLD);
f_socket = signalfd(-1, &set, SFD_NONBLOCK | SFD_CLOEXEC);
Then I listen for signals using the poll() command.
Is it at all possible, when using that mechanism, to miss a SIGCHLD signal?
I have a server that has been running for nearly 3 weeks and it has one zombie. The only way I can think of for such to happen is that a child process died and somehow the parent did not receive the signal. Each time I access the server, it generally creates many children (the minimum is around 10 and I think the maximum is around 30) all of which get caught. So I am not too sure why just one would somehow disappear.
Aucun commentaire:
Enregistrer un commentaire