Lines Matching refs:proc

226 	struct php_process_handle *proc = (struct php_process_handle*)rsrc->ptr;  in proc_open_rsrc_dtor()  local
236 for (i = 0; i < proc->npipes; i++) { in proc_open_rsrc_dtor()
237 if (proc->pipes[i] != 0) { in proc_open_rsrc_dtor()
238 zend_list_delete(proc->pipes[i]); in proc_open_rsrc_dtor()
239 proc->pipes[i] = 0; in proc_open_rsrc_dtor()
244 WaitForSingleObject(proc->childHandle, INFINITE); in proc_open_rsrc_dtor()
245 GetExitCodeProcess(proc->childHandle, &wstatus); in proc_open_rsrc_dtor()
247 CloseHandle(proc->childHandle); in proc_open_rsrc_dtor()
252 wait_pid = waitpid(proc->child, &wstatus, 0); in proc_open_rsrc_dtor()
266 _php_free_envp(proc->env, proc->is_persistent); in proc_open_rsrc_dtor()
267 pefree(proc->command, proc->is_persistent); in proc_open_rsrc_dtor()
268 pefree(proc, proc->is_persistent); in proc_open_rsrc_dtor()
286 struct php_process_handle *proc; in PHP_FUNCTION() local
293 ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, &zproc, -1, "process", le_proc_open); in PHP_FUNCTION()
296 if (TerminateProcess(proc->childHandle, 255)) { in PHP_FUNCTION()
302 if (kill(proc->child, sig_no) == 0) { in PHP_FUNCTION()
316 struct php_process_handle *proc; in PHP_FUNCTION() local
322 ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, &zproc, -1, "process", le_proc_open); in PHP_FUNCTION()
334 struct php_process_handle *proc; in PHP_FUNCTION() local
348 ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, &zproc, -1, "process", le_proc_open); in PHP_FUNCTION()
352 add_assoc_string(return_value, "command", proc->command, 1); in PHP_FUNCTION()
353 add_assoc_long(return_value, "pid", (long) proc->child); in PHP_FUNCTION()
357 GetExitCodeProcess(proc->childHandle, &wstatus); in PHP_FUNCTION()
365 wait_pid = waitpid(proc->child, &wstatus, WNOHANG|WUNTRACED); in PHP_FUNCTION()
367 if (wait_pid == proc->child) { in PHP_FUNCTION()
471 struct php_process_handle *proc; in PHP_FUNCTION() local
896 proc = (struct php_process_handle*)pemalloc(sizeof(struct php_process_handle), is_persistent); in PHP_FUNCTION()
897 proc->is_persistent = is_persistent; in PHP_FUNCTION()
898 proc->command = command; in PHP_FUNCTION()
899 proc->npipes = ndesc; in PHP_FUNCTION()
900 proc->child = child; in PHP_FUNCTION()
902 proc->childHandle = childHandle; in PHP_FUNCTION()
904 proc->env = env; in PHP_FUNCTION()
967 proc->pipes[i] = Z_LVAL_P(retfp); in PHP_FUNCTION()
971 proc->pipes[i] = 0; in PHP_FUNCTION()
975 ZEND_REGISTER_RESOURCE(return_value, proc, le_proc_open); in PHP_FUNCTION()