/external/ltp/testcases/kernel/pty/ |
D | hangup01.c | 58 pid_t childpid; variable 65 if (0 < childpid) { in cleanup() 68 if (kill(childpid, 0) == 0 || errno == ESRCH) { in cleanup() 71 (void)kill(childpid, 15); in cleanup() 74 if (waitpid(childpid, &status, WNOHANG) < 0) { in cleanup() 76 "waitpid(%d, ...) failed", childpid); in cleanup() 88 void parent(int masterfd, int childpid) in parent() argument 148 while (waitpid(childpid, &status, WNOHANG) < 0 && errno != ESRCH) ; in parent() 213 pid_t childpid; in main() local 230 childpid = fork(); in main() [all …]
|
/external/ltp/testcases/kernel/containers/userns/ |
D | userns02.c | 72 int childpid; in main() local 84 childpid = ltp_clone_quick(CLONE_NEWUSER | SIGCHLD, in main() 87 if (childpid < 0) in main() 92 sprintf(path, "/proc/%d/uid_map", childpid); in main() 99 sprintf(path, "/proc/%d/setgroups", childpid); in main() 105 sprintf(path, "/proc/%d/gid_map", childpid); in main() 113 tst_record_childstatus(cleanup, childpid); in main()
|
/external/valgrind/none/tests/ |
D | threaded-fork.c | 18 pid_t childpid; in main() local 25 childpid = fork(); in main() 26 switch( childpid ) { in main() 41 while(waitpid(childpid, &status, 0) != childpid) { in main()
|
/external/valgrind/drd/tests/ |
D | threaded-fork.c | 20 pid_t childpid; in main() local 28 childpid = fork(); in main() 29 switch (childpid) { in main() 43 while (waitpid(childpid, &status, 0) != childpid) { in main()
|
/external/ltp/testcases/kernel/syscalls/ioctl/ |
D | ioctl02.c | 80 static int parentpid, childpid; variable 132 childpid = FORK_OR_VFORK(); in main() 133 if (childpid < 0) in main() 136 if (childpid == 0) { /* child */ in main() 152 kill(childpid, SIGTERM); in main() 153 waitpid(childpid, NULL, 0); in main() 164 kill(childpid, SIGTERM); in main() 165 waitpid(childpid, NULL, 0); in main() 176 (void)kill(childpid, SIGTERM); in main() 177 (void)waitpid(childpid, NULL, 0); in main()
|
/external/ltp/testcases/kernel/syscalls/fork/ |
D | fork06.c | 55 int i, pid, status, childpid, succeed, fail; in main() local 78 childpid = wait(&status); in main() 79 if (pid != childpid) in main() 80 tst_resm(TFAIL, "pid from wait %d", childpid); in main()
|
/external/ltp/testcases/kernel/ipc/ipc_stress/ |
D | semaphore_test_02.c | 120 int childpid[MAX_CHILDREN]; variable 166 childpid[proc] = pid; in main() 188 waitpid(childpid[proc], &status, 0); in main()
|
D | shmem_test_04.c | 143 int childpid[MAXPROCS]; variable 228 childpid[proc] = pid; in main() 335 kill(childpid[i], SIGKILL); in cleanup()
|
D | semaphore_test_03.c | 136 pid_t childpid[MAX_CHILDREN]; variable 188 childpid[proc] = pid; in main() 210 waitpid(childpid[proc], &status, 0); in main()
|
/external/selinux/sandbox/ |
D | seunshare.c | 141 int childpid; in spawn_command() local 147 childpid = fork(); in spawn_command() 148 if (childpid == -1) { in spawn_command() 153 if (childpid == 0) { in spawn_command() 161 waitpid(childpid, &status, 0); in spawn_command()
|