[python-daemon-Bugs][315148] No PID file created

python-daemon-bugs at alioth.debian.org python-daemon-bugs at alioth.debian.org
Sun Aug 30 08:23:08 UTC 2015


python-daemon-Bugs item #315148 was changed at 2015-08-30 18:23 by Ben Finney
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413098&aid=315148&group_id=100328

Status: Open
Priority: 3
Submitted By: Jacques-D. Piguet (jdpiguet-guest)
Assigned to: Nobody (None)
Summary: No PID file created 


Initial Comment:
Hello,

Trying to use python-daemon in Python 2.7.
The goal is to put some info on the Adafruit LCD char display.
I can see the display correctly updated.
The problem is that the PID file is not created.

Regards,
Jacques-D.

<pre>
#!/usr/bin/python
# -*- coding: utf-8 -*-

import daemon
import lockfile

from tempDisp import testProgram

context = daemon.DaemonContext(
    working_directory = '/srv',
    umask = 0o002,
    pidfile = lockfile.FileLock('/var/run/adadisp.pid'),
    )


with context:
    testProgram()
</pre>

testProgram is working, 



----------------------------------------------------------------------

>Comment By: Ben Finney (bignose-guest)
Date: 2015-08-30 18:23

Message:
> The problem is that the PID file is not created.

The daemon process will be owned by the UID and GID of the original process that started the program, the “effective UID” and “effective GID” of the process.

Is that UID and GID correct for writing to the ‘/var/run/’ directory?

If needed, you can run the process as the superuser and specify the ‘uid’ and ‘gid’ options to drop privileges as soon as the daemon starts.


----------------------------------------------------------------------

Comment By: Jacques-D. Piguet (jdpiguet-guest)
Date: 2015-08-22 19:52

Message:
I'm unable to find an error message anywhere.
The timestamp of the /var/run directory is not modified.

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413098&aid=315148&group_id=100328



More information about the python-daemon-bugs mailing list