durusmail: quixote-users: Releasing Resources w/ SCGI
Releasing Resources w/ SCGI
2004-10-18
2004-10-19
2004-10-19
2004-10-19
2004-10-19
Releasing Resources w/ SCGI
Jesse Pavel
2004-10-18

I'm trying to structure my Quixote SCGI program so that each child
process started by the SCGI server acquires a few resources when it
begins, and explicitly releases them when the parent process
terminates. I'm not sure where is the proper place to put the code
that releases resources, considering that I normally terminate the
parent with a SIGINT.

When I do that, what happens to the child processes, which are, I
presume, blocking while waiting for the passed file descriptor from
the server? Is there a "clean" method of releasing resources, based
on catching a Python exception somewhere, or perhaps I need to trap
a signal in each child?

Thanks for any help!

 - Jesse

reply