The problem is the camermonitor doesn't always delete the ~/.cameramonitor.pid file and *sometimes* that PID is in use by another program.
Replacing the following function in /usr/shared/pyshared/cameramonitor/utils.py will fix the problem by checking if the PID that ~/.cameramonitor.pid refers to actually is running cameramonitor:
# Check if the process with pid is running
def pid_running(pid):
if os.path.isdir('/proc/'+pid):
fd = open('/proc/'+pid+'/cmdline')
cmd = fd.read()
return cmd.strip('\x00').endswith('cameramonitor')
else:
return False
The problem is the camermonitor doesn't always delete the ~/.cameramonito r.pid file and *sometimes* that PID is in use by another program.
Replacing the following function in /usr/shared/ pyshared/ cameramonitor/ utils.py will fix the problem by checking if the PID that ~/.cameramonito r.pid refers to actually is running cameramonitor:
# Check if the process with pid is running isdir(' /proc/' +pid): proc/'+ pid+'/cmdline' ) '\x00') .endswith( 'cameramonitor' )
def pid_running(pid):
if os.path.
fd = open('/
cmd = fd.read()
return cmd.strip(
else:
return False