Home
last modified time | relevance | path

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

12345678910>>...40

/external/curl/tests/
Dftp.pm40 my $pid = 0;
43 $pid = 0 + <PIDFH>;
45 $pid = 0 unless($pid > 0);
47 return $pid;
57 my $pid = $_[0];
59 if($pid > 0) {
61 if(kill(0, $pid)) {
62 return $pid;
67 my $filter = "PID eq $pid";
69 if(index($result, "$pid") != -1) {
[all …]
Druntests.pl399 my $pid = $_[0];
400 if(not defined $pid || $pid <= 0) {
403 my $rc = waitpid($pid, &WNOHANG);
404 return ($rc == $pid)?1:0;
711 my $pid = processexists($pidfile);
712 if($pid > 0) {
714 killpid($verbose, $pid);
729 my $pid = 0;
789 $pid = 0+$1;
800 return $pid;
[all …]
/external/valgrind/coregrind/
Dvgdb-invoker-solaris.c89 static int write_memory(pid_t pid, CORE_ADDR memaddr, in write_memory() argument
93 snprintf(procname, sizeof(procname), "/proc/%d/as", pid); in write_memory()
127 static Bool attach(pid_t pid) in attach() argument
130 snprintf(procname, sizeof(procname), "/proc/%d/ctl", pid); in attach()
132 DEBUG(1, "Attaching to pid %d.\n", pid); in attach()
141 DEBUG(1, "Setting run-on-last-close-flag (PR_RLC) to pid %d.\n", pid); in attach()
154 DEBUG(1, "Stopping process %d.\n", pid); in attach()
165 DEBUG(1, "Process %d stopped.\n", pid); in attach()
168 snprintf(procname, sizeof(procname), "/proc/%d/status", pid); in attach()
184 DEBUG(2, "Process %d has run-on-last-close flag set. Good.\n", pid); in attach()
[all …]
Dvgdb-invoker-ptrace.c253 Bool waitstopped (pid_t pid, int signal_expected, const char *msg) in waitstopped() argument
263 p = waitpid(pid, &status, __WALL); in waitstopped()
264 DEBUG(1, "after waitpid pid %d p %d status 0x%x %s\n", pid, p, in waitstopped()
266 if (p != pid) { in waitstopped()
268 msg, pid, p, status, status_image (status)); in waitstopped()
309 res = ptrace (PTRACE_GETSIGINFO, pid, NULL, newsiginfo); in waitstopped()
317 res = ptrace (PTRACE_CONT, pid, NULL, 0); in waitstopped()
320 res = ptrace (PTRACE_CONT, pid, NULL, signal_received); in waitstopped()
335 Bool stop (pid_t pid, const char *msg) in stop() argument
339 DEBUG(1, "%s SIGSTOP pid %d\n", msg, pid); in stop()
[all …]
/external/strace/tests/
Dwait.c43 pid_t pid; in main() local
51 pid = fork(); in main()
52 assert(pid >= 0); in main()
53 if (!pid) { in main()
61 assert(wait4(pid, &s, WNOHANG | __WALL, NULL) == 0); in main()
62 assert(waitid(P_PID, pid, &info, WNOHANG | WEXITED) == 0); in main()
66 assert(wait4(pid, &s, 0, &rusage) == pid); in main()
69 pid = fork(); in main()
70 assert(pid >= 0); in main()
71 if (!pid) { in main()
[all …]
/external/strace/
Dstrace-graph42 my ($pid, $call, $args, $result, $time);
46 $pid = $1;
60 $unfinished{$pid} = $_;
65 unless (exists $unfinished{$pid}) {
69 $_ = $unfinished{$pid} . $_;
70 delete $unfinished{$pid};
81 handle_killed($pid, $time);
91 handle_trace($pid, $call, $args, $result, $time);
209 my ($pid, $call, $args, $result, $time) = @_;
212 if (defined $time and not defined $pr{$pid}{start}) {
[all …]
Dstrace.c365 ptrace_attach_or_seize(int pid) in ptrace_attach_or_seize() argument
369 return ptrace(PTRACE_ATTACH, pid, 0L, 0L); in ptrace_attach_or_seize()
370 r = ptrace(PTRACE_SEIZE, pid, 0L, (unsigned long) ptrace_setoptions); in ptrace_attach_or_seize()
373 r = ptrace(PTRACE_INTERRUPT, pid, 0L, 0L); in ptrace_attach_or_seize()
377 # define ptrace_attach_or_seize(pid) ptrace(PTRACE_ATTACH, (pid), 0, 0) argument
394 ptrace(op, tcp->pid, (void *) 0, (long) sig); in ptrace_restart()
424 perror_msg("ptrace(PTRACE_%s,pid:%d,sig:%d)", msg, tcp->pid, sig); in ptrace_restart()
450 static void kill_save_errno(pid_t pid, int sig) in kill_save_errno() argument
454 (void) kill(pid, sig); in kill_save_errno()
523 int pid; in strace_popen() local
[all …]
/external/chromium-trace/catapult/tracing/test_data/
Dsimple_trace_gz.gz ... 1[ 2 {"cat": "PERF", "pid": 22630, "tid": 22630, "ts": 826 ...
/external/chromium-trace/catapult/telemetry/telemetry/timeline/
Dmemory_dump_event_unittest.py11 def MakeRawMemoryDumpEvent(dump_id='123456ABCDEF', pid=1234, start=0, argument
26 event = {'ph': 'v', 'id': dump_id, 'pid': pid, 'ts': start * 1000,
37 def TestProcessDumpEvent(dump_id='123456ABCDEF', pid=1234, start=0, mmaps=None, argument
39 event = MakeRawMemoryDumpEvent(dump_id, pid, start, mmaps=mmaps,
42 process.pid = event['pid']
50 process.pid = 1234
53 pid=process.pid, allocators={
62 pid=process.pid, allocators={
124 process.pid = 1234
128 events = [MakeRawMemoryDumpEvent(pid=process.pid, allocators=allocators),
[all …]
/external/blktrace/btt/
Dproc.c30 __u32 pid; member
65 struct p_info * __find_process_pid(__u32 pid) in __find_process_pid() argument
72 if (pid < this->u.pid) in __find_process_pid()
74 else if (pid > this->u.pid) in __find_process_pid()
103 static void insert_pid(struct p_info *that, __u32 pid) in insert_pid() argument
113 if (pid < this->u.pid) in insert_pid()
115 else if (pid > this->u.pid) in insert_pid()
122 this->u.pid = pid; in insert_pid()
159 insert_pid(pip, pip->pid); in insert()
168 struct p_info *find_process(__u32 pid, char *name) in find_process() argument
[all …]
/external/autotest/client/bin/
Dparallel.py11 pid = os.fork()
12 if pid:
14 return pid
56 def _check_for_subprocess_exception(temp_dir, pid): argument
57 ename = temp_dir + "/debug/error-%d" % pid
81 def fork_waitfor(tmp, pid): argument
82 (pid, status) = os.waitpid(pid, 0)
84 _check_for_subprocess_exception(tmp, pid)
89 def fork_waitfor_timed(tmp, pid, timeout): argument
99 (child_pid, status) = os.waitpid(pid, os.WNOHANG)
[all …]
/external/libbrillo/brillo/
Dprocess_reaper_unittest.cc22 pid_t pid = fork(); in ForkChildAndExit() local
23 PCHECK(pid != -1); in ForkChildAndExit()
24 if (pid == 0) { in ForkChildAndExit()
27 return pid; in ForkChildAndExit()
31 pid_t pid = fork(); in ForkChildAndKill() local
32 PCHECK(pid != -1); in ForkChildAndKill()
33 if (pid == 0) { in ForkChildAndKill()
39 return pid; in ForkChildAndKill()
76 pid_t pid = ForkChildAndExit(123); in TEST_F() local
77 EXPECT_TRUE(process_reaper_.WatchForChild(FROM_HERE, pid, base::Bind( in TEST_F()
[all …]
/external/ltrace/sysdeps/linux-gnu/
Dbreakpoint.c41 arch_enable_breakpoint(pid_t pid, struct breakpoint *sbp) in arch_enable_breakpoint() argument
48 pid, sbp->addr, breakpoint_name(sbp)); in arch_enable_breakpoint()
51 long a = ptrace(PTRACE_PEEKTEXT, pid, in arch_enable_breakpoint()
56 pid, sbp->addr, breakpoint_name(sbp), in arch_enable_breakpoint()
68 a = ptrace(PTRACE_POKETEXT, pid, in arch_enable_breakpoint()
73 pid, sbp->addr, breakpoint_name(sbp), in arch_enable_breakpoint()
85 proc->pid, sbp->addr, breakpoint_name(sbp)); in enable_breakpoint()
86 arch_enable_breakpoint(proc->pid, sbp); in enable_breakpoint()
93 arch_disable_breakpoint(pid_t pid, const struct breakpoint *sbp) in arch_disable_breakpoint() argument
99 pid, sbp->addr, breakpoint_name(sbp)); in arch_disable_breakpoint()
[all …]
Dtrace.c59 trace_fail_warning(pid_t pid) in trace_fail_warning() argument
93 wait_for_proc(pid_t pid) in wait_for_proc() argument
99 if (waitpid(pid, NULL, __WALL) != pid) { in wait_for_proc()
108 trace_pid(pid_t pid) in trace_pid() argument
110 debug(DEBUG_PROCESS, "trace_pid: pid=%d", pid); in trace_pid()
114 if (ptrace(PTRACE_ATTACH, pid, 0, 0) < 0) in trace_pid()
117 return wait_for_proc(pid); in trace_pid()
126 pid_t pid = proc->pid; in trace_set_options() local
127 debug(DEBUG_PROCESS, "trace_set_options: pid=%d", pid); in trace_set_options()
132 if (ptrace(PTRACE_SETOPTIONS, pid, 0, (void *)options) < 0 && in trace_set_options()
[all …]
Devents.c60 event->proc->pid, event->type); in enque_event()
94 event->proc != NULL ? event->proc->pid : -1); in each_qd_event()
139 pid_t pid; in next_event() local
158 pid = waitpid(-1, &status, __WALL); in next_event()
161 if (pid == -1) { in next_event()
173 event.proc = pid2proc(pid); in next_event()
191 for (; i < 100 && process_status(pid) != PS_TRACING_STOP; ++i) { in next_event()
192 debug(2, "waiting for %d to stop", pid); in next_event()
196 event.e_un.newpid = pid; in next_event()
197 debug(DEBUG_EVENT, "event: NEW: pid=%d", pid); in next_event()
[all …]
/external/toybox/toys/pending/
Dinit.c27 pid_t pid; member
228 pid_t pid; in final_run() local
234 if (x->action & ASKFIRST) pid = fork(); in final_run()
235 else pid = vfork(); in final_run()
237 if (pid > 0) { in final_run()
243 return pid; in final_run()
244 } else if (pid < 0) { in final_run()
272 static struct action_list_seed* mark_as_terminated_process(pid_t pid) in mark_as_terminated_process() argument
276 if (pid > 0) { in mark_as_terminated_process()
278 if (x->pid == pid) { in mark_as_terminated_process()
[all …]
/external/libbrillo/brillo/minijail/
Dminijail.cc73 bool Minijail::Run(struct minijail* jail, vector<char*> args, pid_t* pid) { in Run() argument
74 return minijail_run_pid(jail, args[0], args.data(), pid) == 0; in Run()
78 pid_t pid; in RunSync() local
79 if (Run(jail, args, &pid) && waitpid(pid, status, 0) == pid) { in RunSync()
88 pid_t* pid, in RunPipe() argument
91 return minijail_run_pid_pipes_no_preload(jail, args[0], args.data(), pid, in RunPipe()
94 return minijail_run_pid_pipes(jail, args[0], args.data(), pid, stdin, NULL, in RunPipe()
101 pid_t* pid, in RunPipes() argument
106 return minijail_run_pid_pipes_no_preload(jail, args[0], args.data(), pid, in RunPipes()
109 return minijail_run_pid_pipes(jail, args[0], args.data(), pid, stdin, stdout, in RunPipes()
[all …]
/external/libunwind/src/ptrace/
D_UPT_access_reg.c45 pid_t pid = ui->pid; in _UPT_access_reg() local
65 nat_bits = ptrace (PTRACE_PEEKUSER, pid, PT_NAT_BITS, 0); in _UPT_access_reg()
80 ptrace (PTRACE_POKEUSER, pid, PT_NAT_BITS, nat_bits); in _UPT_access_reg()
105 psr = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IPSR, 0); in _UPT_access_reg()
117 ptrace (PTRACE_POKEUSER, pid, PT_CR_IIP, ip); in _UPT_access_reg()
118 ptrace (PTRACE_POKEUSER, pid, PT_CR_IPSR, psr); in _UPT_access_reg()
129 ip = ptrace (PTRACE_PEEKUSER, pid, PT_CR_IIP, 0); in _UPT_access_reg()
153 cfm = ptrace (PTRACE_PEEKUSER, pid, PT_CFM, 0); in _UPT_access_reg()
166 ptrace (PTRACE_POKEUSER, pid, PT_AR_BSP, bsp); in _UPT_access_reg()
177 bsp = ptrace (PTRACE_PEEKUSER, pid, PT_AR_BSP, 0); in _UPT_access_reg()
[all …]
/external/selinux/sepolgen/tests/
Daudit.txt1 type=AVC msg=audit(1158584779.745:708): avc: denied { dac_read_search } for pid=8132 comm="sh" c…
2 …cess=no exit=-13 a0=80d2437 a1=bf9132f8 a2=4c56cff4 a3=0 items=0 ppid=8131 pid=8132 auid=500 uid=0…
3 type=AVC msg=audit(1158584779.753:709): avc: denied { dac_override } for pid=8133 comm="vpnc-scr…
4 type=AVC msg=audit(1158584779.753:709): avc: denied { dac_read_search } for pid=8133 comm="vpnc-…
5 …cess=no exit=-13 a0=80d2437 a1=bf910a48 a2=4c56cff4 a3=0 items=0 ppid=8132 pid=8133 auid=500 uid=0…
6 type=AVC msg=audit(1158584779.825:710): avc: denied { dac_override } for pid=8134 comm="vpnc-scr…
7 type=AVC msg=audit(1158584779.825:710): avc: denied { dac_read_search } for pid=8134 comm="vpnc-…
8 …cess=no exit=-13 a0=80d2437 a1=bf910a48 a2=4c56cff4 a3=0 items=0 ppid=8132 pid=8134 auid=500 uid=0…
9 type=AVC msg=audit(1158584780.793:711): avc: denied { dac_override } for pid=8144 comm="sh" capa…
10 type=AVC msg=audit(1158584780.793:711): avc: denied { dac_read_search } for pid=8144 comm="sh" c…
[all …]
/external/google-breakpad/src/client/mac/tests/
Dcrash_generation_server_test.cc128 pid_t pid = fork(); in TEST_F() local
129 ASSERT_NE(-1, pid); in TEST_F()
130 if (pid == 0) { in TEST_F()
137 ASSERT_EQ(pid, waitpid(pid, &ret, 0)); in TEST_F()
157 self->child_pid = client_info.pid(); in dumpCallback()
180 pid_t pid = fork(); in TEST_F() local
181 ASSERT_NE(-1, pid); in TEST_F()
182 if (pid == 0) { in TEST_F()
195 ASSERT_EQ(pid, waitpid(pid, &ret, 0)); in TEST_F()
205 ASSERT_EQ(pid, child_pid); in TEST_F()
[all …]
/external/autotest/client/site_tests/security_ptraceRestrictions/src/
Dptrace-restrictions.sh16 pid=
24 pid=$!
31 disown $pid
32 kill $pid
49 pid=$!
50 OUT=$(gdb -ex "attach $pid" -ex "quit" --batch </dev/null 2>&1)
59 if ls -la /proc/$pid/exe >/dev/null 2>&1; then
84 disown $pid
85 kill $pid
89 OUT=$(gdb -ex "attach $pid" -ex "quit" --batch </dev/null 2>&1)
[all …]
Droot-ptrace-restrictions.sh13 pid=
21 pid=$!
23 disown $pid
27 while [ $(ps -p $pid -o comm=) != "sleeper" ]; do
28 pid=$(ps -ef | awk '{ if ($3 == '"$pid"') { print $2 }}')
29 if [ -z "$pid" ]; then
38 kill $pid
46 OUT=$(su -c 'gdb -ex "attach '"$pid"'" -ex "quit" --batch' $NONROOT \
59 OUT=$(su -c 'gdb -ex "attach '"$pid"'" -ex "quit" --batch' $NONROOT \
/external/v8/tools/testrunner/server/
Ddaemon.py39 pid = os.fork()
40 if pid > 0:
54 pid = os.fork()
55 if pid > 0:
75 pid = str(os.getpid())
76 file(self.pidfile, 'w+').write("%s\n" % pid)
88 pid = int(pf.read().strip())
91 pid = None
93 if pid:
109 pid = int(pf.read().strip())
[all …]
/external/libcap/libcap/
Dcap_proc.c49 int capgetp(pid_t pid, cap_t cap_d) in capgetp() argument
58 _cap_debug("getting process capabilities for proc %d", pid); in capgetp()
60 cap_d->head.pid = pid; in capgetp()
62 cap_d->head.pid = 0; in capgetp()
69 cap_t cap_get_pid(pid_t pid) in cap_get_pid() argument
75 if (capgetp(pid, result) != 0) { in cap_get_pid()
90 int capsetp(pid_t pid, cap_t cap_d) in capsetp() argument
99 _cap_debug("setting process capabilities for proc %d", pid); in capsetp()
100 cap_d->head.pid = pid; in capsetp()
103 cap_d->head.pid = 0; in capsetp()
/external/toybox/toys/other/
Dtaskset.c38 #define sched_setaffinity(pid, size, cpuset) \ argument
39 syscall(__NR_sched_setaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
40 #define sched_getaffinity(pid, size, cpuset) \ argument
41 syscall(__NR_sched_getaffinity, (pid_t)pid, (size_t)size, (void *)cpuset)
46 static void do_taskset(pid_t pid, int quiet) in do_taskset() argument
56 if (-1 == sched_getaffinity(pid, sizeof(toybuf), (void *)mask)) in do_taskset()
57 perror_exit(failed, "get", pid); in do_taskset()
59 printf("pid %d's %s affinity mask: ", pid, i ? "new" : "current"); in do_taskset()
86 if (-1 == sched_setaffinity(pid, sizeof(toybuf), (void *)mask)) in do_taskset()
87 perror_exit(failed, "set", pid); in do_taskset()
[all …]

12345678910>>...40