SYSTEM command
Brian K. White
brian at aljex.com
Sat Nov 20 00:48:21 PST 2004
----- Original Message -----
From: "Fairlight" <fairlite at fairlite.com>
To: "Filepro List" <filepro-list at seaslug.org>
Sent: Friday, November 19, 2004 7:14 PM
Subject: Re: SYSTEM command
> 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.
Concur.
I have many many cases where the clerk session runs all day long.
The only way to keep the zombies from filling up the process stack and
making it so that the os can't even foprk new processes, is to make any
user() utilities loop as per Ken's example, and in your processing you never
close the user command, so the same process gets re-used. It's OK if the
user command gets hit by processing more than once, fp will not open more
and more copies, but if you try to have a gosub that does
open-use-close-return, you get zombies that live and accumulate as long as
the clerk lives. if the gosub just does open-use-return, then the process
gets created once, only gets created if necessary, gets re-used all day
long, goes away when clerk does, does not load the system while not being
used.
I had this problem all over the place and Ken showed me the light a few
months ago (here actually) about not needing to close the user alias. I had
tried all kinds of things to get the zombies to go away, I had the script
written as a loop and I even tried having the script test for a special exit
command so that from processing I could tell the script to exit, then close
the alias... all futil efforts.
I removed all the closes, the gosubs in question get fired off a lot by each
user on each screen, the clerk sessions live for several hours, and I don't
have a zombie or headless process anywhere, and girls started looking at me
more...
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
More information about the Filepro-list
mailing list