Lines Matching +full:include +full:- +full:pid
2 #include <unistd.h>
3 #include <sys/wait.h>
4 #include <errno.h>
5 #include <string.h>
6 #include "test.h"
10 static int w(pid_t pid) in w() argument
13 r = waitpid(pid, &s, 0); in w()
14 if (r == -1) in w()
16 else if (r != pid) in w()
17 t_error("child pid was %d, waitpid returned %d\n", pid, r); in w()
20 return -1; in w()
25 pid_t pid; in test_exit() local
26 if((pid = vfork()) == 0) { in test_exit()
30 if (pid == -1) { in test_exit()
34 int r = w(pid); in test_exit()
41 pid_t pid; in sh() local
42 if((pid = vfork()) == 0) { in sh()
43 execl("/bin/sh", "/bin/sh", "-c", cmd, (char*)0); in sh()
47 if (pid == -1) { in sh()
49 return -1; in sh()
51 return w(pid); in sh()
73 test_shell_kill("kill -9 $$", 9); in main()