struct php_process_handle *proc;
int is_persistent = 0; /* TODO: ensure that persistent procs will work */
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "saz/|s!a!", &command,
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "saz|s!a!", &command,
&command_len, &descriptorspec, &pipes, &cwd, &cwd_len, &environment) == FAILURE) {
RETURN_FALSE;
}
proc->child = child;
proc->env = env;
+ if (pipes != NULL) {
+ zval_dtor(pipes);
+ }
+ MAKE_STD_ZVAL(pipes);
array_init(pipes);
/* clean up all the child ends and then open streams on the parent