Package: python-daemon
Version: 1.5.5-1
Severity: normal

Hi there,

When running a simple test program like the below, if the user does not have
permissions on the pidfile /var/run/mydaemon.pid, the program will terminate
with a status code of 0, and print no messages to the console.  However, it
will fail to daemonize, and will not execute the code in do_stuff() at all.

  import daemon
  import daemon.pidlockfile
  import time

  def do_stuff():
      while True:
          print "Sleeping"
          time.sleep(1)

  with daemon.DaemonContext(
      pidfile=daemon.pidlockfile.PIDLockFile("/var/run/mydaemon.pid")
  ):
      do_stuff()

I am not sure if this is a bug, or is simply an unavoidable consequence of some
aspect of the process model.

Cheers,
Dave

-- System Information:
Debian Release: 7.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-daemon depends on:
ii  python           2.7.3-4+deb7u1
ii  python-lockfile  1:0.8-2
ii  python-support   1.0.15

python-daemon recommends no packages.

python-daemon suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to