Lines Matching refs:proc
226 struct php_process_handle *proc = (struct php_process_handle*)rsrc->ptr; in proc_open_rsrc_dtor() local
237 for (i = 0; i < proc->npipes; i++) { in proc_open_rsrc_dtor()
238 if (proc->pipes[i] != 0) { in proc_open_rsrc_dtor()
239 zend_list_delete(proc->pipes[i]); in proc_open_rsrc_dtor()
240 proc->pipes[i] = 0; in proc_open_rsrc_dtor()
246 WaitForSingleObject(proc->childHandle, INFINITE); in proc_open_rsrc_dtor()
248 GetExitCodeProcess(proc->childHandle, &wstatus); in proc_open_rsrc_dtor()
254 CloseHandle(proc->childHandle); in proc_open_rsrc_dtor()
262 wait_pid = waitpid(proc->child, &wstatus, waitpid_options); in proc_open_rsrc_dtor()
276 _php_free_envp(proc->env, proc->is_persistent); in proc_open_rsrc_dtor()
277 pefree(proc->command, proc->is_persistent); in proc_open_rsrc_dtor()
278 pefree(proc, proc->is_persistent); in proc_open_rsrc_dtor()
296 struct php_process_handle *proc; in PHP_FUNCTION() local
303 ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, &zproc, -1, "process", le_proc_open); in PHP_FUNCTION()
306 if (TerminateProcess(proc->childHandle, 255)) { in PHP_FUNCTION()
312 if (kill(proc->child, sig_no) == 0) { in PHP_FUNCTION()
326 struct php_process_handle *proc; in PHP_FUNCTION() local
332 ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, &zproc, -1, "process", le_proc_open); in PHP_FUNCTION()
346 struct php_process_handle *proc; in PHP_FUNCTION() local
360 ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, &zproc, -1, "process", le_proc_open); in PHP_FUNCTION()
364 add_assoc_string(return_value, "command", proc->command, 1); in PHP_FUNCTION()
365 add_assoc_long(return_value, "pid", (long) proc->child); in PHP_FUNCTION()
369 GetExitCodeProcess(proc->childHandle, &wstatus); in PHP_FUNCTION()
377 wait_pid = waitpid(proc->child, &wstatus, WNOHANG|WUNTRACED); in PHP_FUNCTION()
379 if (wait_pid == proc->child) { in PHP_FUNCTION()
484 struct php_process_handle *proc; in PHP_FUNCTION() local
909 proc = (struct php_process_handle*)pemalloc(sizeof(struct php_process_handle), is_persistent); in PHP_FUNCTION()
910 proc->is_persistent = is_persistent; in PHP_FUNCTION()
911 proc->command = command; in PHP_FUNCTION()
912 proc->npipes = ndesc; in PHP_FUNCTION()
913 proc->child = child; in PHP_FUNCTION()
915 proc->childHandle = childHandle; in PHP_FUNCTION()
917 proc->env = env; in PHP_FUNCTION()
980 proc->pipes[i] = Z_LVAL_P(retfp); in PHP_FUNCTION()
984 proc->pipes[i] = 0; in PHP_FUNCTION()
988 ZEND_REGISTER_RESOURCE(return_value, proc, le_proc_open); in PHP_FUNCTION()