note 82560 added to function.posix-kill
| From: | Jille at mydevnull dot quis dot cx | Date: | Wed, 16 Apr 2008 13:22:19 +0000 |
| Subject: | note 82560 added to function.posix-kill | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138371@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 89.248.170.61
Probable Submitter: 82.174.113.83
----
Manual Page -- http://www.php.net/manual/en/function.posix-kill.php
Edit -- https://master.php.net/note/edit/82560
Del: integrated -- https://master.php.net/note/delete/82560/integrated
Del: useless -- https://master.php.net/note/delete/82560/useless
Del: bad code -- https://master.php.net/note/delete/82560/bad+code
Del: spam -- https://master.php.net/note/delete/82560/spam
Del: non-english -- https://master.php.net/note/delete/82560/non-english
Del: in docs -- https://master.php.net/note/delete/82560/in+docs
Del: other reasons-- https://master.php.net/note/delete/82560
Reject -- https://master.php.net/note/reject/82560
Search -- https://master.php.net/manage/user-notes.php