Lines Matching refs:proc
175 struct php_process_handle *proc = (struct php_process_handle*)rsrc->ptr; in proc_open_rsrc_dtor() local
186 for (i = 0; i < proc->npipes; i++) { in proc_open_rsrc_dtor()
187 if (proc->pipes[i] != 0) { in proc_open_rsrc_dtor()
188 GC_REFCOUNT(proc->pipes[i])--; in proc_open_rsrc_dtor()
189 zend_list_close(proc->pipes[i]); in proc_open_rsrc_dtor()
190 proc->pipes[i] = 0; in proc_open_rsrc_dtor()
196 WaitForSingleObject(proc->childHandle, INFINITE); in proc_open_rsrc_dtor()
198 GetExitCodeProcess(proc->childHandle, &wstatus); in proc_open_rsrc_dtor()
204 CloseHandle(proc->childHandle); in proc_open_rsrc_dtor()
212 wait_pid = waitpid(proc->child, &wstatus, waitpid_options); in proc_open_rsrc_dtor()
226 _php_free_envp(proc->env, proc->is_persistent); in proc_open_rsrc_dtor()
227 pefree(proc->pipes, proc->is_persistent); in proc_open_rsrc_dtor()
228 pefree(proc->command, proc->is_persistent); in proc_open_rsrc_dtor()
229 pefree(proc, proc->is_persistent); in proc_open_rsrc_dtor()
247 struct php_process_handle *proc; in PHP_FUNCTION() local
256 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
261 if (TerminateProcess(proc->childHandle, 255)) { in PHP_FUNCTION()
267 if (kill(proc->child, sig_no) == 0) { in PHP_FUNCTION()
281 struct php_process_handle *proc; in PHP_FUNCTION() local
287 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
303 struct php_process_handle *proc; in PHP_FUNCTION() local
317 …if ((proc = (struct php_process_handle *)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_op… in PHP_FUNCTION()
323 add_assoc_string(return_value, "command", proc->command); in PHP_FUNCTION()
324 add_assoc_long(return_value, "pid", (zend_long) proc->child); in PHP_FUNCTION()
328 GetExitCodeProcess(proc->childHandle, &wstatus); in PHP_FUNCTION()
336 wait_pid = waitpid(proc->child, &wstatus, WNOHANG|WUNTRACED); in PHP_FUNCTION()
338 if (wait_pid == proc->child) { in PHP_FUNCTION()
436 struct php_process_handle *proc; in PHP_FUNCTION() local
866 proc = (struct php_process_handle*)pemalloc(sizeof(struct php_process_handle), is_persistent); in PHP_FUNCTION()
867 proc->is_persistent = is_persistent; in PHP_FUNCTION()
868 proc->command = command; in PHP_FUNCTION()
869 proc->pipes = pemalloc(sizeof(zend_resource *) * ndesc, is_persistent); in PHP_FUNCTION()
870 proc->npipes = ndesc; in PHP_FUNCTION()
871 proc->child = child; in PHP_FUNCTION()
873 proc->childHandle = childHandle; in PHP_FUNCTION()
875 proc->env = env; in PHP_FUNCTION()
936 proc->pipes[i] = Z_RES(retfp); in PHP_FUNCTION()
941 proc->pipes[i] = NULL; in PHP_FUNCTION()
946 ZVAL_RES(return_value, zend_register_resource(proc, le_proc_open)); in PHP_FUNCTION()