Date: Sun, 24 Nov 2002 01:46:48 -0500 From: Lee Nelson <jld123@pobox.com> To: freebsd-questions@freebsd.org Subject: Apache not killing subprocesses, only on FreeBSD Message-ID: <DAPNWVLH3Y2YJH5YPXHB4XZWECQKHB.3de075d8@lee>
next in thread | raw e-mail | index | archive | help
Hello,
I run an database backed website on FreeBSD 4.5 that
uses mod_perl. I do things like:
open SORTER, "|/some/path/to/myprogram.pl";
system ("/usr/bin/zip zipfile.zip somefile");
When I switched to FreeBSD from Linux, I noticed that
a lot of dead shells accumulated in the process list -
sometimes hundreds. When I restart Apache they all
go away.
Linux didn't exhibit this behaviour. Can anyone tell
me what I'm doing wrong? It's embarrassing to have to
restart apache every few weeks. :-)
The programs that are started all terminate normally,
but the shell sticks around forever.
The ps -aux looks like this:
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
...
nobody 2196 0.0 0.0 0 0 ?? Z Thu11AM 0:00.00 (sh)
...
myprogram.pl reads a few parameters from STDIN, and then
forks to work in the background:
my $pid = fork;
exit if $pid;
die ("$pn couldn't fork $!\n") unless defined $pid;
POSIX::setsid()
or die ("$pn can't start a new session: $!\n");
Any clues or suggestions welcome.
Thanks,
Lee Nelson
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DAPNWVLH3Y2YJH5YPXHB4XZWECQKHB.3de075d8>
