/sysdeps/unix/sysv/linux/s390/ |
A D | tst-ptrace-singleblock.c | 40 tracee_func (int pid) in tracee_func() argument 45 sprintf (str, "cat /proc/%d/maps", pid); in tracee_func() 52 kill (pid, SIGSTOP); in tracee_func() 59 tracer_func (int pid) in tracer_func() argument 137 ret = ptrace (req_singleblock, pid, NULL, buf); in tracer_func() 146 ret = ptrace (req_singleblock, pid, NULL, NULL); in tracer_func() 160 TEST_VERIFY_EXIT (ptrace (PTRACE_CONT, pid, NULL, NULL) == 0); in tracer_func() 168 int pid; in do_test() local 169 pid = xfork (); in do_test() 170 if (pid) in do_test() [all …]
|
/sysdeps/pthread/ |
A D | tst-atfork2.c | 69 pid_t pid = fork (); in do_test() local 70 if (pid == -1) in do_test() 76 if (pid == 0) in do_test() 96 if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) in do_test() 118 pid = fork (); in do_test() 119 if (pid == -1) in do_test() 125 if (pid == 0) in do_test() 144 if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) in do_test()
|
A D | tst-atfork1.c | 69 pid_t pid; in do_test() local 83 pid = fork (); in do_test() 84 if (pid == -1) in do_test() 90 if (pid != 0) in do_test() 99 if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) in do_test()
|
A D | tst-flock2.c | 122 pid_t pid = fork (); in do_test() local 123 if (pid == -1) in do_test() 129 if (pid == 0) in do_test() 144 if (pid != 0) in do_test() 157 if (pid == 0) in do_test() 188 if (pid != 0) in do_test() 202 if (pid == 0) in do_test() 221 if (pid != 0) in do_test() 235 if (pid == 0) in do_test() 241 if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) in do_test()
|
A D | tst-exec2.c | 61 pid_t pid = fork (); in do_test() local 62 if (pid == -1) in do_test() 68 if (pid == 0) in do_test() 116 if (rpid != pid) in do_test() 118 printf ("found \"%s\", expected PID %ld\n", buf, (long int) pid); in do_test() 133 int err = waitpid (pid, &status, 0); in do_test() 134 if (err != pid) in do_test()
|
A D | tst-exec3.c | 55 pid_t pid = fork (); in do_test() local 56 if (pid == -1) in do_test() 62 if (pid == 0) in do_test() 114 if (rpid != pid) in do_test() 116 printf ("found \"%s\", expected PID %ld\n", buf, (long int) pid); in do_test() 131 int err = waitpid (pid, &status, 0); in do_test() 132 if (err != pid) in do_test()
|
A D | tst-fork1.c | 31 pid_t pid; in thread_function() local 34 pid = fork (); in thread_function() 35 switch (pid) in thread_function() 49 pid2 = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)); in thread_function() 50 if (pid2 != pid) in thread_function() 53 (long int) pid2, (long int) pid); in thread_function() 58 (long int) pid, WEXITSTATUS (status), i); in thread_function()
|
A D | tst-rwlock12.c | 41 pid_t pid; in do_test() local 121 pid = fork (); in do_test() 122 if (pid == -1) in do_test() 127 else if (pid == 0) in do_test() 181 kill (pid, SIGTERM); in do_test() 189 kill (pid, SIGTERM); in do_test() 194 if (TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)) != pid) in do_test() 197 kill (pid, SIGTERM); in do_test()
|
A D | tst-fork4.c | 33 pid_t pid = fork (); in do_test() local 35 if (pid < 0) in do_test() 41 if (pid == 0) in do_test() 50 if (wait (&status) != pid) in do_test()
|
A D | tst-basic4.c | 40 pid_t pid = fork (); in tf() local 41 if (pid == -1) in tf() 47 if (pid == 0) in tf() 55 int e = TEMP_FAILURE_RETRY (waitpid (pid, &r, 0)); in tf() 56 if (e != pid) in tf()
|
A D | tst-barrier2.c | 40 pid_t pid; in do_test() local 125 pid = fork (); in do_test() 126 if (pid == -1) in do_test() 146 pid == 0 ? "child" : "parent", e); in do_test() 154 pid == 0 ? "child" : "parent", serials); in do_test() 156 if (pid == 0) in do_test() 161 if (waitpid (pid, &status, 0) != pid) in do_test()
|
A D | tst-getpid3.c | 10 static pid_t pid; variable 15 if (pid != getpid ()) in pid_thread() 18 (int) pid, (int) getpid ()); in pid_thread() 28 pid = getpid (); in do_test() 59 if (pid == getpid ()) in do_test() 65 pid = getpid (); in do_test()
|
A D | tst-exec1.c | 87 pid_t pid; in do_test() local 90 if (posix_spawn (&pid, _PATH_BSHELL, &a, NULL, argv, NULL) != 0) in do_test() 118 if (rpid != pid) in do_test() 120 printf ("found \"%s\", expected PID %ld\n", buf, (long int) pid); in do_test() 136 int err = waitpid (pid, &status, 0); in do_test() 137 if (err != pid) in do_test()
|
/sysdeps/unix/sysv/linux/ |
A D | tst-clone2-internal.c | 46 pid_t pid = getpid (); in f() local 51 if (write (pipefd[1], &pid, sizeof pid) != sizeof (pid)) in f() 91 pid_t ppid, pid, tid; in do_test() local 92 if (read (pipefd[0], &ppid, sizeof pid) != sizeof pid) in do_test() 97 if (read (pipefd[0], &pid, sizeof pid) != sizeof pid) in do_test() 115 if ((ppid != own_pid) || (pid == own_pid) || (tid == own_tid)) in do_test() 117 (int)ppid, (int)pid, (int)tid, (int)own_pid, (int)own_tid); in do_test()
|
A D | wait4.c | 26 __wait4_time64 (pid_t pid, int *stat_loc, int options, struct __rusage64 *usage) in __wait4_time64() argument 30 return SYSCALL_CANCEL (wait4, pid, stat_loc, options, usage); in __wait4_time64() 35 ret = SYSCALL_CANCEL (wait4, pid, stat_loc, options, in __wait4_time64() 46 if (pid < -1) in __wait4_time64() 49 pid *= -1; in __wait4_time64() 51 else if (pid == -1) in __wait4_time64() 53 else if (pid == 0) in __wait4_time64() 61 if (SYSCALL_CANCEL (waitid, idtype, pid, &infop, options, usage) < 0) in __wait4_time64() 66 if (SYSCALL_CANCEL (waitid, idtype, pid, &infop, options, &usage32) < 0) in __wait4_time64() 115 __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage) in libc_hidden_def() [all …]
|
A D | tst-clone2.c | 46 pid_t pid = getpid (); in f() local 51 if (write (pipefd[1], &pid, sizeof pid) != sizeof (pid)) in f() 96 pid_t ppid, pid, tid; in do_test() local 97 if (read (pipefd[0], &ppid, sizeof pid) != sizeof pid) in do_test() 102 if (read (pipefd[0], &pid, sizeof pid) != sizeof pid) in do_test() 122 if ((ppid != own_pid) || (pid == own_pid) || (tid == own_tid)) in do_test() 124 (int)ppid, (int)pid, (int)tid, (int)own_pid, (int)own_tid); in do_test()
|
A D | sched_rr_gi.c | 26 __sched_rr_get_interval64 (pid_t pid, struct __timespec64 *tp) in __sched_rr_get_interval64() argument 31 int ret = INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp); in __sched_rr_get_interval64() 37 ret = INLINE_SYSCALL_CALL (sched_rr_get_interval, pid, &tp32); in __sched_rr_get_interval64() 48 __sched_rr_get_interval (pid_t pid, struct timespec *tp) in libc_hidden_def() 53 ret = __sched_rr_get_interval64 (pid, &tp64); in libc_hidden_def()
|
A D | sched_setaffinity.c | 31 __sched_setaffinity_new (pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset) in libc_hidden_proto() 33 int result = INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset); in libc_hidden_proto() 45 __sched_setaffinity_old (pid_t pid, const cpu_set_t *cpuset) in __sched_setaffinity_old() argument 48 return __sched_setaffinity_new (pid, 128, cpuset); in __sched_setaffinity_old()
|
A D | sched_getaffinity.c | 33 __sched_getaffinity_new (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) in libc_hidden_proto() 35 int res = INLINE_SYSCALL (sched_getaffinity, 3, pid, in libc_hidden_proto() 55 __sched_getaffinity_old (pid_t pid, cpu_set_t *cpuset) in libc_hidden_def() 58 return __sched_getaffinity_new (pid, 128, cpuset); in libc_hidden_def()
|
/sysdeps/mach/hurd/ |
A D | getsid.c | 25 getsid (pid_t pid) in getsid() argument 30 if (pid == 0) in getsid() 31 pid = _hurd_pid; in getsid() 33 err = __USEPORT (PROC, __proc_getsid (port, pid, &sid)); in getsid()
|
A D | setpgid.c | 28 __setpgid (pid_t pid, pid_t pgid) in __setpgid() argument 35 if (err = __USEPORT (PROC, __proc_setpgrp (port, pid, pgid))) in __setpgid() 38 if (pid == 0 || pid == _hurd_pid) in __setpgid()
|
A D | kill.c | 30 __kill (pid_t pid, int sig) in __kill() argument 37 void kill_pid (pid_t pid) /* Kill one PID. */ in __kill() 51 err = __proc_pid2task (proc, pid, &refport); in __kill() 104 err = HURD_MSGPORT_RPC (__proc_getmsgport (proc, pid, &msgport), in __kill() 105 (taskerr = __proc_pid2task (proc, pid, in __kill() 116 if (pid <= 0) in __kill() 122 err = __proc_getpgrppids (proc, - pid, &pids, &npids); in __kill() 138 kill_pid (pid); in __kill()
|
A D | ptrace.c | 40 pid_t pid; in ptrace() local 101 pid = va_arg (ap, pid_t); in ptrace() 109 task_t task = __pid2task (pid); in ptrace() 154 pid = va_arg (ap, pid_t); in ptrace() 168 pid = va_arg (ap, pid_t); in ptrace() 201 pid = va_arg (ap, pid_t); in ptrace() 235 pid = va_arg (ap, pid_t); in ptrace() 244 pid = va_arg (ap, pid_t); in ptrace() 257 pid = va_arg (ap, pid_t); in ptrace() 270 pid = va_arg (ap, pid_t); in ptrace() [all …]
|
A D | getpgid.c | 25 __getpgid (pid_t pid) in __getpgid() argument 30 if (pid == 0) in __getpgid() 37 err = __USEPORT (PROC, __proc_getpgrp (port, pid, &pgrp)); in __getpgid()
|
/sysdeps/posix/ |
A D | system.c | 74 pid_t pid; member 82 __kill_noerrno (args->pid, SIGKILL); in cancel_handler() 86 TEMP_FAILURE_RETRY (__waitpid (args->pid, NULL, 0)); in cancel_handler() 105 pid_t pid; in do_system() local 147 ret = __posix_spawn (&pid, SHELL_PATH, 0, &spawn_attr, in do_system() 164 .pid = pid in do_system() 171 if (TEMP_FAILURE_RETRY (__waitpid (pid, &status, 0)) != pid) in do_system()
|