/php-src/ext/pcntl/tests/ |
H A D | pcntl_setns_newpid.phpt | 11 $pid = pcntl_fork(); 12 if ($pid == -1) die("skip pcntl_fork failed"); 13 if ($pid != 0) { 14 if (@pcntl_setns($pid, CLONE_NEWPID) === false && pcntl_get_last_error() == PCNTL_EPERM) { 21 $pid = pcntl_fork(); 22 if ($pid == -1) die("pcntl_fork failed"); 23 if ($pid != 0) { 24 var_dump(pcntl_setns($pid, CLONE_NEWPID));
|
H A D | pcntl_waitid.phpt | 12 $pid = pcntl_fork(); 13 if ($pid == -1) { 15 } else if ($pid) { 17 var_dump(pcntl_waitid(P_PID, $pid, $siginfo, 0)); 20 var_dump(pcntl_waitid(P_PID, $pid, $siginfo, WSTOPPED)); 21 posix_kill($pid, SIGCONT); 22 var_dump(pcntl_waitid(P_PID, $pid, $siginfo, WCONTINUED)); 23 posix_kill($pid, SIGUSR1); 24 var_dump(pcntl_waitid(P_PID, $pid, $siginfo, WEXITED));
|
H A D | pcntl_setns_basic.phpt | 11 $pid = pcntl_fork(); 12 if ($pid == -1) die("skip pcntl_fork failed"); 13 if ($pid != 0) { 14 if (@pcntl_setns($pid, CLONE_NEWPID) === false && pcntl_get_last_error() == PCNTL_EPERM) { 21 $pid = pcntl_fork(); 22 if ($pid == -1) die("pcntl_fork failed"); 23 if ($pid != 0) { 25 pcntl_setns($pid, 0);
|
H A D | 001.phpt | 17 $pid=pcntl_fork(); 18 if ($pid==0) { 23 pcntl_waitpid($pid, $status, $options); 31 $pid=pcntl_fork(); 33 if ($pid==0) { 38 posix_kill($pid, SIGTERM); 39 pcntl_waitpid($pid, $status, $options); 53 $pid=pcntl_fork(); 55 if ($pid==0) { 60 posix_kill($pid, SIGSTOP); [all …]
|
H A D | pcntl_rfork_flags.phpt | 13 $pid = pcntl_rfork(RFFDG); 14 if ($pid > 0) { 16 var_dump($pid); 18 var_dump($pid); 22 $pid = pcntl_rfork(RFCFDG); 23 if ($pid > 0) { 25 var_dump($pid);
|
H A D | pcntl_waitpid_rusage1.phpt | 8 $pid = pcntl_fork(); 9 if ($pid == -1) { 11 } else if ($pid) { 13 var_dump(pcntl_waitpid($pid, $status, WUNTRACED, $rusage)); 17 posix_kill($pid, SIGCONT); 20 pcntl_waitpid($pid, $status, WUNTRACED, $rusage); 25 pcntl_waitpid($pid, $status, 0, $rusage); 30 pcntl_waitpid($pid, $status, 0, $rusage);
|
H A D | pcntl_rfork_nowait.phpt | 14 $pid = pcntl_rfork(RFNOWAIT|RFTSIGZMB,SIGUSR1); 15 if ($pid > 0) { 16 var_dump($pid); 18 var_dump($pid); 19 sleep(2); // as the child does not wait so we see its "pid"
|
H A D | 002.phpt | 20 $pid = pcntl_fork(); 21 if ($pid == -1) { 23 } else if ($pid) { 42 posix_kill($pid, SIGTERM); 52 echo "signo === pid\n"; 53 var_dump($siginfo['pid'] === $pid); 54 pcntl_waitpid($pid, $status); 77 signo === pid
|
H A D | waiting_on_sigchild_pcntl_wait.phpt | 17 while (($pid = pcntl_wait($status, WUNTRACED | WNOHANG)) > 0) { 19 unset($processes[$pid]); 26 $pid = proc_get_status($process)['pid']; 27 $processes[$pid] = $process;
|
H A D | pcntl_wait.phpt | 8 $pid = pcntl_fork(); 9 if ($pid == -1) { 11 } else if ($pid) { 15 posix_kill($pid, SIGCONT);
|
H A D | bug47566.phpt | 7 $pid = pcntl_fork(); 8 if ($pid == -1) { 11 } elseif ($pid) {
|
H A D | pcntl_fork_variation.phpt | 14 $pid = pcntl_fork(); 16 if ($pid > 0) { 18 echo "father is $pid\n"; 22 echo "father ($pid) doesn't know its grandsons\n"; 27 echo "son ($pid)\n";
|
H A D | pcntl_fork_basic.phpt | 14 $pid = pcntl_fork(); 15 if ($pid > 0) { 17 var_dump($pid); 19 var_dump($pid);
|
/php-src/sapi/fpm/fpm/ |
H A D | fpm_trace_ptrace.c | 27 int fpm_trace_signal(pid_t pid) /* {{{ */ in fpm_trace_signal() argument 29 if (0 > ptrace(PTRACE_ATTACH, pid, 0, 0)) { in fpm_trace_signal() 30 zlog(ZLOG_SYSERROR, "failed to ptrace(ATTACH) child %d", pid); in fpm_trace_signal() 37 int fpm_trace_ready(pid_t pid) /* {{{ */ in fpm_trace_ready() argument 39 traced_pid = pid; in fpm_trace_ready() 44 int fpm_trace_close(pid_t pid) /* {{{ */ in fpm_trace_close() argument 46 if (0 > ptrace(PTRACE_DETACH, pid, (void *) 1, 0)) { in fpm_trace_close() 47 zlog(ZLOG_SYSERROR, "failed to ptrace(DETACH) child %d", pid); in fpm_trace_close()
|
H A D | fpm_trace_pread.c | 22 int fpm_trace_signal(pid_t pid) /* {{{ */ in fpm_trace_signal() argument 24 if (0 > fpm_pctl_kill(pid, FPM_PCTL_STOP)) { in fpm_trace_signal() 25 zlog(ZLOG_SYSERROR, "failed to send SIGSTOP to %d", pid); in fpm_trace_signal() 32 int fpm_trace_ready(pid_t pid) /* {{{ */ in fpm_trace_ready() argument 36 snprintf(buf, sizeof(buf), "/proc/%d/" PROC_MEM_FILE, (int) pid); in fpm_trace_ready() 46 int fpm_trace_close(pid_t pid) /* {{{ */ in fpm_trace_close() argument
|
H A D | fpm_trace_mach.c | 44 int fpm_trace_signal(pid_t pid) /* {{{ */ in fpm_trace_signal() argument 46 if (0 > fpm_pctl_kill(pid, FPM_PCTL_STOP)) { in fpm_trace_signal() 47 zlog(ZLOG_SYSERROR, "failed to send SIGSTOP to %d", pid); in fpm_trace_signal() 54 int fpm_trace_ready(pid_t pid) /* {{{ */ in fpm_trace_ready() argument 58 kr = task_for_pid(mach_task_self(), pid, &target); in fpm_trace_ready() 72 int fpm_trace_close(pid_t pid) /* {{{ */ in fpm_trace_close() argument
|
H A D | fpm_trace.h | 8 int fpm_trace_signal(pid_t pid); 9 int fpm_trace_ready(pid_t pid); 10 int fpm_trace_close(pid_t pid);
|
H A D | fpm_children.c | 146 struct fpm_child_s *fpm_child_find(pid_t pid) /* {{{ */ in fpm_child_find() argument 154 if (child->pid == pid) { in fpm_child_find() 224 pid_t pid; in fpm_children_bury() local 227 while ( (pid = waitpid(-1, &status, WNOHANG | WUNTRACED)) > 0) { in fpm_children_bury() 232 child = fpm_child_find(pid); in fpm_children_bury() 275 zlog(ZLOG_NOTICE, "child %d stopped for tracing", (int) pid); in fpm_children_bury() 412 pid_t pid; in fpm_children_make() local 454 pid = fork(); in fpm_children_make() 456 switch (pid) { in fpm_children_make() 475 child->pid = pid; in fpm_children_make() [all …]
|
/php-src/ext/posix/tests/ |
H A D | posix_kill_error.phpt | 11 $pid = posix_getpid(); 13 var_dump( posix_kill($pid, 999) ); 15 echo "\n-- Testing posix_kill() function with negative pid --\n"; 16 $pid = -999; 18 var_dump( posix_kill($pid, 999) ); 28 -- Testing posix_kill() function with negative pid --
|
H A D | posix_getsid.phpt | 4 Get the current session id of a process pid (POSIX.1, 4.2.1) 15 $pid = posix_getpid(); 16 echo "\n-- Testing posix_getsid() function with current process pid --\n"; 17 var_dump( is_long(posix_getsid($pid)) ); 23 -- Testing posix_getsid() function with current process pid --
|
H A D | posix_getpgid_error.phpt | 15 echo "\n-- Testing posix_getpgid() with negative pid --\n"; 16 $pid = -99; 17 var_dump( posix_getpgid($pid) ); 24 -- Testing posix_getpgid() with negative pid --
|
/php-src/Zend/ |
H A D | zend_max_execution_timer.c | 53 pid_t pid = getpid(); in zend_max_execution_timer_init() local 55 if (EG(pid) == pid) { in zend_max_execution_timer_init() 80 EG(pid) = pid; in zend_max_execution_timer_init() 93 if (!EG(pid)) { in zend_max_execution_timer_settime() 121 if (EG(pid) != getpid()) { in zend_max_execution_timer_shutdown() 125 EG(pid) = 0; in zend_max_execution_timer_shutdown()
|
/php-src/ext/pdo_pgsql/tests/ |
H A D | bug68199.phpt | 24 $pid = $db->pgsqlGetPid(); 25 var_dump($pid > 0); 40 var_dump($notify[1] == $pid); 49 var_dump($notify['pid'] == $pid); 57 var_dump($notify[1] == $pid); 65 var_dump($notify['pid'] == $pid); 73 var_dump($notify['pid'] == $pid); 76 var_dump($notify[1] == $pid);
|
H A D | getnotify.phpt | 18 $pid = $db->pgsqlGetPid(); 19 var_dump($pid > 0); 34 var_dump($notify[1] == $pid); 42 var_dump($notify['pid'] == $pid); 49 var_dump($notify[1] == $pid); 56 var_dump($notify['pid'] == $pid); 63 var_dump($notify['pid'] == $pid); 65 var_dump($notify[1] == $pid);
|
/php-src/ext/standard/tests/http/ |
H A D | server.inc | 25 $pid = pcntl_fork(); 26 if ($pid == -1) { 28 } else if ($pid) { 30 'pid' => $pid, 121 function http_server_kill(int $pid) { 122 posix_kill($pid, SIGTERM); 123 pcntl_waitpid($pid, $status);
|