note 48430 added to function.pcntl-setpriority

From: Date: Thu, 23 Dec 2004 15:08:37 +0000
Subject: note 48430 added to function.pcntl-setpriority
Groups: php.notes 
Request: Send a blank email to php-notes+get-82204@lists.php.net to get a copy of this message
The following snippet may be used under older versions of PHP to provide similar functionality. Tested only under Linux. <?php function _pcntl_setpriority($priority, $pid = 0) { $priority = (int)$priority; $pid = (int)$pid; if ($priority > 20 && $priority < -20) { return False; } if ($pid == 0) { $pid = getmypid(); } return system("renice $priority -p $pid") != false; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.pcntl-setpriority.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48430 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48430&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48430&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48430&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48430&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48430&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48430&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48430&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82204) next »