Lines Matching refs:proc

168 	struct php_process_handle *proc = (struct php_process_handle*)rsrc->ptr;  in proc_open_rsrc_dtor()  local
179 for (i = 0; i < proc->npipes; i++) { in proc_open_rsrc_dtor()
180 if (proc->pipes[i] != 0) { in proc_open_rsrc_dtor()
181 GC_DELREF(proc->pipes[i]); in proc_open_rsrc_dtor()
182 zend_list_close(proc->pipes[i]); in proc_open_rsrc_dtor()
183 proc->pipes[i] = 0; in proc_open_rsrc_dtor()
189 WaitForSingleObject(proc->childHandle, INFINITE); in proc_open_rsrc_dtor()
191 GetExitCodeProcess(proc->childHandle, &wstatus); in proc_open_rsrc_dtor()
197 CloseHandle(proc->childHandle); in proc_open_rsrc_dtor()
205 wait_pid = waitpid(proc->child, &wstatus, waitpid_options); in proc_open_rsrc_dtor()
219 _php_free_envp(proc->env, proc->is_persistent); in proc_open_rsrc_dtor()
220 pefree(proc->pipes, proc->is_persistent); in proc_open_rsrc_dtor()
221 pefree(proc->command, proc->is_persistent); in proc_open_rsrc_dtor()
222 pefree(proc, proc->is_persistent); in proc_open_rsrc_dtor()
240 struct php_process_handle *proc; in PHP_FUNCTION() local
249 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
254 if (TerminateProcess(proc->childHandle, 255)) { in PHP_FUNCTION()
260 if (kill(proc->child, sig_no) == 0) { in PHP_FUNCTION()
274 struct php_process_handle *proc; in PHP_FUNCTION() local
280 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
296 struct php_process_handle *proc; in PHP_FUNCTION() local
310 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
316 add_assoc_string(return_value, "command", proc->command); in PHP_FUNCTION()
317 add_assoc_long(return_value, "pid", (zend_long) proc->child); in PHP_FUNCTION()
321 GetExitCodeProcess(proc->childHandle, &wstatus); in PHP_FUNCTION()
329 wait_pid = waitpid(proc->child, &wstatus, WNOHANG|WUNTRACED); in PHP_FUNCTION()
331 if (wait_pid == proc->child) { in PHP_FUNCTION()
512 struct php_process_handle *proc; in PHP_FUNCTION() local
1093 proc = (struct php_process_handle*)pemalloc(sizeof(struct php_process_handle), is_persistent); in PHP_FUNCTION()
1094 proc->is_persistent = is_persistent; in PHP_FUNCTION()
1095 proc->command = command; in PHP_FUNCTION()
1096 proc->pipes = pemalloc(sizeof(zend_resource *) * ndesc, is_persistent); in PHP_FUNCTION()
1097 proc->npipes = ndesc; in PHP_FUNCTION()
1098 proc->child = child; in PHP_FUNCTION()
1100 proc->childHandle = childHandle; in PHP_FUNCTION()
1102 proc->env = env; in PHP_FUNCTION()
1160 proc->pipes[i] = Z_RES(retfp); in PHP_FUNCTION()
1165 proc->pipes[i] = NULL; in PHP_FUNCTION()
1181 ZVAL_RES(return_value, zend_register_resource(proc, le_proc_open)); in PHP_FUNCTION()