SYSTEM command
Fairlight
fairlite at fairlite.com
Sat Nov 20 10:45:48 PST 2004
Confusious (Kenneth Brody) say:
> Fairlight wrote:
> >
> > You'll never BELIEVE what Kenneth Brody said here...:
> > > >
> > > > Yes, but you will then need to make sure you exit from
> > > > the loop, otherwise you will have a zombie on your
> > > > hands :-)
> > >
> > > The loop will exit when the read fails, which will happen when filePro
> > > closes the pipe to it.
> >
> > You'll possibly still end up with a zombie. A client of mine once
> > -insisted- that having one rclerk continuously running to handle CGI
> > requests and then forking off other rclerk processes to handle the details
> > was a good model. His process tables got filled with zombies from this
> > model. AFAICT, fP doesn't wait on SIGCHLD, and you'll have a zombie until
> > the clerk or report process itself goes away and takes its children with
> > it for good.
>
> A zombie is created when a process dies and its parent doesn't wait for it.
> Don't die until filePro tells you to, and you won't have zombies.
Ken, that has to be the silliest statement I've ever seen you make. What
we should just leave useless processes sleeping? This statement of yours
sounds tantamount to, "We didn't feel like coding a < 5 line signal
handler, so Don't Do That." That doesn't cut it, sorry.
The entire point of discussing the proposed model's capacity for generating
zombies is to warn people that they could quickly fill their process ID
table if they're not careful in how they code it under the current
implementation.
The main thrust of this post is that the application should never allow
this to happen in the first place. There shouldn't -be- a need to worry
about it at all. It's a 4GL, right? The user shouldn't have to worry
about this kind of easily preventable "gotcha".
Seriously, how hard is it to honour SIGCHLD and reap your dead children?
Heck, I can do (and have done) it in perl. This really wants fixing for
a future version of fP. The current deployment just isn't robust. All
you have to do is set a signal handler for SIGCHLD, and do a non-blocking
waitpid() in there to free up the resources. Not terribly difficult for
someone of even moderate skill, much less your extensive skill.
mark->
--
Bring the web-enabling power of OneGate to -your- filePro applications today!
Try the live filePro-based, OneGate-enabled demo at the following URL:
http://www2.onnik.com/~fairlite/flfssindex.html
More information about the Filepro-list
mailing list