/third_party/rust/crates/rustix/tests/process/ |
H A D | id.rs | 53 assert_eq!(process::getppid(), process::getppid()); in test_getppid() 56 process::Pid::as_raw(process::getppid()) as libc::pid_t, in test_getppid() 57 libc::getppid() in test_getppid() 59 if let Some(ppid) = process::getppid() { in test_getppid() 60 assert_eq!(ppid.is_init(), libc::getppid() == 1); in test_getppid() 62 assert_eq!(libc::getppid(), 0); in test_getppid()
|
/kernel/linux/linux-6.6/tools/testing/selftests/cgroup/ |
H A D | test_kill.c | 48 int ppid = getppid(); in child_fn() 50 while (getppid() == ppid) in child_fn() 53 return getppid() == ppid; in child_fn() 211 ppid = getppid(); in forkbomb_fn() 213 while (getppid() == ppid) in forkbomb_fn() 216 return getppid() == ppid; in forkbomb_fn()
|
H A D | test_freezer.c | 123 int ppid = getppid(); in child_fn() 125 while (getppid() == ppid) in child_fn() 128 return getppid() == ppid; in child_fn() 347 ppid = getppid(); in forkbomb_fn() 349 while (getppid() == ppid) in forkbomb_fn() 352 return getppid() == ppid; in forkbomb_fn()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
H A D | 5-1.c | 50 kill(getppid(), SIGUSR1); in child_process() 56 kill(getppid(), SIGUSR1); in child_process() 63 kill(getppid(), SIGUSR1); in child_process()
|
/third_party/ltp/testcases/kernel/syscalls/kill/ |
H A D | kill10.c | 569 getppid()); in manager() 570 if (kill(getppid(), SIGUSR1) == -1) { in manager() 573 mypid, getppid(), errno, strerror(errno)); in manager() 593 mypid, getppid()); in manager() 594 if (kill(getppid(), SIGUSR2) == -1) { in manager() 597 mypid, getppid(), errno, in manager() 720 mypid, getppid()); in fork_procs() 721 if (kill(getppid(), SIGUSR2) == -1) { in fork_procs() 725 mypid, getppid(), errno, in fork_procs()
|
/third_party/ltp/testcases/kernel/syscalls/setpgid/ |
H A D | setpgid03.c | 47 TST_EXP_FAIL(setpgid(child_pid, getppid()), EPERM); in run() 60 TST_EXP_FAIL(setpgid(child_pid, getppid()), EACCES); in run()
|
/third_party/ltp/testcases/kernel/syscalls/sched_setparam/ |
H A D | sched_setparam05.c | 31 TST_EXP_FAIL(tv->sched_setparam(getppid(), &p), EPERM, in run() 32 "sched_setparam(%d, 0)", getppid()); in run()
|
/third_party/ltp/testcases/kernel/syscalls/clone/ |
H A D | clone08.c | 96 parent_ppid = getppid(); in test_clone_parent() 105 if (parent_ppid == getppid()) { in child_clone_parent() 108 tst_res(TFAIL, "getppid != parent_ppid (%d != %d)", in child_clone_parent() 109 parent_ppid, getppid()); in child_clone_parent()
|
/kernel/liteos_a/testsuites/unittest/process/basic/process/full/ |
H A D | process_test_051.cpp | 40 pid_t ppid = getppid(); in TestThread() 82 g_ppid = getppid(); in Testcase()
|
H A D | process_test_050.cpp | 38 pid_t ppid = getppid(); in TestThread() 67 g_ppid = getppid(); in Testcase()
|
H A D | process_test_052.cpp | 41 pid_t ppid = getppid(); in TestThread() 65 g_ppid = getppid(); in Testcase()
|
/third_party/musl/libc-test/src/regression/ |
H A D | daemon-failure.c | 53 if (getpid() != pid || getppid() == 1) in main() 55 getppid(), getpid(), pid); in main()
|
/kernel/linux/linux-5.10/tools/testing/selftests/cgroup/ |
H A D | test_freezer.c | 180 int ppid = getppid(); in child_fn() 182 while (getppid() == ppid) in child_fn() 185 return getppid() == ppid; in child_fn() 404 ppid = getppid(); in forkbomb_fn() 406 while (getppid() == ppid) in forkbomb_fn() 409 return getppid() == ppid; in forkbomb_fn()
|
/kernel/liteos_a/testsuites/unittest/container/full/ |
H A D | It_pid_container_020.cpp | 46 if (getppid() != 1) { in Child() 56 if (getppid() != 1) { in Child()
|
/kernel/liteos_a/testsuites/unittest/container/smoke/ |
H A D | It_time_container_003.cpp | 39 auto linkBuffer = ReadlinkContainer(getppid(), containerType); in childFunc() 46 ret = sprintf_s(targetpath, 100, "/proc/%d/container/time", getppid()); /* 100: test len */ in childFunc()
|
/kernel/linux/linux-6.6/tools/testing/selftests/net/af_unix/ |
H A D | scm_pidfd.c | 203 if (parent_pid != getppid()) { in cmsg_check() 204 log_err("wrong SCM_PIDFD %d != %d", parent_pid, getppid()); in cmsg_check() 361 if (peer_cred.pid != getppid()) { in FIXTURE_DATA() 362 log_err("peer_cred.pid != getppid(): %d != %d", peer_cred.pid, getppid()); in FIXTURE_DATA()
|
/kernel/linux/linux-6.6/tools/testing/selftests/mm/ |
H A D | mrelease_test.c | 22 int ppid = getppid(); in alloc_noexit() 44 while (getppid() == ppid && timeout > 0) { in alloc_noexit()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/ |
H A D | 16-1.c | 102 kill(getppid(), SIGABRT); in main() 106 kill(getppid(), SIGABRT); in main()
|
H A D | 5-3.c | 92 kill(getppid(), SIGABRT); in main() 96 kill(getppid(), SIGABRT); in main()
|
/third_party/musl/src/unistd/ |
H A D | getppid.c | 4 pid_t getppid(void) in getppid() function
|
/kernel/linux/linux-5.10/tools/testing/selftests/ptrace/ |
H A D | peeksiginfo.c | 168 pid_t ppid = getppid(); in main() 170 if (ppid != getppid()) in main()
|
/kernel/linux/linux-6.6/tools/testing/selftests/ptrace/ |
H A D | peeksiginfo.c | 168 pid_t ppid = getppid(); in main() 170 if (ppid != getppid()) in main()
|
/third_party/rust/crates/rustix/src/process/ |
H A D | id.rs | 256 /// `getppid()`—Returns the parent process' ID. 262 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/getppid.html 263 /// [Linux]: https://man7.org/linux/man-pages/man2/getppid.2.html 266 pub fn getppid() -> Option<Pid> { in getppid() functions 267 backend::process::syscalls::getppid() in getppid()
|
/third_party/rust/crates/rustix/examples/ |
H A D | process.rs | 12 println!("Parent Pid: {}", Pid::as_raw(getppid())); in main() 14 if let Some(ppid) = getppid() { in main()
|
/third_party/ltp/testcases/kernel/syscalls/getppid/ |
H A D | getppid01.c | 9 * Test whether parent process id that getppid() returns is out of range. 21 ppid = getppid(); in verify_getppid() 23 tst_res(TFAIL, "getppid() returned %d, out of range!", ppid); in verify_getppid() 25 tst_res(TPASS, "getppid() returned %d", ppid); in verify_getppid()
|