Skip to content Skip to sidebar Skip to footer

Paster Daemon Won't Shut Down Because Can't Read Own Pid File

TL;DR version: When I ask Paster to stop-daemon, it fails to read its own file that it uses to track its process id. Longer version: I am running Paster (pastescript 1.7.3) on Pyth

Solution 1:

From paste script's source code(serve.py), in the PID reading method:

pid = read_pidfile(pidfile)
if pid:
    try:
        os.kill(int(pid), 0)
        return pid
    except OSError, e:
        if e.errno == errno.EPERM:
            return pid
return None

On POSIX-compatible platforms, specifying 0 as a signal just checks whether the process is alive.

However, on Windows, there is no kill system call; Python will use TerminateProcess instead. Remove the os.kill line from paster script or use a POSIX-compatible platform, like Cygwin (POSIX layer on top of Windows) or Linux.

Post a Comment for "Paster Daemon Won't Shut Down Because Can't Read Own Pid File"