Skip to content

Commit 62dfa93

Browse files
cli_set_process_title() available in PHP 5.5 to set proc title. This is preferred over the PECL function setproctitle().
1 parent 468f1ce commit 62dfa93

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Resque/Worker.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,10 @@ private function startup()
324324
*/
325325
private function updateProcLine($status)
326326
{
327-
if(function_exists('setproctitle')) {
327+
if(function_exists('cli_set_process_title')) {
328+
cli_set_process_title('resque-' . Resque::VERSION . ': ' . $status);
329+
}
330+
else if(function_exists('setproctitle')) {
328331
setproctitle('resque-' . Resque::VERSION . ': ' . $status);
329332
}
330333
}

0 commit comments

Comments
 (0)