mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
This commit is contained in:
parent
b3093082fd
commit
2104bea5d7
65 changed files with 90 additions and 635 deletions
|
@ -36,11 +36,6 @@
|
|||
#include "SAPI.h"
|
||||
#include "main/php_network.h"
|
||||
|
||||
#ifdef NETWARE
|
||||
#include <proc.h>
|
||||
#include <library.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
@ -346,11 +341,8 @@ PHP_FUNCTION(proc_get_status)
|
|||
if (WIFSIGNALED(wstatus)) {
|
||||
running = 0;
|
||||
signaled = 1;
|
||||
#ifdef NETWARE
|
||||
termsig = WIFTERMSIG(wstatus);
|
||||
#else
|
||||
|
||||
termsig = WTERMSIG(wstatus);
|
||||
#endif
|
||||
}
|
||||
if (WIFSTOPPED(wstatus)) {
|
||||
stopped = 1;
|
||||
|
@ -437,13 +429,6 @@ PHP_FUNCTION(proc_open)
|
|||
char cur_cwd[MAXPATHLEN];
|
||||
wchar_t *cmdw = NULL, *cwdw = NULL, *envpw = NULL;
|
||||
size_t tmp_len;
|
||||
#endif
|
||||
#ifdef NETWARE
|
||||
char** child_argv = NULL;
|
||||
char* command_dup = NULL;
|
||||
char* orig_cwd = NULL;
|
||||
int command_num_args = 0;
|
||||
wiring_t channel;
|
||||
#endif
|
||||
php_process_id_t child;
|
||||
struct php_process_handle *proc;
|
||||
|
@ -797,51 +782,6 @@ PHP_FUNCTION(proc_open)
|
|||
childHandle = pi.hProcess;
|
||||
child = pi.dwProcessId;
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
#elif defined(NETWARE)
|
||||
if (cwd) {
|
||||
orig_cwd = getcwd(NULL, PATH_MAX);
|
||||
chdir2(cwd);
|
||||
}
|
||||
channel.infd = descriptors[0].childend;
|
||||
channel.outfd = descriptors[1].childend;
|
||||
channel.errfd = -1;
|
||||
/* Duplicate the command as processing downwards will modify it*/
|
||||
command_dup = strdup(command);
|
||||
if (!command_dup) {
|
||||
goto exit_fail;
|
||||
}
|
||||
/* get a number of args */
|
||||
construct_argc_argv(command_dup, NULL, &command_num_args, NULL);
|
||||
child_argv = (char**) malloc((command_num_args + 1) * sizeof(char*));
|
||||
if(!child_argv) {
|
||||
free(command_dup);
|
||||
if (cwd && orig_cwd) {
|
||||
chdir2(orig_cwd);
|
||||
free(orig_cwd);
|
||||
}
|
||||
}
|
||||
/* fill the child arg vector */
|
||||
construct_argc_argv(command_dup, NULL, &command_num_args, child_argv);
|
||||
child_argv[command_num_args] = NULL;
|
||||
child = procve(child_argv[0], PROC_DETACHED|PROC_INHERIT_CWD, NULL, &channel, NULL, NULL, 0, NULL, (const char**)child_argv);
|
||||
free(child_argv);
|
||||
free(command_dup);
|
||||
if (cwd && orig_cwd) {
|
||||
chdir2(orig_cwd);
|
||||
free(orig_cwd);
|
||||
}
|
||||
if (child < 0) {
|
||||
/* failed to fork() */
|
||||
/* clean up all the descriptors */
|
||||
for (i = 0; i < ndesc; i++) {
|
||||
close(descriptors[i].childend);
|
||||
if (descriptors[i].parentend)
|
||||
close(descriptors[i].parentend);
|
||||
}
|
||||
php_error_docref(NULL, E_WARNING, "procve failed - %s", strerror(errno));
|
||||
goto exit_fail;
|
||||
}
|
||||
#elif HAVE_FORK
|
||||
/* the unix way */
|
||||
child = fork();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue