note 108873 added to function.pcntl-signal

From: Date: Thu, 31 May 2012 12:25:12 +0000
Subject: note 108873 added to function.pcntl-signal
Groups: php.notes 
Request: Send a blank email to php-notes+get-188321@lists.php.net to get a copy of this message
static class method to get the name of a process signal as string: (self::$processSignalDescriptions is used to cache the results) public static function getPOSIXSignalText($signo) { try { if (is_null(self::$processSignalDescriptions)) { self::$processSignalDescriptions = array(); $signal_list = explode(" ", trim(shell_exec("kill -l"))); foreach ($signal_list as $key => $value) { self::$processSignalDescriptions[$key+1] = "SIG".$value; } } return isset(self::$processSignalDescriptions[$signo])?self::$processSignalDescriptions[$signo]:"UNKNOWN"; } catch (Exception $e) {} return "UNKNOWN"; } ---- Server IP: 87.106.1.137 Probable Submitter: 212.162.16.146 ---- Manual Page -- http://www.php.net/manual/en/function.pcntl-signal.php Edit -- https://master.php.net/note/edit/108873 Del: integrated -- https://master.php.net/note/delete/108873/integrated Del: useless -- https://master.php.net/note/delete/108873/useless Del: bad code -- https://master.php.net/note/delete/108873/bad+code Del: spam -- https://master.php.net/note/delete/108873/spam Del: non-english -- https://master.php.net/note/delete/108873/non-english Del: in docs -- https://master.php.net/note/delete/108873/in+docs Del: other reasons-- https://master.php.net/note/delete/108873 Reject -- https://master.php.net/note/reject/108873 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#188321) next »