Bug #355
problem between daemon and pid file options
Start date:
06/18/2009
Due date:
% Done:
100%
Resolution:
Description
When I try to start the correlator in daemon mode, specifying the pid file, it doesn't start (the pid file exists and is writable by the user).
$ /usr/bin/prelude-correlator -d -P /var/run/prelude-correlator.pid $ ps axf |grep prelude-correlator |wc -l 0
Strace shows something weird in the code:
$ strace -s 256 -f /usr/bin/prelude-correlator -d -P /var/run/prelude-correlator.pid [...] [pid 12080] write(2, " File \"/usr/lib/pymodules/python2.5/PreludeCorrelator/main.py\", line 147, in main\n", 83) = 83 [...] [pid 12080] write(2, " ", 4) = 4 [pid 12080] write(2, "open(pidfile, \"w\").write(str(os.getpid()))\n", 43) = 43 [pid 12080] close(3) = 0 [pid 12080] munmap(0x7f1c86a02000, 4096) = 0 [pid 12080] write(2, "NameError", 9) = 9 [pid 12080] write(2, ": ", 2) = 2 [pid 12080] write(2, "global name 'pidfile' is not defined", 36) = 36
PS: logging the output to syslog would be a nice feature
Associated revisions
Correct invalid variable name.
This prevented prelude-correlator from starting in daemon mode when
using the '--pidfile' option. Fixes #355.
History
#1 Updated by Yoann VANDOORSELAERE about 15 years ago
- Status changed from New to Assigned
- Assignee set to Yoann VANDOORSELAERE
- Target version set to 0.9.0-beta5
#2 Updated by Yoann VANDOORSELAERE about 15 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset 5491e0920a4fc71263a7a9c9dd2bf38dd2baceb5.