Python3 implementation
stephan schultchen
stephan.schultchen at gmail.com
Mon Jul 21 22:59:54 UTC 2014
hey all,
i have written a implementation of pep 3143, that will work with python 2
and 3
It contains a PidFile Class that only depends on build in modules.
i have also written some unit and integration tests, currently they depend
on python 3.3 because of the use of unittest.mock. and i think i will have
to add some more tests later.
the only external dependency is the six package.
i tried to stick as close as possible to the PEP, but there where some
parts where i felt that they make no sense.
for example the DaemonContext.close() method is a dummy function. because
there is no sane way to close a daemon, except doing clean-ups and calling
sys.exit(). But it is there, and if anyone like, it could be subclassed and
overwritten.
i also dropped the atexit stuff from the open() method. I moved this into
my PidFile class.
here is my initial commit on GitHub:
https://github.com/schlitzered/pep-3143-daemon
this is a quite early state, but it should do everything that is needed for
turning a process into a daemon.
feel free to test this, and send me some feedback.
cheers
stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/python-daemon-devel/attachments/20140722/2bda8ec8/attachment.html>
More information about the python-daemon-devel
mailing list