Well, that was silly of me... forgot to fix my fix for the fix :S .
Here's what I meant to post:

# Check if the process with pid is running
def pid_running(pid):
      if os.path.isdir('/proc/' + str(pid)):
            with open('/proc/' + str(pid) + '/comm') as fd:
                  cmd = fd.read()
                  return cmd.strip() == 'cameramonitor'
      else:
            return False

I also added conversion of "pid" to a string, in case it is ever passed
as an integer. Testing this on the interactive prompt worked fine for
me.

-- 
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