Lines Matching refs:proc

180 	struct php_process_handle *proc = (struct php_process_handle*)rsrc->ptr;  in proc_open_rsrc_dtor()  local
191 for (i = 0; i < proc->npipes; i++) { in proc_open_rsrc_dtor()
192 if (proc->pipes[i] != 0) { in proc_open_rsrc_dtor()
193 GC_REFCOUNT(proc->pipes[i])--; in proc_open_rsrc_dtor()
194 zend_list_close(proc->pipes[i]); in proc_open_rsrc_dtor()
195 proc->pipes[i] = 0; in proc_open_rsrc_dtor()
201 WaitForSingleObject(proc->childHandle, INFINITE); in proc_open_rsrc_dtor()
203 GetExitCodeProcess(proc->childHandle, &wstatus); in proc_open_rsrc_dtor()
209 CloseHandle(proc->childHandle); in proc_open_rsrc_dtor()
217 wait_pid = waitpid(proc->child, &wstatus, waitpid_options); in proc_open_rsrc_dtor()
231 _php_free_envp(proc->env, proc->is_persistent); in proc_open_rsrc_dtor()
232 pefree(proc->pipes, proc->is_persistent); in proc_open_rsrc_dtor()
233 pefree(proc->command, proc->is_persistent); in proc_open_rsrc_dtor()
234 pefree(proc, proc->is_persistent); in proc_open_rsrc_dtor()
252 struct php_process_handle *proc; in PHP_FUNCTION() local
259 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
264 if (TerminateProcess(proc->childHandle, 255)) { in PHP_FUNCTION()
270 if (kill(proc->child, sig_no) == 0) { in PHP_FUNCTION()
284 struct php_process_handle *proc; in PHP_FUNCTION() local
290 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
306 struct php_process_handle *proc; in PHP_FUNCTION() local
320 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
326 add_assoc_string(return_value, "command", proc->command); in PHP_FUNCTION()
327 add_assoc_long(return_value, "pid", (zend_long) proc->child); in PHP_FUNCTION()
331 GetExitCodeProcess(proc->childHandle, &wstatus); in PHP_FUNCTION()
339 wait_pid = waitpid(proc->child, &wstatus, WNOHANG|WUNTRACED); in PHP_FUNCTION()
341 if (wait_pid == proc->child) { in PHP_FUNCTION()
449 struct php_process_handle *proc; in PHP_FUNCTION() local
920 proc = (struct php_process_handle*)pemalloc(sizeof(struct php_process_handle), is_persistent); in PHP_FUNCTION()
921 proc->is_persistent = is_persistent; in PHP_FUNCTION()
922 proc->command = command; in PHP_FUNCTION()
923 proc->pipes = pemalloc(sizeof(zend_resource *) * ndesc, is_persistent); in PHP_FUNCTION()
924 proc->npipes = ndesc; in PHP_FUNCTION()
925 proc->child = child; in PHP_FUNCTION()
927 proc->childHandle = childHandle; in PHP_FUNCTION()
929 proc->env = env; in PHP_FUNCTION()
993 proc->pipes[i] = Z_RES(retfp); in PHP_FUNCTION()
998 proc->pipes[i] = NULL; in PHP_FUNCTION()
1003 ZVAL_RES(return_value, zend_register_resource(proc, le_proc_open)); in PHP_FUNCTION()