Popular recipes tagged "pid" but not "proportional"http://code.activestate.com/recipes/tags/pid-proportional/2013-10-07T21:03:30-07:00ActiveState Code RecipesWait for PID and check for PID existance (POSIX) (Python) 2012-04-15T14:13:02-07:00Giampaolo RodolĂ http://code.activestate.com/recipes/users/4178764/http://code.activestate.com/recipes/578022-wait-for-pid-and-check-for-pid-existance-posix/ <p style="color: grey"> Python recipe 578022 by <a href="/recipes/users/4178764/">Giampaolo RodolĂ </a> (<a href="/recipes/tags/exists/">exists</a>, <a href="/recipes/tags/exit/">exit</a>, <a href="/recipes/tags/pid/">pid</a>, <a href="/recipes/tags/process/">process</a>, <a href="/recipes/tags/status/">status</a>, <a href="/recipes/tags/timeout/">timeout</a>, <a href="/recipes/tags/wait/">wait</a>). Revision 7. </p> <p>Two functions: one which waits for a certain PID to terminate (with optional timeout), another one which checks whether a process with a given PID is running.</p> <p>This was extracted from <a href="http://code.google.com/p/psutil/">psutil</a> project which also provides a Windows implementation.</p> <p>Timeout functionality is implemented as a busy loop and it was inspired by <a href="http://bugs.python.org/issue5673." rel="nofollow">http://bugs.python.org/issue5673.</a></p> Context manager for a daemon pid file (Python) 2013-10-07T21:03:30-07:00Graham Poulterhttp://code.activestate.com/recipes/users/4172291/http://code.activestate.com/recipes/577911-context-manager-for-a-daemon-pid-file/ <p style="color: grey"> Python recipe 577911 by <a href="/recipes/users/4172291/">Graham Poulter</a> (<a href="/recipes/tags/daemon/">daemon</a>, <a href="/recipes/tags/pid/">pid</a>). Revision 3. </p> <p>Context manager for a pid (process id) file used to tell whether a daemon process is still running.</p> <p>On entry, it writes the pid of the current process to the path. On exit, it removes the file.</p> <p>Designed to work with python-daemon.</p>