/kernel/liteos_a/testsuites/unittest/container/smoke/ |
H A D | It_uts_container_004.cpp | 80 auto pid = clone(ChildFunc, stackTop, SIGCHLD, NULL); in ItUtsContainer004() local 82 ASSERT_NE(pid, -1); in ItUtsContainer004() 85 ret = waitpid(pid, &status, 0); in ItUtsContainer004() 86 ASSERT_EQ(ret, pid); in ItUtsContainer004()
|
H A D | It_uts_container_006.cpp | 87 auto pid = CloneWrapper(UtsContainerTest, CLONE_NEWUTS, &arg); in ItUtsContainer006() local 88 ASSERT_NE(pid, -1); in ItUtsContainer006() 91 ret = waitpid(pid, &status, 0); in ItUtsContainer006() 92 ASSERT_EQ(ret, pid); in ItUtsContainer006()
|
/kernel/liteos_a/testsuites/unittest/process/basic/process/full/ |
H A D | process_test_007.cpp | 44 int pid; in ProcessTest001() local 67 int pid; in Testcase() local 80 pid = ret; in Testcase() 83 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in Testcase()
|
/third_party/libunwind/libunwind/tests/ |
H A D | forker.c | 40 pid_t pid; in main() local 53 pid = fork (); in main() 54 if (pid == 0) in main() 61 waitpid (pid, &status, 0); in main()
|
/third_party/ltp/testcases/kernel/containers/share/ |
H A D | ns_create.c | 76 * ./ns_create <ipc,mnt,net,pid,user,uts> 80 int pid, flags; in main() local 101 pid = ltp_clone_quick(flags | SIGCHLD, child_fn, NULL); in main() 102 if (pid == -1) { in main() 107 printf("%d", pid); in main()
|
/third_party/ltp/testcases/kernel/containers/pidns/ |
H A D | pidns20.c | 76 int pid; in run() local 78 pid = SAFE_CLONE(&args); in run() 79 if (!pid) { in run() 86 SAFE_KILL(pid, SIGUSR1); in run()
|
/third_party/musl/libc-test/src/regression/ |
H A D | daemon-failure.c | 20 int r, pid, fd[2], fdout, s; in main() local 42 pid = getpid(); in main() 53 if (getpid() != pid || getppid() == 1) in main() 54 t_error("daemon forked despite failure: ppid is %d, pid is %d, old pid is %d\n", in main() 55 getppid(), getpid(), pid); in main()
|
/third_party/ltp/testcases/kernel/syscalls/fstatfs/ |
H A D | fstatfs02.c | 36 int pid, status; in fstatfs_verify() local 38 pid = SAFE_FORK(); in fstatfs_verify() 39 if (!pid) { in fstatfs_verify() 44 SAFE_WAITPID(pid, &status, 0); in fstatfs_verify()
|
/third_party/ltp/testcases/kernel/syscalls/waitpid/ |
H A D | waitpid10.c | 35 pid_t pid; in do_child_1() local 39 pid = SAFE_FORK(); in do_child_1() 40 if (pid == 0) { in do_child_1() 54 fork_kid_pid[i] = pid; in do_child_1()
|
/third_party/ltp/testcases/kernel/mem/ksm/ |
H A D | ksm05.c | 53 pid_t pid; in test_ksm() local 67 pid = SAFE_FORK(); in test_ksm() 68 if (pid == 0) { in test_ksm() 74 SAFE_WAITPID(pid, &status, WUNTRACED | WCONTINUED); in test_ksm()
|
/third_party/ltp/testcases/kernel/security/dirtyc0w_shmem/ |
H A D | dirtyc0w_shmem.c | 62 int pid; in dirtyc0w_shmem_test() local 68 pid = SAFE_FORK(); in dirtyc0w_shmem_test() 69 if (!pid) { in dirtyc0w_shmem_test() 90 SAFE_KILL(pid, SIGUSR1); in dirtyc0w_shmem_test()
|
/third_party/ltp/testcases/kernel/security/dirtyc0w/ |
H A D | dirtyc0w.c | 60 int i, fd, pid, fail = 0; in dirtyc0w_test() local 68 pid = SAFE_FORK(); in dirtyc0w_test() 70 if (!pid) { in dirtyc0w_test() 88 SAFE_KILL(pid, SIGUSR1); in dirtyc0w_test()
|
/third_party/ltp/testcases/kernel/syscalls/futex/ |
H A D | futex_wait03.c | 29 long ret, pid = (long)arg; in threaded() local 31 TST_PROCESS_STATE_WAIT(pid, 'S', 0); in threaded() 43 long res, pid = getpid(); in run() local 46 SAFE_PTHREAD_CREATE(&t, NULL, threaded, (void*)pid); in run()
|
/third_party/ltp/testcases/kernel/syscalls/getxattr/ |
H A D | getxattr04.c | 76 pid_t pid; in verify_getxattr() local 81 pid = SAFE_FORK(); in verify_getxattr() 82 if (!pid) in verify_getxattr() 91 kill(pid, SIGUSR1); in verify_getxattr()
|
/third_party/ltp/testcases/kernel/syscalls/ipc/semctl/ |
H A D | semctl04.c | 51 pid_t pid; in verify_semctl() local 53 pid = SAFE_FORK(); in verify_semctl() 55 if (pid == 0) { in verify_semctl() 59 SAFE_WAITPID(pid, NULL, 0); in verify_semctl()
|
/third_party/ltp/testcases/kernel/syscalls/exit/ |
H A D | exit01.c | 40 int pid, npid, sig, nsig, exno, nexno, status; in main() local 55 pid = FORK_OR_VFORK(); in main() 57 switch (pid) { in main() 67 if (npid != pid) { in main() 69 "unexpected pid returned"); in main()
|
/third_party/ltp/testcases/kernel/syscalls/fork/ |
H A D | fork05.c | 143 pid_t pid; in main() local 169 pid = fork(); in main() 171 if (pid == 0) { in main() 184 waitpid(pid, &res, 0); in main()
|
/third_party/ltp/testcases/kernel/syscalls/madvise/ |
H A D | madvise07.c | 73 pid_t pid; in run() local 75 pid = SAFE_FORK(); in run() 76 if (pid == 0) { in run() 81 SAFE_WAITPID(pid, &status, 0); in run()
|
/third_party/ltp/testcases/kernel/uevents/ |
H A D | uevent01.c | 32 int pid, fd, dev_num; in verify_uevent() local 73 pid = SAFE_FORK(); in verify_uevent() 74 if (!pid) { in verify_uevent() 85 wait_for_pid(pid); in verify_uevent()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/ |
H A D | 1-3.c | 39 int pid; in main() local 47 if ((pid = fork()) == 0) { in main() 67 tst_process_state_wait3(pid, 'S', 1); in main() 69 if (kill(pid, SIGABRT) != 0) { in main()
|
H A D | 2-2.c | 40 int pid; in main() local 51 if ((pid = fork()) == 0) { in main() 75 tst_process_state_wait3(pid, 'S', 1); in main() 77 if (kill(pid, SIGABRT) != 0) { in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_notify/ |
H A D | 2-1.c | 47 int pid; in main() local 65 pid = fork(); in main() 66 if (pid == -1) { in main() 71 if (pid == 0) { in main()
|
H A D | 9-1.c | 46 int pid; in main() local 64 pid = fork(); in main() 65 if (pid == -1) { in main() 70 if (pid == 0) { in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/ |
H A D | 7-1.c | 39 pid_t pid; in main() local 54 pid = fork(); in main() 55 if (pid == 0) { // child create the semaphore. in main() 81 (void)kill(pid, SIGABRT); // send signal to child in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigqueue/ |
H A D | 9-1.c | 58 int pid = getpid(); in main() local 65 pid = getpid(); in main() 81 if (sigqueue(pid, SIGTOTEST, value) != 0) { in main() 91 rc = sigqueue(pid, SIGTOTEST, value); in main()
|