/bionic/tests/ |
D | pthread_dlfcn_test.cpp | 59 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 …]
|
D | sys_wait_test.cpp | 34 pid_t pid = fork(); in TEST() local 35 ASSERT_NE(pid, -1); in TEST() 37 if (pid == 0) _exit(66); in TEST() 40 ASSERT_EQ(0, waitid(P_PID, pid, &si, WEXITED)); in TEST() 41 ASSERT_EQ(pid, si.si_pid); in TEST()
|
D | spawn_test.cpp | 196 pid_t pid; in TEST() local 197 ASSERT_EQ(0, posix_spawn(&pid, eth.GetArg0(), nullptr, nullptr, eth.GetArgs(), nullptr)); in TEST() 198 AssertChildExited(pid, 0); in TEST() 204 pid_t pid; in TEST() local 205 ASSERT_EQ(0, posix_spawn(&pid, eth.GetArg0(), nullptr, nullptr, eth.GetArgs(), nullptr)); in TEST() 206 AssertChildExited(pid, 127); in TEST() 212 pid_t pid; in TEST() local 213 ASSERT_EQ(0, posix_spawnp(&pid, eth.GetArg0(), nullptr, nullptr, eth.GetArgs(), nullptr)); in TEST() 214 AssertChildExited(pid, 0); in TEST() 220 pid_t pid; in TEST() local [all …]
|
D | sys_select_test.cpp | 52 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 …]
|
D | utils.h | 166 static inline void AssertChildExited(int pid, int expected_exit_status, 173 ASSERT_EQ(pid, TEMP_FAILURE_RETRY(waitpid(pid, &status, 0))) << *error_msg; 230 pid_t pid = fork(); in Run() local 231 ASSERT_NE(pid, -1); in Run() 233 if (pid == 0) { in Run() 254 AssertChildExited(pid, expected_exit_status, &error_msg); in Run()
|
D | pty_test.cpp | 58 pid_t pid = forkpty(&pty, 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()
|
D | stdio_ext_test.cpp | 238 static void LockingByCallerHelper(std::atomic<pid_t>* pid) { in LockingByCallerHelper() argument 239 *pid = gettid(); in LockingByCallerHelper() 249 std::atomic<pid_t> pid(0); in TEST() local 251 reinterpret_cast<void* (*)(void*)>(LockingByCallerHelper), &pid)); in TEST() 252 WaitUntilThreadSleep(pid); in TEST()
|
/bionic/libc/bionic/ |
D | termios.cpp | 43 pid_t pid; in tcgetpgrp() local 44 return (ioctl(fd, TIOCGPGRP, &pid) == -1) ? -1 : pid; in tcgetpgrp() 48 int tcsetpgrp(int fd, pid_t pid) { in tcsetpgrp() argument 49 return ioctl(fd, TIOCSPGRP, &pid); in tcsetpgrp()
|
D | pidfd.cpp | 33 extern "C" int __pidfd_open(pid_t pid, unsigned int flags); 36 int pidfd_open(pid_t pid, unsigned int flags) { in pidfd_open() argument 37 return FDTRACK_CREATE(__pidfd_open(pid, flags)); in pidfd_open()
|
D | ptrace.cpp | 32 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()
|
D | raise.cpp | 37 pid_t pid = syscall(__NR_getpid); in raise() local 39 return tgkill(pid, tid, sig); in raise()
|
D | clock_getcpuclockid.cpp | 34 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()
|
D | sched_getaffinity.cpp | 35 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()
|
D | pty.cpp | 158 pid_t pid = fork(); in forkpty() local 159 if (pid == -1) { in forkpty() 165 if (pid == 0) { in forkpty() 178 return pid; in forkpty()
|
D | wait.cpp | 38 pid_t waitpid(pid_t pid, int* status, int options) { in waitpid() argument 39 return wait4(pid, status, options, nullptr); in waitpid()
|
D | spawn.cpp | 197 pid_t pid = use_vfork ? vfork() : fork(); in posix_spawn() local 198 if (pid == -1) return errno; in posix_spawn() 200 if (pid == 0) { in posix_spawn() 210 if (pid_ptr) *pid_ptr = pid; in posix_spawn() 214 int posix_spawn(pid_t* pid, const char* path, const posix_spawn_file_actions_t* actions, in posix_spawn() argument 216 return posix_spawn(pid, path, actions, attr, argv, env, execve); in posix_spawn() 219 int posix_spawnp(pid_t* pid, const char* file, const posix_spawn_file_actions_t* actions, in posix_spawnp() argument 221 return posix_spawn(pid, file, actions, attr, argv, env, execvpe); in posix_spawnp()
|
D | system.cpp | 69 pid_t pid = TEMP_FAILURE_RETRY(waitpid(child, &status, 0)); in system() local 70 return (pid == -1 ? -1 : status); in system()
|
/bionic/benchmarks/ |
D | unistd_benchmark.cpp | 43 pid_t pid; in BM_unistd_fork_call() local 44 if ((pid = fork()) == 0) { in BM_unistd_fork_call() 51 if (pid == -1) { in BM_unistd_fork_call() 55 pid_t wait_pid = waitpid(pid, 0, 0); in BM_unistd_fork_call() 56 if (wait_pid != pid) { in BM_unistd_fork_call() 62 "waitpid return an unknown pid, expected %d, actual %d", pid, wait_pid); in BM_unistd_fork_call()
|
/bionic/libc/private/ |
D | bionic_inline_raise.h | 41 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 register long a0 __asm__("a0") = pid; 72 register long rdi __asm__("rdi") = pid; 82 syscall(__NR_rt_tgsigqueueinfo, pid, tid, sig, &info);
|
/bionic/libc/kernel/uapi/linux/ |
D | if_pppol2tp.h | 14 __kernel_pid_t pid; member 21 __kernel_pid_t pid; member 28 __kernel_pid_t pid; member 35 __kernel_pid_t pid; member
|
/bionic/tests/libs/ |
D | tls_properties_helper.cpp | 95 pid_t pid = fork(); in test_iterate_another_thread_tls() local 96 assert(pid != -1); in test_iterate_another_thread_tls() 98 if (pid) { in test_iterate_another_thread_tls() 100 assert(pid == wait(&status)); in test_iterate_another_thread_tls()
|
D | stack_tagging_helper.cpp | 113 __attribute__((no_sanitize("memtag"), optnone, noinline)) void vfork_parent(pid_t pid) { in vfork_parent() argument 128 int res = waitpid(pid, &wstatus, 0); in vfork_parent() 129 CHECK(res == pid); in vfork_parent() 139 pid_t pid = vfork(); in test_vfork() local 140 if (pid == 0) { in test_vfork() 143 vfork_parent(pid); in test_vfork()
|
/bionic/libc/upstream-openbsd/android/include/ |
D | arc4random.h | 49 pid_t pid = getpid(); in _rs_forkdetect() local 51 if (_rs_pid == 0 || _rs_pid != pid || _rs_forked) { in _rs_forkdetect() 52 _rs_pid = pid; in _rs_forkdetect()
|
/bionic/libc/kernel/uapi/linux/dvb/ |
D | net.h | 11 __u16 pid; member 21 __u16 pid; member
|
/bionic/libc/upstream-openbsd/lib/libc/net/ |
D | res_random.c | 231 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()
|