[busybox][patch] httpd.c - CGI scripts can't fork
Vladimir N. Oleynik
dzo at simtreas.ru
Wed May 19 10:49:47 UTC 2004
Jon,
> Because of the signal(SIGCHLD, SIG_IGN) in openServer() the forked CGI
> process is unable to catch SIGCHLD and reap it's own children
But why?
1) If your CGI set signal(SIGCHLD, sigchld_catcher) you can
control SIGCHLD.
2) If not setted sigcatcher, your wait*() work also correct, but
if you forget call wait*(), your child status ignored and zombies
killed automaticaly.
> I don't believe the waitpid() in sendCgi() ever gets called though...
Why?
> Perhaps it would be better to add the signal(SIGCHLD, SIG_DFL); just
> before the fork() in sendCgi()?
I don`t know, why signal(SIGCHLD, SIG_DFL) setted from openserver()
by original author.
May be for protect certain EINTR?
--w
vodz
More information about the busybox
mailing list