Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

Jille at mydevnull dot quis dot cx
17 years ago
If you want to test whether processes owned by other users are running, you can use:

<?php
$running
=posix_kill($pid, 0);
if(
posix_get_last_error()==1) /* EPERM */
$running=true;
?>

If the process is owned by somebody else (and you're not root), you will get an EPERM.
On my system (FreeBSD) this is defined to 1.

You should test what the value of EPERM is on your system.

<< Back to user notes page

To Top