Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 1770) sorted by relevance

12345678910>>...71

/third_party/ltp/testcases/kernel/controllers/cpuctl_fj/
Drun_cpuctl_test_fj.sh132 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/
Dnuma01.sh32 local pid=$1
34 echo $(numastat -p $pid | sed '3q;d' | awk -F '[[:space:]][[:space:]]+' \
45 local pid=$1
46 local index=$(echo "$(get_node_index $pid $2)")
48 local numstat=$(numastat -p $pid |awk '/^Total/ {print $'$index'}')
60 local pid=$1
62 local state=$(awk '{print $3}' /proc/$pid/stat)
98 pid=$!
100 TST_RETRY_FUNC "check_for_support_numa $pid" 0
102 mem_curr=$(get_mem_cur $pid $node $MB)
[all …]
/third_party/musl/libc-test/src/functionalext/fortify/
Dunistd.c41 int pid = fork(); in unistd_dynamic_chk_001() local
42 switch (pid) { in unistd_dynamic_chk_001()
50 waitpid(pid, &status, WUNTRACED); in unistd_dynamic_chk_001()
54 kill(pid, SIGCONT); in unistd_dynamic_chk_001()
80 int pid = fork(); in unistd_dynamic_chk_002() local
81 switch (pid) { in unistd_dynamic_chk_002()
89 waitpid(pid, &status, WUNTRACED); in unistd_dynamic_chk_002()
93 kill(pid, SIGCONT); in unistd_dynamic_chk_002()
120 int pid = fork(); in unistd_dynamic_chk_003() local
121 switch (pid) { in unistd_dynamic_chk_003()
[all …]
Dstring_ext.c80 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 …]
Dfcntl_ext.c62 int pid = fork(); in open_0020() local
63 switch (pid) { in open_0020()
71 waitpid(pid, &status, WUNTRACED); in open_0020()
75 kill(pid, SIGCONT); in open_0020()
96 int pid = fork(); in open_0030() local
97 switch (pid) { in open_0030()
105 waitpid(pid, &status, WUNTRACED); in open_0030()
109 kill(pid, SIGCONT); in open_0030()
158 int pid = fork(); in openat_0020() local
159 switch (pid) { in openat_0020()
[all …]
Dstdio.c114 int pid = fork(); in stdio_dynamic_chk_003() local
115 switch (pid) { in stdio_dynamic_chk_003()
123 waitpid(pid, &status, WUNTRACED); in stdio_dynamic_chk_003()
127 kill(pid, SIGCONT); in stdio_dynamic_chk_003()
153 int pid = fork(); in stdio_dynamic_chk_004() local
154 switch (pid) { in stdio_dynamic_chk_004()
162 waitpid(pid, &status, WUNTRACED); in stdio_dynamic_chk_004()
166 kill(pid, SIGCONT); in stdio_dynamic_chk_004()
241 int pid = fork(); in stdio_dynamic_chk_007() local
242 switch (pid) { in stdio_dynamic_chk_007()
[all …]
/third_party/node/deps/npm/node_modules/worker-farm/tests/
Dindex.js25 child(0, function (err, pid, rnd) { argument
26 t.ok(pid > process.pid, 'pid makes sense')
27 t.ok(pid < process.pid + 750, 'pid makes sense')
42 child.run0(function (err, pid, rnd) { argument
43 t.ok(pid > process.pid, 'pid makes sense')
44 t.ok(pid < process.pid + 750, 'pid makes sense')
57 … let child = workerFarm({ onChild: function(subprocess) { childPid = subprocess.pid } }, childPath)
60 child(0, function(err, pid) { argument
61 t.equal(childPid, pid)
80 child(0, function (err, pid) { argument
[all …]
/third_party/ltp/testcases/kernel/sched/hyperthreading/ht_affinity/
Dht_affinity.c43 #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/
Dtst_sched.h21 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/
Dprocess.c37 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/
Dwait4.c36 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/
Dlinux.rs193 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/
Dwaitpid09.c28 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/
Dpid.c54 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/
Dgenload.c90 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 …]
Dstress.c90 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/
Dinit.c27 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/
Dcpuset_load_balance_test.sh87 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/libunwind/src/ptrace/
D_UPT_access_reg.c44 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/mbedtls/programs/ssl/
Dssl_fork_server.c97 int ret = 1, len, cnt = 0, pid; in main() local
241 pid = fork(); in main()
243 if( pid < 0 ) in main()
245 mbedtls_printf(" failed! fork returned %d\n\n", pid ); in main()
249 if( pid != 0 ) in main()
267 pid = getpid(); in main()
272 mbedtls_printf( "pid %d: Setting up the SSL data.\n", pid ); in main()
281 pid, ret ); in main()
289 pid, ret ); in main()
295 mbedtls_printf( "pid %d: SSL setup ok\n", pid ); in main()
[all …]
/third_party/musl/libc-test/src/functionalext/supplement/process/
Dwaitpid.c31 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/
Dmadvise08.c103 static int find_sequence(int pid) in find_sequence() argument
111 snprintf(dumpname, 256, "dump-%d", pid); in find_sequence()
157 pid_t pid; in run_child() local
161 pid = SAFE_FORK(); in run_child()
162 if (pid == 0) { in run_child()
174 SAFE_WAITPID(pid, &status, 0); in run_child()
176 return pid; in run_child()
188 pid_t pid; in run() local
191 pid = run_child(MADV_DONTDUMP); in run()
192 if (pid && find_sequence(pid)) in run()
[all …]
/third_party/toybox/tests/
Dpidof.test14 (./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
/third_party/ltp/testcases/kernel/controllers/cgroup_fj/
Dcgroup_fj_stress.sh110 pid=$!
111 collected_pids="$collected_pids $pid"
113 pid="$ppid"
116 if ! attach_and_check "$pid" "$cur_path"; then
126 if ! attach_and_check "$pid" "$cur_path"; then
143 pid=$!
146 attach_task "$start_path" 0 "$pid"
147 ROD kill -9 "$pid"
148 wait "$pid"
153 for pid in $collected_pids; do
[all …]
/third_party/musl/libc-test/src/functional/
Dvfork.c10 static int w(pid_t pid) in w() argument
13 r = waitpid(pid, &s, 0); in w()
16 else if (r != pid) in w()
17 t_error("child pid was %d, waitpid returned %d\n", pid, r); in w()
25 pid_t pid; in test_exit() local
26 if((pid = vfork()) == 0) { in test_exit()
30 if (pid == -1) { in test_exit()
34 int r = w(pid); in test_exit()
41 pid_t pid; in sh() local
42 if((pid = vfork()) == 0) { in sh()
[all …]

12345678910>>...71