Home
last modified time | relevance | path

Searched refs:getppid (Results 1 - 25 of 149) sorted by relevance

123456

/third_party/rust/crates/rustix/tests/process/
H A Did.rs53 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 Dtest_kill.c48 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 Dtest_freezer.c123 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 D5-1.c50 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 Dkill10.c569 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 Dsetpgid03.c47 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 Dsched_setparam05.c31 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 Dclone08.c96 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 Dprocess_test_051.cpp40 pid_t ppid = getppid(); in TestThread()
82 g_ppid = getppid(); in Testcase()
H A Dprocess_test_050.cpp38 pid_t ppid = getppid(); in TestThread()
67 g_ppid = getppid(); in Testcase()
H A Dprocess_test_052.cpp41 pid_t ppid = getppid(); in TestThread()
65 g_ppid = getppid(); in Testcase()
/third_party/musl/libc-test/src/regression/
H A Ddaemon-failure.c53 if (getpid() != pid || getppid() == 1) in main()
55 getppid(), getpid(), pid); in main()
/kernel/liteos_a/testsuites/unittest/container/full/
H A DIt_pid_container_020.cpp46 if (getppid() != 1) { in Child()
56 if (getppid() != 1) { in Child()
/kernel/liteos_a/testsuites/unittest/container/smoke/
H A DIt_time_container_003.cpp39 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-5.10/tools/testing/selftests/cgroup/
H A Dtest_freezer.c180 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/linux/linux-6.6/tools/testing/selftests/net/af_unix/
H A Dscm_pidfd.c203 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 Dmrelease_test.c22 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 D16-1.c102 kill(getppid(), SIGABRT); in main()
106 kill(getppid(), SIGABRT); in main()
H A D5-3.c92 kill(getppid(), SIGABRT); in main()
96 kill(getppid(), SIGABRT); in main()
/third_party/musl/src/unistd/
H A Dgetppid.c4 pid_t getppid(void) in getppid() function
/third_party/ltp/testcases/kernel/syscalls/getppid/
H A Dgetppid01.c9 * 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()
/third_party/musl/libc-test/src/functionalext/supplement/unistd/
H A Dgetppid.c30 pid_t child_ppid = getppid(); in getppid_0100()
/kernel/linux/linux-5.10/tools/testing/selftests/ptrace/
H A Dpeeksiginfo.c168 pid_t ppid = getppid(); in main()
170 if (ppid != getppid()) in main()
/kernel/linux/linux-6.6/tools/testing/selftests/ptrace/
H A Dpeeksiginfo.c168 pid_t ppid = getppid(); in main()
170 if (ppid != getppid()) in main()
/third_party/rust/crates/rustix/src/process/
H A Did.rs256 /// `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()

Completed in 11 milliseconds

123456