From 0ad5cac954b7bc9a9e15ada34d75648ef88c840b Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 18 Feb 2003 01:23:51 +0000 Subject: [PATCH] By popular demand nice() is renamed to proc_nice(). A better error message for proc_nice() failure. --- ext/standard/basic_functions.c | 2 +- ext/standard/exec.c | 6 +++--- ext/standard/exec.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 942d381380..a9930811a9 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -425,7 +425,7 @@ function_entry basic_functions[] = { #endif #ifdef HAVE_NICE - PHP_FE(nice, NULL) + PHP_FE(proc_nice, NULL) #endif PHP_FE(rand, NULL) diff --git a/ext/standard/exec.c b/ext/standard/exec.c index d37dcb6cd6..2605a87c9b 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -492,9 +492,9 @@ PHP_FUNCTION(shell_exec) /* }}} */ #ifdef HAVE_NICE -/* {{{ proto bool nice(int priority) +/* {{{ proto bool proc_nice(int priority) Change the priority of the current process */ -PHP_FUNCTION(nice) +PHP_FUNCTION(proc_nice) { long pri; @@ -505,7 +505,7 @@ PHP_FUNCTION(nice) errno = 0; nice(pri); if (errno) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only a super user may attempt to increase the process priority."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only a super user may attempt to increase the priority of a process."); RETURN_FALSE; } diff --git a/ext/standard/exec.h b/ext/standard/exec.h index fd1c5e39c5..a0d4ab46ae 100644 --- a/ext/standard/exec.h +++ b/ext/standard/exec.h @@ -31,7 +31,7 @@ PHP_FUNCTION(proc_open); PHP_FUNCTION(proc_get_status); PHP_FUNCTION(proc_close); PHP_FUNCTION(proc_terminate); -PHP_FUNCTION(nice); +PHP_FUNCTION(proc_nice); PHP_MINIT_FUNCTION(proc_open); char *php_escape_shell_cmd(char *); -- 2.50.1