note 37320 added to function.proc-nice

From: Date: Mon, 10 Nov 2003 19:34:52 +0000
Subject: note 37320 added to function.proc-nice
Groups: php.notes 
Request: Send a blank email to php-notes+get-60212@lists.php.net to get a copy of this message
If you don't have PHP5 and needs to nice your process this works good. <?php function proc_nice($priority) { exec("renice +$priority ".getmypid()); } //You also need a shutdown function if you don't want to leave your http deamons with a modified priority function exit_func(){ // Restore priority proc_nice(0); } register_shutdown_function('exit_func'); ?> ---- Manual Page -- http://www.php.net/manual/en/function.proc-nice.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37320 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37320&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37320&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#60212) next »