note 35626 added to function.posix-kill
| From: | jack at net-md dot net | Date: | Mon, 08 Sep 2003 23:05:20 +0000 |
| Subject: | note 35626 added to function.posix-kill | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55867@lists.php.net to get a copy of this message | ||
the signal NAME number mapping seems to be missing (not defined)
so the easy way to grab this info is something like:
egrep '^#define[[:space:]]SIG' /usr/include/asm/signal.h <- for linux
egrep '^#define[[:space:]]SIG' /usr/include/sys/signal.h <- for freebsd
The signals may not the same across all unix'es so be warned. also kill -l
may be the easy awnser (depending on your shell type, bash and ksh seem
to work) Here is an example:
<?
define("SIGTERM",15); /* from /usr/include/asm/signal.h: *
* #define SIGTERM 15 */
$mypid=posix_getpid();
print "killing: ".$mypid."\n";
posix_kill($mypid, SIGTERM);
?>
The example might be silly, but its usefull for batch programs that need
to terminate/notify processes.
----
Manual Page -- http://www.php.net/manual/en/function.posix-kill.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35626
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35626&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35626&report=yes