]> granicus.if.org Git - php/commitdiff
By popular demand nice() is renamed to proc_nice().
authorIlia Alshanetsky <iliaa@php.net>
Tue, 18 Feb 2003 01:23:51 +0000 (01:23 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 18 Feb 2003 01:23:51 +0000 (01:23 +0000)
A better error message for proc_nice() failure.

ext/standard/basic_functions.c
ext/standard/exec.c
ext/standard/exec.h

index 942d38138067e70a40d9f69be7dca2907400b815..a9930811a994537a393ea5568f20e46979b45903 100644 (file)
@@ -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)
index d37dcb6cd6067702d61f1fa05e78152ddc477d78..2605a87c9b49da9fd5c7aed3137b35f10239b203 100644 (file)
@@ -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;
        }
        
index fd1c5e39c58949a0dd4ec6c372f84fe6f697529d..a0d4ab46aef5aa6a97da38baf890bd07fb89182c 100644 (file)
@@ -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 *);