PEP 3143: Standard daemon process library
Floris Bruynooghe
floris.bruynooghe at gmail.com
Tue Mar 24 10:58:36 EDT 2009
More information about the Python-list mailing list
Tue Mar 24 10:58:36 EDT 2009
- Previous message (by thread): PEP 3143: Standard daemon process library
- Next message (by thread): PEP 3143: Standard daemon process library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mar 21, 11:06 pm, Ben Finney <ben+pyt... at benfinney.id.au> wrote: > Floris Bruynooghe <floris.bruynoo... at gmail.com> writes: > > Had a quick look at the PEP and it looks very nice IMHO. > > Thank you. I hope you can try the implementation and report feedback > on that too. > > > One of the things that might be interesting is keeping file > > descriptors from the logging module open by default. > > Hmm. I see that this would be a good idea. but it raises the question > of how to manage the set of file handles that should not be closed on > becoming a daemon. > > So far, the logic of closing the file descriptors is a little complex: > > * Close all open file descriptors. This excludes those listed in > the `files_preserve` attribute, and those that correspond to the > `stdin`, `stdout`, or `stderr` attributes. > > Extending that by saying “… and also any file descriptors for > ``logging.FileHandler`` objects” starts to make the description too > complex. I have a strong instinct that it the description is complex, > the design might be bad. > > Can you suggest an alternative API that will ensure that all file > descriptors get closed *except* those that should not be closed? Not an answer yet, but I'll try to find time in the next few days to play with this and tell you what I think. logging.FileHandler would be too narrow in any case I think. Regards Floris
- Previous message (by thread): PEP 3143: Standard daemon process library
- Next message (by thread): PEP 3143: Standard daemon process library
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list