By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

CGI zombies with Apache 1.3 on Linux

P: n/a
I've Googled extensively, but can't figure out what might be causing my
Python CGI app to zombie (yes, Tibia, the one I just announced ;). The
cgi bit looks like this:
def cgi_handler():
import cgi

form = cgi.FieldStorage(keep_blank_values=True)
params = dict([(key, form[key].value) for key in form])

env = os.environ.get
filename = env('PATH_TRANSLATED') or env('SCRIPT_FILENAME')
username = env('AUTH_USER') or env('REMOTE_USER') or
env('LOGON_USER')
app = TibiaApp(params, filename, username)
print "Content-type: %s\n" % app.content_type
print "".join(app.output)
if __name__ == '__main__':
cgi_handler()

Should I be explicitly closing stdout at the end of cgi_handler()? I
don't get a zombie with every request.

Robert Brewer
MIS
Amor Ministries
fu******@amor.org
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Robert Brewer wrote:
I've Googled extensively, but can't figure out what might be causing my
Python CGI app to zombie (yes, Tibia, the one I just announced ;). The
cgi bit looks like this:


Zombies are caused by forking a subprocess and the parent not waiting on
it. Does your system (sometimes) spin off a subprocess?

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Defeat is a school in which truth always grows strong.
-- Henry Ward Beecher
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.