To: | "" <> |
---|---|
Subject: | [ts-7000] 72xx + stderr + apache = zombie |
From: | David Nahman <> |
Date: | Sat, 17 Dec 2011 09:25:07 -0800 (PST) |
Hi, I have an application that I run on a
TS7260 that I'd like to be able to start and stop via calling a URL on
the 7260's webserver. The application and its
libraries write to stderr and stdout. When I launch the it from
/etc/init.d during bootup, I background it and redirect stdout and
stderr to syslog fromt the init bash script. $PGMPATH/$PGM 2>&1 | logger & That
all works perfectly. But if I call this same script from cgi-bin via
apache (parsing QUERY_STRING for the start/stop arguments instead), the
program launches in the background properly. The bash/cgi-script
executes completely (I print out a "DONE" message at the end), but the
script remains behind as a zombie process.
Apache also keeps that process alive --
firefox never shows the connection as completed, and the apache log
never records the GET in the syslog -- until I kill the backgrounded
daemon. I rebuilt my program as a true daemon
that forks/detaches and closes stderr/stdout, and the cgi-bin program
executes and exits properly -- I verified that it is the open file
handles to stderr/stdout that triggers the zombie problem in apache. So two questions: 1) Why does running the startup script from /etc/init.d not care about open file handles, but apache cgi-bin does? 2) Without
rebuilding all of my libraries to talk to syslog directly rather than
stderr/stdout, is there way to launch an application, background it and
redirect stderr/out to logger, minus the
zombies? Thanks! David__._,_.___
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe __,_._,___ |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: [ts-7000] setting IP ts7200, Alex McLain |
---|---|
Next by Date: | Re: [ts-7000] Confused by resolver, Craig Gates |
Previous by Thread: | [ts-7000] setting IP ts7200, Marcos |
Next by Thread: | [ts-7000] TS-SER4 Crystal Oscillator, ronmuzzi |
Indexes: | [Date] [Thread] [Top] [All Lists] |
Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU