/third_party/curl/tests/ |
D | processhelp.pm | 97 my $pid = 0; 100 $pid = 0 + <$pidfh>; 102 $pid = 0 if($pid < 0); 104 return $pid; 114 my $pid = $_[0]; 116 if($pid > 0) { 118 if ($pid > 65536 && os_is_win()) { 119 $pid -= 65536; 121 my $filter = "PID eq $pid"; 123 if(index($result, "$pid") != -1) { [all …]
|
D | servers.pm | 299 my $pid = $_[0]; 300 if((not defined $pid) || $pid <= 0) { 304 my $rc = pidwait($pid, &WNOHANG); 305 return ($rc == $pid)?1:0; 504 my $pid = processexists($pidfile); 505 if($pid > 0) { 514 killpid($verbose, $pid); 599 my $pid = 0; 601 $pid = 0+$1; 612 return $pid; [all …]
|
/third_party/musl/libc-test/src/functionalext/fortify/ |
D | invalid_param.c | 41 pid_t pid = fork(); in clearerr_0100() local 42 if (pid == -1) { in clearerr_0100() 44 } else if (pid == 0) { in clearerr_0100() 48 waitpid(pid, &status, 0); in clearerr_0100() 63 pid_t pid = fork(); in feof_0100() local 64 if (pid == -1) { in feof_0100() 66 } else if (pid == 0) { in feof_0100() 70 waitpid(pid, &status, 0); in feof_0100() 85 pid_t pid = fork(); in ferror_0100() local 86 if (pid == -1) { in ferror_0100() [all …]
|
D | unistd.c | 42 int pid = fork(); in unistd_dynamic_chk_001() local 43 switch (pid) { in unistd_dynamic_chk_001() 51 waitpid(pid, &status, WUNTRACED); in unistd_dynamic_chk_001() 55 kill(pid, SIGCONT); in unistd_dynamic_chk_001() 81 int pid = fork(); in unistd_dynamic_chk_002() local 82 switch (pid) { in unistd_dynamic_chk_002() 90 waitpid(pid, &status, WUNTRACED); in unistd_dynamic_chk_002() 94 kill(pid, SIGCONT); in unistd_dynamic_chk_002() 121 int pid = fork(); in unistd_dynamic_chk_003() local 122 switch (pid) { in unistd_dynamic_chk_003() [all …]
|
D | string_ext.c | 80 int pid = fork(); in test_strcat_0020() local 81 switch (pid) { in test_strcat_0020() 89 waitpid(pid, &status, WUNTRACED); in test_strcat_0020() 93 kill(pid, SIGCONT); in test_strcat_0020() 131 int pid = fork(); in test_strncat_0020() local 132 switch (pid) { in test_strncat_0020() 140 waitpid(pid, &status, WUNTRACED); in test_strncat_0020() 144 kill(pid, SIGCONT); in test_strncat_0020() 179 int pid = fork(); in test_stpcpy_0020() local 180 switch (pid) { in test_stpcpy_0020() [all …]
|
D | fcntl_ext.c | 63 int pid = fork(); in open_0020() local 64 switch (pid) { in open_0020() 72 waitpid(pid, &status, WUNTRACED); in open_0020() 76 kill(pid, SIGCONT); in open_0020() 97 int pid = fork(); in open_0030() local 98 switch (pid) { in open_0030() 106 waitpid(pid, &status, WUNTRACED); in open_0030() 110 kill(pid, SIGCONT); in open_0030() 159 int pid = fork(); in openat_0020() local 160 switch (pid) { in openat_0020() [all …]
|
D | stdio.c | 115 int pid = fork(); in stdio_dynamic_chk_003() local 116 switch (pid) { in stdio_dynamic_chk_003() 124 waitpid(pid, &status, WUNTRACED); in stdio_dynamic_chk_003() 128 kill(pid, SIGCONT); in stdio_dynamic_chk_003() 154 int pid = fork(); in stdio_dynamic_chk_004() local 155 switch (pid) { in stdio_dynamic_chk_004() 163 waitpid(pid, &status, WUNTRACED); in stdio_dynamic_chk_004() 167 kill(pid, SIGCONT); in stdio_dynamic_chk_004() 242 int pid = fork(); in stdio_dynamic_chk_007() local 243 switch (pid) { in stdio_dynamic_chk_007() [all …]
|
/third_party/ltp/testcases/kernel/controllers/cpuctl_fj/ |
D | run_cpuctl_test_fj.sh | 132 ps -eo pid,rtprio > /tmp/pids_file1 & 138 while read pid 140 task=`cat $CPUCTL/tasks | grep "\b$pid\b"` 285 pid=$! 287 echo $pid > $CPUCTL/tmp/tasks 289 /bin/kill -s SIGUSR1 $pid 291 /bin/kill -s SIGUSR1 $pid 292 wait $pid 313 pid=$! 315 echo $pid > $CPUCTL/tmp/tasks [all …]
|
/third_party/ltp/testcases/kernel/numa/ |
D | numa01.sh | 30 local pid=$1 32 echo $(numastat -p $pid | sed '3q;d' | awk -F '[[:space:]][[:space:]]+' \ 43 local pid=$1 44 local index=$(echo "$(get_node_index $pid $2)") 46 local numstat=$(numastat -p $pid |awk '/^Total/ {print $'$index'}') 58 local pid=$1 60 local state=$(awk '{print $3}' /proc/$pid/stat) 96 pid=$! 98 TST_RETRY_FUNC "check_for_support_numa $pid" 0 100 mem_curr=$(get_mem_cur $pid $node $MB) [all …]
|
/third_party/ltp/testcases/kernel/sched/hyperthreading/ht_affinity/ |
D | ht_affinity.c | 43 #define sched_setaffinity(pid, cpusetsize, mask) syscall(__NR_sched_setaffinity, pid, cpusetsize, m… argument 44 #define sched_getaffinity(pid, cpusetsize, mask) syscall(__NR_sched_getaffinity, pid, cpusetsize, m… argument 52 pid_t pid; in HT_SetAffinity() local 56 pid = getpid(); in HT_SetAffinity() 70 sched_setaffinity(pid, sizeof(unsigned long), &mask); in HT_SetAffinity() 82 if (get_current_cpu(pid) != i) in HT_SetAffinity() 98 sched_setaffinity(pid, sizeof(unsigned long), &mask); in HT_SetAffinity() 110 cpuid = get_current_cpu(pid); in HT_SetAffinity() 129 unsigned long get_porc_affinity(pid_t pid) in get_porc_affinity() argument 133 sprintf(buf, "%s%d/%s%c", PROCFS_PATH, pid, AFFINITY_NAME, 0); in get_porc_affinity() [all …]
|
/third_party/ltp/include/ |
D | tst_sched.h | 21 static inline int sys_sched_setparam(pid_t pid, const struct sched_param *param) in sys_sched_setparam() argument 23 return tst_syscall(__NR_sched_setparam, pid, param); in sys_sched_setparam() 26 static inline int sys_sched_getparam(pid_t pid, struct sched_param *param) in sys_sched_getparam() argument 28 return tst_syscall(__NR_sched_getparam, pid, param); in sys_sched_getparam() 31 static inline int sys_sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) in sys_sched_setscheduler() argument 33 return tst_syscall(__NR_sched_setscheduler, pid, policy, param); in sys_sched_setscheduler() 36 static inline int sys_sched_getscheduler(pid_t pid) in sys_sched_getscheduler() argument 38 return tst_syscall(__NR_sched_getscheduler, pid); in sys_sched_getscheduler() 41 static inline int libc_sched_setparam(pid_t pid, const struct sched_param *param) in libc_sched_setparam() argument 43 return TST_LIBC_SCHED_SCALL_(sched_setparam, pid, param); in libc_sched_setparam() [all …]
|
/third_party/cups-filters/filter/foomatic-rip/ |
D | process.c | 37 pid_t pid; member 49 void add_process(const char *name, int pid, int isgroup) in add_process() argument 53 if (procs[i].pid == -1) { in add_process() 55 procs[i].pid = pid; in add_process() 63 int find_process(int pid) in find_process() argument 67 if (procs[i].pid == pid) in find_process() 76 procs[i].pid = -1; in clear_proc_list() 84 if (procs[i].pid == -1) in kill_all_processes() 87 kill(procs[i].isgroup ? -procs[i].pid : procs[i].pid, 15); in kill_all_processes() 89 kill(procs[i].isgroup ? -procs[i].pid : procs[i].pid, 9); in kill_all_processes() [all …]
|
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
D | wait4.c | 36 pid_t pid = fork(); in wait4_0100() local 37 if (pid > 0) { in wait4_0100() 41 pid_t wait4_for_pind = wait4(pid, &status, options, &ru); in wait4_0100() 42 if (wait4_for_pind != pid) { in wait4_0100() 43 t_error("%s wait4 get pid is %d are not want %d\n", __func__, wait4_for_pind, pid); in wait4_0100() 48 } else if (pid == 0) { in wait4_0100() 63 pid_t pid = fork(); in wait4_0200() local 64 if (pid > 0) { in wait4_0200() 68 pid_t wait4_for_pind = wait4(pid, &status, options, &ru); in wait4_0200() 69 if (wait4_for_pind != pid) { in wait4_0200() [all …]
|
/third_party/rust/crates/nix/src/sys/ptrace/ |
D | linux.rs | 193 pid: Pid, in ptrace_peek() 199 libc::ptrace(request as RequestType, libc::pid_t::from(pid), addr, data) in ptrace_peek() 218 pub fn getregs(pid: Pid) -> Result<user_regs_struct> { in getregs() 219 ptrace_get_data::<user_regs_struct>(Request::PTRACE_GETREGS, pid) in getregs() 233 pub fn setregs(pid: Pid, regs: user_regs_struct) -> Result<()> { in setregs() 237 libc::pid_t::from(pid), in setregs() 249 fn ptrace_get_data<T>(request: Request, pid: Pid) -> Result<T> { in ptrace_get_data() 254 libc::pid_t::from(pid), in ptrace_get_data() 265 pid: Pid, in ptrace_other() 271 libc::pid_t::from(pid), in ptrace_other() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/waitpid/ |
D | waitpid09.c | 28 static void cleanup_pid(pid_t pid) in cleanup_pid() argument 30 if (pid > 0) { in cleanup_pid() 31 kill(pid, SIGKILL); in cleanup_pid() 32 waitpid(pid, NULL, 0); in cleanup_pid() 38 pid_t pid, ret; in case0() local 41 pid = SAFE_FORK(); in case0() 42 if (pid == 0) { in case0() 49 ret = waitpid(pid, &status, WNOHANG); in case0() 59 cleanup_pid(pid); in case0() 64 SAFE_WAITPID(pid, NULL, 0); in case0() [all …]
|
/third_party/pulseaudio/src/pulsecore/ |
D | pid.c | 54 uint32_t pid; in read_pid() local 71 if (pa_atou(t, &pid) < 0) { in read_pid() 77 return (pid_t) pid; in read_pid() 136 static int proc_name_ours(pid_t pid, const char *procname) { in proc_name_ours() argument 141 pa_snprintf(bn, sizeof(bn), "/proc/%lu/stat", (unsigned long) pid); in proc_name_ours() 162 expected = pa_sprintf_malloc("%lu (%s)", (unsigned long) pid, procname); in proc_name_ours() 169 expected = pa_sprintf_malloc("%lu (lt-%s)", (unsigned long) pid, procname); in proc_name_ours() 189 pid_t pid; local 203 if ((pid = read_pid(fn, fd)) == (pid_t) -1) 205 else if (pid > 0) { [all …]
|
/third_party/ltp/tools/genload/ |
D | genload.c | 90 int i, pid, children = 0, retval = 0; in main() local 203 switch (pid = fork()) { in main() 213 dbg(stdout, "--> hogcpu dispatcher forked (%i)\n", pid); in main() 221 switch (pid = fork()) { in main() 231 dbg(stdout, "--> hogio dispatcher forked (%i)\n", pid); in main() 241 switch (pid = fork()) { in main() 251 dbg(stdout, "--> hogvm dispatcher forked (%i)\n", pid); in main() 260 switch (pid = fork()) { in main() 272 dbg(stdout, "--> hoghdd dispatcher forked (%i)\n", pid); in main() 284 if ((pid = wait(&status)) > 0) { in main() [all …]
|
D | stress.c | 90 int i, pid, children = 0, retval = 0; in main() local 203 switch (pid = fork()) { in main() 213 dbg(stdout, "--> hogcpu dispatcher forked (%i)\n", pid); in main() 221 switch (pid = fork()) { in main() 231 dbg(stdout, "--> hogio dispatcher forked (%i)\n", pid); in main() 241 switch (pid = fork()) { in main() 251 dbg(stdout, "--> hogvm dispatcher forked (%i)\n", pid); in main() 260 switch (pid = fork()) { in main() 272 dbg(stdout, "--> hoghdd dispatcher forked (%i)\n", pid); in main() 284 if ((pid = wait(&status)) > 0) { in main() [all …]
|
/third_party/toybox/toys/pending/ |
D | init.c | 27 pid_t pid; member 191 if (!(*y)->pid) { in reload_inittab() 241 pid_t pid; in final_run() local 247 if (x->action & ASKFIRST) pid = fork(); in final_run() 248 else pid = vfork(); in final_run() 250 if (pid > 0) { in final_run() 256 return pid; in final_run() 257 } else if (pid < 0) { in final_run() 285 static struct action_list_seed* mark_as_terminated_process(pid_t pid) in mark_as_terminated_process() argument 289 if (pid > 0) { in mark_as_terminated_process() [all …]
|
/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/ |
D | cpuset_load_balance_test.sh | 87 pid=$! 97 cpuset_set_opt "$g_path" "tasks" "$pid" 2> $CPUSET_TMP/stderr 102 /bin/kill -s SIGKILL $pid 108 /bin/kill -s SIGUSR1 $pid 2> $CPUSET_TMP/stderr 113 /bin/kill -s SIGKILL $pid 125 /bin/kill -s SIGUSR1 $pid 2> $CPUSET_TMP/stderr 130 /bin/kill -s SIGUSR2 $pid 135 /bin/kill -s SIGUSR2 $pid 2> $CPUSET_TMP/stderr 143 wait $pid 168 local pid= [all …]
|
/third_party/mbedtls/programs/ssl/ |
D | ssl_fork_server.c | 86 int ret = 1, len, cnt = 0, pid; in main() local 221 pid = fork(); in main() 223 if (pid < 0) { in main() 224 mbedtls_printf(" failed! fork returned %d\n\n", pid); in main() 228 if (pid != 0) { in main() 244 pid = getpid(); in main() 249 mbedtls_printf("pid %d: Setting up the SSL data.\n", pid); in main() 257 pid, ret); in main() 264 pid, ret); in main() 270 mbedtls_printf("pid %d: SSL setup ok\n", pid); in main() [all …]
|
/third_party/libunwind/libunwind/src/ptrace/ |
D | _UPT_access_reg.c | 44 pid_t pid = ui->pid; in _UPT_access_reg() local 66 if (ptrace (PTRACE_GETREGSET, pid, NT_PRSTATUS, &loc) == -1) in _UPT_access_reg() 70 if (ptrace(PTRACE_SETREGSET, pid, NT_PRSTATUS, &loc) == -1) in _UPT_access_reg() 86 pid_t pid = ui->pid; in _UPT_access_reg() local 106 nat_bits = ptrace (PTRACE_PEEKUSER, pid, PT_NAT_BITS, 0); in _UPT_access_reg() 121 ptrace (PTRACE_POKEUSER, pid, PT_NAT_BITS, nat_bits); in _UPT_access_reg() 146 psr = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IPSR, 0); in _UPT_access_reg() 158 ptrace (PTRACE_POKEUSER, pid, PT_CR_IIP, ip); in _UPT_access_reg() 159 ptrace (PTRACE_POKEUSER, pid, PT_CR_IPSR, psr); in _UPT_access_reg() 170 ip = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IIP, 0); in _UPT_access_reg() [all …]
|
/third_party/musl/libc-test/src/functionalext/supplement/process/ |
D | waitpid.c | 31 pid_t pid = fork(); in waitpid_0100() local 32 if (pid > 0) { in waitpid_0100() 35 pid_t waitpid_for_pind = waitpid(pid, &status, options); in waitpid_0100() 36 if (waitpid_for_pind != pid) { in waitpid_0100() 37 t_error("%s waitpid get pid is %d are not want %d\n", __func__, waitpid_for_pind, pid); in waitpid_0100() 42 } else if (pid == 0) { in waitpid_0100() 57 pid_t pid = fork(); in waitpid_0200() local 58 if (pid > 0) { in waitpid_0200() 61 pid_t waitpid_for_pind = waitpid(pid, &status, options); in waitpid_0200() 62 if (waitpid_for_pind != pid) { in waitpid_0200() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/madvise/ |
D | madvise08.c | 103 static int find_sequence(int pid) in find_sequence() argument 111 snprintf(dumpname, 256, "dump-%d", pid); in find_sequence() 156 pid_t pid; in run_child() local 160 pid = SAFE_FORK(); in run_child() 161 if (pid == 0) { in run_child() 173 SAFE_WAITPID(pid, &status, 0); in run_child() 175 return pid; in run_child() 187 pid_t pid; in run() local 190 pid = run_child(MADV_DONTDUMP); in run() 191 if (pid && find_sequence(pid)) in run() [all …]
|
/third_party/toybox/tests/ |
D | pidof.test | 14 (./pidof-$$.test & echo $! > pid.txt) 15 pid=$(cat pid.txt) 17 testcmd "short argv[1] -x" "-x pidof-$$.test" "$pid\n" "" "" 18 kill $pid 20 (./toybox.pidof-$$.test.script & echo $! > pid.txt) 21 pid=$(cat pid.txt) 23 testcmd "long argv[1] -x" "-x toybox.pidof-$$.test.script" "$pid\n" "" "" 24 kill $pid 26 rm -f toybox.pidof-$$.test.script pidof-$$.test pid.txt
|