Home
last modified time | relevance | path

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

123

/bionic/libc/bionic/
Dtermios.cpp39 pid_t pid; in tcgetpgrp() local
40 return (ioctl(fd, TIOCGPGRP, &pid) == -1) ? -1 : pid; in tcgetpgrp()
44 int tcsetpgrp(int fd, pid_t pid) { in tcsetpgrp() argument
45 return ioctl(fd, TIOCSPGRP, &pid); in tcsetpgrp()
Draise.cpp37 pid_t pid = syscall(__NR_getpid); in raise() local
39 return tgkill(pid, tid, sig); in raise()
Dptrace.cpp32 extern "C" long __ptrace(int req, pid_t pid, void* addr, void* data);
40 pid_t pid = va_arg(args, pid_t); in ptrace() local
50 long result = __ptrace(req, pid, addr, data); in ptrace()
Dclock_getcpuclockid.cpp34 int clock_getcpuclockid(pid_t pid, clockid_t* clockid) { in clock_getcpuclockid() argument
38 clockid_t result = ~static_cast<clockid_t>(pid) << 3; in clock_getcpuclockid()
Dsched_getaffinity.cpp35 int sched_getaffinity(pid_t pid, size_t set_size, cpu_set_t* set) { in sched_getaffinity() argument
36 int rc = __sched_getaffinity(pid, set_size, set); in sched_getaffinity()
Dwait.cpp38 pid_t waitpid(pid_t pid, int* status, int options) { in waitpid() argument
39 return wait4(pid, status, options, nullptr); in waitpid()
Dpty.cpp158 pid_t pid = fork(); in forkpty() local
159 if (pid == -1) { in forkpty()
165 if (pid == 0) { in forkpty()
178 return pid; in forkpty()
Dsystem.cpp69 pid_t pid = TEMP_FAILURE_RETRY(waitpid(child, &status, 0)); in system() local
70 return (pid == -1 ? -1 : status); in system()
Dspawn.cpp151 pid_t pid = use_vfork ? vfork() : fork(); in posix_spawn() local
152 if (pid == -1) return errno; in posix_spawn()
154 if (pid == 0) { in posix_spawn()
164 if (pid_ptr) *pid_ptr = pid; in posix_spawn()
168 int posix_spawn(pid_t* pid, const char* path, const posix_spawn_file_actions_t* actions, in posix_spawn() argument
170 return posix_spawn(pid, path, actions, attr, argv, env, execve); in posix_spawn()
173 int posix_spawnp(pid_t* pid, const char* file, const posix_spawn_file_actions_t* actions, in posix_spawnp() argument
175 return posix_spawn(pid, file, actions, attr, argv, env, execvpe); in posix_spawnp()
/bionic/tests/
Dpthread_dlfcn_test.cpp59 pid_t pid = fork(); in TEST() local
61 ASSERT_NE(-1, pid) << strerror(errno); in TEST()
63 if (pid == 0) { in TEST()
74 AssertChildExited(pid, 0); in TEST()
76 pid = fork(); in TEST()
78 ASSERT_NE(-1, pid) << strerror(errno); in TEST()
80 if (pid == 0) { in TEST()
88 AssertChildExited(pid, 0); in TEST()
102 pid_t pid = fork(); in TEST() local
104 ASSERT_NE(-1, pid) << strerror(errno); in TEST()
[all …]
Dsys_select_test.cpp52 static void DelayedWrite(int* pid, int* fd) { in DelayedWrite() argument
56 if ((*pid = fork()) == 0) { in DelayedWrite()
63 ASSERT_LT(0, *pid); in DelayedWrite()
69 static void DelayedWriteCleanup(int pid, int fd) { in DelayedWriteCleanup() argument
74 AssertChildExited(pid, 0); in DelayedWriteCleanup()
115 int pid, fd; in TEST() local
116 DelayedWrite(&pid, &fd); in TEST()
125 DelayedWriteCleanup(pid, fd); in TEST()
170 int pid, fd; in TEST() local
171 DelayedWrite(&pid, &fd); in TEST()
[all …]
Dspawn_test.cpp192 pid_t pid; in TEST() local
193 ASSERT_EQ(0, posix_spawn(&pid, eth.GetArg0(), nullptr, nullptr, eth.GetArgs(), nullptr)); in TEST()
194 AssertChildExited(pid, 0); in TEST()
200 pid_t pid; in TEST() local
201 ASSERT_EQ(0, posix_spawn(&pid, eth.GetArg0(), nullptr, nullptr, eth.GetArgs(), nullptr)); in TEST()
202 AssertChildExited(pid, 127); in TEST()
208 pid_t pid; in TEST() local
209 ASSERT_EQ(0, posix_spawnp(&pid, eth.GetArg0(), nullptr, nullptr, eth.GetArgs(), nullptr)); in TEST()
210 AssertChildExited(pid, 0); in TEST()
216 pid_t pid; in TEST() local
[all …]
Dutils.h161 static inline void AssertChildExited(int pid, int expected_exit_status,
168 ASSERT_EQ(pid, TEMP_FAILURE_RETRY(waitpid(pid, &status, 0))) << *error_msg;
221 pid_t pid = fork(); in Run() local
222 ASSERT_NE(pid, -1); in Run()
224 if (pid == 0) { in Run()
245 AssertChildExited(pid, expected_exit_status, &error_msg); in Run()
Dpty_test.cpp58 pid_t pid = forkpty(&master, nullptr, nullptr, nullptr); in TEST() local
59 ASSERT_NE(-1, pid); in TEST()
61 if (pid == 0) { in TEST()
69 AssertChildExited(pid, 0); in TEST()
Dmalloc_iterate_test.cpp203 pid_t pid; in TEST() local
204 if ((pid = fork()) == 0) { in TEST()
213 ASSERT_NE(-1, pid); in TEST()
218 pid_t wait_pid = TEMP_FAILURE_RETRY(waitpid(pid, nullptr, WNOHANG)); in TEST()
220 kill(pid, SIGKILL); in TEST()
Dstdio_ext_test.cpp220 static void LockingByCallerHelper(std::atomic<pid_t>* pid) { in LockingByCallerHelper() argument
221 *pid = gettid(); in LockingByCallerHelper()
231 std::atomic<pid_t> pid(0); in TEST() local
233 reinterpret_cast<void* (*)(void*)>(LockingByCallerHelper), &pid)); in TEST()
234 WaitUntilThreadSleep(pid); in TEST()
Dfenv_test.cpp200 pid_t pid = fork(); in TEST()
201 ASSERT_NE(-1, pid) << strerror(errno); in TEST()
203 if (pid == 0) { in TEST()
212 AssertChildExited(pid, -SIGFPE); in TEST()
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_system_tests.cpp52 static void Exec(const char* test_name, const char* debug_options, pid_t* pid, int exit_code = 0, in Exec() argument
57 if ((*pid = fork()) == 0) { in Exec()
77 ASSERT_NE(-1, *pid); in Exec()
100 kill(*pid, SIGINT); in Exec()
110 int wait_pid = waitpid(*pid, &status, WNOHANG); in Exec()
111 if (*pid == wait_pid) { in Exec()
120 kill(*pid, SIGKILL); in Exec()
124 int wait_pid = waitpid(*pid, &kill_status, WNOHANG); in Exec()
125 if (wait_pid == *pid || (time(nullptr) - start_time) > timeout_seconds) { in Exec()
137 static void GetLogStr(pid_t pid, std::string* log_str, log_id log = LOG_ID_MAIN) { in GetLogStr() argument
[all …]
/bionic/libc/private/
Dbionic_inline_raise.h41 pid_t pid = syscall(__NR_getpid); variable
45 info.si_pid = pid;
50 register long r0 __asm__("r0") = pid;
57 register long x0 __asm__("x0") = pid;
64 syscall(__NR_rt_tgsigqueueinfo, pid, tid, sig, &info);
/bionic/libc/kernel/uapi/linux/
Dif_pppol2tp.h26 __kernel_pid_t pid; member
33 __kernel_pid_t pid; member
40 __kernel_pid_t pid; member
47 __kernel_pid_t pid; member
Ddlm_plock.h38 __u32 pid; member
/bionic/libc/include/android/
Dlegacy_sys_wait_inlines.h42 static __inline pid_t wait4(pid_t pid, int* status, int options, struct rusage* rusage) { in wait4() argument
43 return __BIONIC_CAST(static_cast, pid_t, syscall(__NR_wait4, pid, status, options, rusage)); in wait4()
/bionic/libc/upstream-openbsd/android/include/
Darc4random.h57 pid_t pid = getpid(); in _rs_forkdetect() local
59 if (_rs_pid == 0 || _rs_pid != pid || _rs_forked) { in _rs_forkdetect()
60 _rs_pid = pid; in _rs_forkdetect()
/bionic/libc/kernel/uapi/linux/dvb/
Dnet.h23 __u16 pid; member
33 __u16 pid; member
/bionic/libc/upstream-openbsd/lib/libc/net/
Dres_random.c231 pid_t pid; in __res_randomid() local
236 pid = getpid(); in __res_randomid()
240 if (ru_counter >= RU_MAX || ts.tv_sec > ru_reseed || pid != ru_pid) { in __res_randomid()
242 ru_pid = pid; in __res_randomid()

123