Lines Matching refs:pid
48 static void join_newpid_thread(pid_t pid);
394 pid_t pid; in mfd_assert_fork_private_write() local
409 pid = fork(); in mfd_assert_fork_private_write()
410 if (pid == 0) { in mfd_assert_fork_private_write()
414 waitpid(pid, NULL, 0); in mfd_assert_fork_private_write()
769 pid_t pid; in spawn_thread() local
777 pid = clone(fn, stack + STACK_SIZE, SIGCHLD | flags, arg); in spawn_thread()
778 if (pid < 0) { in spawn_thread()
783 return pid; in spawn_thread()
786 static void join_thread(pid_t pid) in join_thread() argument
790 if (waitpid(pid, &wstatus, 0) < 0) { in join_thread()
813 static void join_idle_thread(pid_t pid) in join_idle_thread() argument
815 kill(pid, SIGTERM); in join_idle_thread()
816 waitpid(pid, NULL, 0); in join_idle_thread()
1258 int pid; in sysctl_simple_child() local
1287 int pid = spawn_thread(CLONE_NEWPID, sysctl_simple_child, NULL); in test_sysctl_simple() local
1289 join_thread(pid); in test_sysctl_simple()
1325 int pid; in sysctl_nested_child() local
1330 pid = spawn_thread(CLONE_NEWPID, sysctl_simple_child, NULL); in sysctl_nested_child()
1331 join_thread(pid); in sysctl_nested_child()
1336 pid = spawn_thread(CLONE_NEWPID, sysctl_nested, test_sysctl_sysctl1); in sysctl_nested_child()
1337 join_thread(pid); in sysctl_nested_child()
1339 pid = spawn_thread(CLONE_NEWPID, sysctl_nested, in sysctl_nested_child()
1341 join_thread(pid); in sysctl_nested_child()
1343 pid = spawn_thread(CLONE_NEWPID, sysctl_nested, in sysctl_nested_child()
1345 join_thread(pid); in sysctl_nested_child()
1352 pid = spawn_thread(CLONE_NEWPID, sysctl_nested, test_sysctl_sysctl2); in sysctl_nested_child()
1353 join_thread(pid); in sysctl_nested_child()
1355 pid = spawn_thread(CLONE_NEWPID, sysctl_nested, in sysctl_nested_child()
1357 join_thread(pid); in sysctl_nested_child()
1363 pid = spawn_thread(CLONE_NEWPID, sysctl_nested_wait, in sysctl_nested_child()
1366 kill(pid, SIGCONT); in sysctl_nested_child()
1367 join_thread(pid); in sysctl_nested_child()
1372 pid = spawn_thread(CLONE_NEWPID, sysctl_nested_wait, in sysctl_nested_child()
1375 kill(pid, SIGCONT); in sysctl_nested_child()
1376 join_thread(pid); in sysctl_nested_child()
1385 pid = spawn_thread(CLONE_NEWPID, sysctl_nested_wait, in sysctl_nested_child()
1388 kill(pid, SIGCONT); in sysctl_nested_child()
1389 join_thread(pid); in sysctl_nested_child()
1393 pid = spawn_thread(CLONE_NEWPID, sysctl_nested_wait, in sysctl_nested_child()
1396 kill(pid, SIGCONT); in sysctl_nested_child()
1397 join_thread(pid); in sysctl_nested_child()
1401 pid = spawn_thread(CLONE_NEWPID, sysctl_nested_wait, in sysctl_nested_child()
1404 kill(pid, SIGCONT); in sysctl_nested_child()
1405 join_thread(pid); in sysctl_nested_child()
1416 int pid = spawn_thread(CLONE_NEWPID, sysctl_nested_child, NULL); in test_sysctl_nested() local
1418 join_thread(pid); in test_sysctl_nested()
1546 pid_t pid; in test_share_fork() local
1555 pid = spawn_idle_thread(0); in test_share_fork()
1562 join_idle_thread(pid); in test_share_fork()
1572 pid_t pid; in main() local
1614 pid = spawn_idle_thread(CLONE_FILES | CLONE_FS | CLONE_VM); in main()
1619 join_idle_thread(pid); in main()