From: Anantha Kesari H Y Date: Fri, 3 Jan 2003 16:06:02 +0000 (+0000) Subject: Modified for NetWare. X-Git-Tag: PHP_5_0_dev_before_13561_fix~486 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e52c112dfa154463ec0c622c357dbb2275f042a;p=php Modified for NetWare. --- diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 2ca6dc07cf..e3c3644ace 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -599,13 +599,13 @@ PHP_MINIT_FUNCTION(proc_open) le_proc_open = zend_register_list_destructors_ex(proc_open_rsrc_dtor, NULL, "process", module_number); return SUCCESS; } - /* }}} */ /* {{{ proto int proc_close(resource process) close a process opened by proc_open */ PHP_FUNCTION(proc_close) { +#ifndef NETWARE /* This is removed for NetWare because there is not way to execute a new process using fork() */ zval *proc; void *child; @@ -617,6 +617,7 @@ PHP_FUNCTION(proc_close) zend_list_delete(Z_LVAL_P(proc)); RETURN_LONG(FG(pclose_ret)); +#endif /* NETWARE */ } /* }}} */ @@ -667,6 +668,8 @@ struct php_proc_open_descriptor_item { Run a process with more control over it's file descriptors */ PHP_FUNCTION(proc_open) { +#ifndef NETWARE /* This is removed for NetWare because there is not way to execute a new process using fork() */ + #define MAX_DESCRIPTORS 16 char *command; @@ -896,18 +899,6 @@ PHP_FUNCTION(proc_open) child = pi.hProcess; CloseHandle(pi.hThread); -#elif defined(NETWARE) - - /* clean up all the descriptors */ - for (i = 0; i < ndesc; i++) { - close(descriptors[i].childend); - close(descriptors[i].parentend); - } - - php_error_docref(NULL TSRMLS_CC, E_WARNING, "fork not supported on NetWare"); - - goto exit_fail; - #else /* the unix way */ @@ -1008,7 +999,7 @@ exit_fail: efree(command); RETURN_FALSE; - +#endif /* NETWARE */ } /* }}} */