CGI zombies with Apache 1.3 on Linux

Robert Brewer fumanchu at amor.org
Fri Dec 10 14:10:00 EST 2004


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
fumanchu at amor.org



More information about the Python-list mailing list