Thread and CGI

Karl Scalet scalet at yebu.de
Sat Feb 16 04:54:38 EST 2002


[..]
> Remember:
> 	REOPEN STDIN, STDOUT, STDERR TO /dev/null !!!!
> 
> I know this is a python group, but I originally did this
> in perl, so I'm posting the bit I used:
> 
> Because, if not, the child won't "daemonize", and the
> parent process will hang until the child finishes, or
> the browser times-out (upon which the child will be
> summarily terminated).

if you don't need those three handles, just close them, but
be aware not doing it with sys.stdout.close() rather then
use os.close(1), etc.

Just mention this because that drove me crazy the last days.
Got this from some other thread in this group, thnx, but don't
have the reference.

cheers, Karl



More information about the Python-list mailing list