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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/599185

Title:
  Another instance of Camera Monitor is already running

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to