Lines Matching refs:proc

234 	php_process_handle *proc = (php_process_handle*)rsrc->ptr;  in proc_open_rsrc_dtor()  local
244 for (int i = 0; i < proc->npipes; i++) { in proc_open_rsrc_dtor()
245 if (proc->pipes[i] != NULL) { in proc_open_rsrc_dtor()
246 GC_DELREF(proc->pipes[i]); in proc_open_rsrc_dtor()
247 zend_list_close(proc->pipes[i]); in proc_open_rsrc_dtor()
248 proc->pipes[i] = NULL; in proc_open_rsrc_dtor()
258 WaitForSingleObject(proc->childHandle, INFINITE); in proc_open_rsrc_dtor()
260 GetExitCodeProcess(proc->childHandle, &wstatus); in proc_open_rsrc_dtor()
266 CloseHandle(proc->childHandle); in proc_open_rsrc_dtor()
273 wait_pid = waitpid(proc->child, &wstatus, waitpid_options); in proc_open_rsrc_dtor()
289 _php_free_envp(proc->env); in proc_open_rsrc_dtor()
290 efree(proc->pipes); in proc_open_rsrc_dtor()
291 efree(proc->command); in proc_open_rsrc_dtor()
292 efree(proc); in proc_open_rsrc_dtor()
309 php_process_handle *proc; in PHP_FUNCTION() local
318 proc = (php_process_handle*)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_open); in PHP_FUNCTION()
319 if (proc == NULL) { in PHP_FUNCTION()
324 RETURN_BOOL(TerminateProcess(proc->childHandle, 255)); in PHP_FUNCTION()
326 RETURN_BOOL(kill(proc->child, sig_no) == 0); in PHP_FUNCTION()
335 php_process_handle *proc; in PHP_FUNCTION() local
341 proc = (php_process_handle*)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_open); in PHP_FUNCTION()
342 if (proc == NULL) { in PHP_FUNCTION()
357 php_process_handle *proc; in PHP_FUNCTION() local
371 proc = (php_process_handle*)zend_fetch_resource(Z_RES_P(zproc), "process", le_proc_open); in PHP_FUNCTION()
372 if (proc == NULL) { in PHP_FUNCTION()
377 add_assoc_string(return_value, "command", proc->command); in PHP_FUNCTION()
378 add_assoc_long(return_value, "pid", (zend_long)proc->child); in PHP_FUNCTION()
381 GetExitCodeProcess(proc->childHandle, &wstatus); in PHP_FUNCTION()
386 wait_pid = waitpid(proc->child, &wstatus, WNOHANG|WUNTRACED); in PHP_FUNCTION()
388 if (wait_pid == proc->child) { in PHP_FUNCTION()
1036 php_process_handle *proc; in PHP_FUNCTION() local
1239 proc = (php_process_handle*) emalloc(sizeof(php_process_handle)); in PHP_FUNCTION()
1240 proc->command = command; in PHP_FUNCTION()
1241 proc->pipes = emalloc(sizeof(zend_resource *) * ndesc); in PHP_FUNCTION()
1242 proc->npipes = ndesc; in PHP_FUNCTION()
1243 proc->child = child; in PHP_FUNCTION()
1245 proc->childHandle = childHandle; in PHP_FUNCTION()
1247 proc->env = env; in PHP_FUNCTION()
1289 proc->pipes[i] = NULL; in PHP_FUNCTION()
1301 proc->pipes[i] = Z_RES(retfp); in PHP_FUNCTION()
1307 RETVAL_RES(zend_register_resource(proc, le_proc_open)); in PHP_FUNCTION()