/dragonfly/contrib/gdb-7/gdb/ |
H A D | inf-ptrace.c | 45 pid_t pid, fpid; in inf_ptrace_follow_fork() local 120 int pid; in inf_ptrace_create_inferior() local 193 pid_t pid; in inf_ptrace_attach() local 316 if (pid == 0) in inf_ptrace_kill() 349 if (pid == -1) in inf_ptrace_resume() 386 pid_t pid; in inf_ptrace_wait() local 416 pid = -1; in inf_ptrace_wait() 721 int pid, i; in inf_ptrace_fetch_register() local 735 if (pid == 0) in inf_ptrace_fetch_register() 782 int pid, i; in inf_ptrace_store_register() local [all …]
|
H A D | inferior.c | 133 inf->pid = pid; in add_inferior_silent() 148 if (pid != 0) in add_inferior_silent() 167 int pid; member 205 arg.pid = inf->pid; in delete_inferior_1() 256 arg.pid = inf->pid; in exit_inferior_1() 265 inf->pid = 0; in exit_inferior_1() 324 inf->pid = pid; in inferior_appeared() 364 if (inf->pid == pid) in find_inferior_pid() 420 if (inf->pid == pid) in pid_to_gdb_inferior_id() 442 if (inf->pid == pid) in in_inferior_list() [all …]
|
/dragonfly/usr.sbin/autofs/ |
H A D | popen.c | 58 struct pid { struct 59 SLIST_ENTRY(pid) next; 61 pid_t pid; argument 77 struct pid *cur, *p; in auto_popen() 78 pid_t pid; in auto_popen() local 90 cur = malloc(sizeof(struct pid)); in auto_popen() 112 switch (pid = fork()) { in auto_popen() 139 cur->pid = pid; in auto_popen() 148 struct pid *cur, *last = NULL; in auto_pclose() 150 pid_t pid; in auto_pclose() local [all …]
|
/dragonfly/usr.bin/mail/ |
H A D | popen.c | 45 int pid; member 51 int pid; member 98 int pid; in Popen() local 165 fpp->pid = pid; in register_file() 209 int pid; in run_command() local 221 int pid; in start_command() local 227 if (pid == 0) { in start_command() 240 return (pid); in start_command() 281 for (cpp = &child; *cpp != NULL && (*cpp)->pid != pid; in findchild() 288 (*cpp)->pid = pid; in findchild() [all …]
|
/dragonfly/lib/libc/gen/ |
H A D | popen.c | 56 struct pid { struct 57 SLIST_ENTRY(pid) next; 59 pid_t pid; argument 70 struct pid *cur; in popen() 74 struct pid *p; in popen() 106 switch (pid = vfork()) { in popen() 160 cur->pid = pid; in popen() 181 struct pid *cur, *last = NULL; in pclose() 183 pid_t pid; in pclose() local 211 pid = _wait4(cur->pid, &pstat, 0, NULL); in pclose() [all …]
|
/dragonfly/usr.sbin/installer/libaura/ |
H A D | popen.c | 62 static struct pid { struct 63 struct pid *next; argument 65 pid_t pid; argument 72 struct pid *cur; in aura_popen() 73 struct pid *p; in aura_popen() 77 int pdes[2], pid; in aura_popen() local 169 cur->pid = pid; in aura_popen() 187 pid_t pid; in aura_pclose() local 201 pid = wait4(cur->pid, &pstat, 0, (struct rusage *)0); in aura_pclose() 217 struct pid *cur; in aura_pgetpid() [all …]
|
/dragonfly/test/stress/stress2/misc/ |
H A D | kevent4.sh | 87 add_watch(pid_t pid) 91 kev.ident = pid; 116 del_watch(pid_t pid) 120 kev.ident = pid; 146 pid_t pid; 164 pid = kev[i].ident; 166 add_watch(pid); 170 printf("%u forked\n", pid); 173 printf("%u called exec\n", pid); 176 printf("%u exited\n", pid); [all …]
|
/dragonfly/contrib/cryptsetup/lib/ |
H A D | utils_debug.c | 36 snprintf(dirpath, sizeof(dirpath), "/proc/%d/fd", pid); in check_pid() 45 snprintf(fdpath, sizeof(fdpath), "/proc/%d/fd/%s", pid, direntry->d_name); in check_pid() 70 snprintf(path, sizeof(path), "/proc/%u/stat", pid); in read_proc_info() 86 static void report_proc(const pid_t pid, const char *dev_name) in report_proc() argument 91 if (read_proc_info(pid, &ppid, name, MAX_PATHNAME) && in report_proc() 94 pid, name, ppid, name2, dev_name); in report_proc() 103 pid_t pid; in debug_processes_using_device() local 120 pid = atoi(proc_dentry->d_name); in debug_processes_using_device() 121 switch(check_pid(pid, dev_name, short_dev_name)) { in debug_processes_using_device() 122 case 1: report_proc(pid, dev_name); in debug_processes_using_device() [all …]
|
/dragonfly/etc/rc.d/ |
H A D | vkernel | 33 eval pidfile="/var/run/vkernel.${_vkernel}.pid" 36 …if [ ! -z "${pid}" -a ! -z "`ps axwwp ${pid} | grep -wE "^[ ]*${pid}" | grep -v grep | awk '{print… 137 eval pidfile="/var/run/vkernel.${_vkernel}.pid" 141 if [ -z "${pid}" ]; then 145 eval kill -TERM ${pid} 157 eval temp_pid=`ps axwwp ${pid} | grep -wE "^[ ]*${pid}" | grep -v grep | awk '{print $1}'` 159 eval temp_pid=`ps axwwp ${pid} | grep -wE "^[ ]*${pid}" | grep -v grep | awk '{print $1}'` 165 eval kill -KILL ${pid}
|
/dragonfly/test/stress/stress2/testcases/badcode/ |
H A D | badcode.c | 43 pid_t pid; variable 63 if (pid != 0) { in hand() 64 kill(pid, SIGHUP); in hand() 65 kill(pid, SIGKILL); in hand() 84 pid_t pid; in test() local 92 if ((pid = fork()) == 0) { in test() 109 } else if (pid > 0) { in test() 112 if (waitpid(pid, &status, 0) == -1) in test() 113 warn("waitpid(%d)", pid); in test() 115 kill(pid, SIGINT); in test()
|
/dragonfly/usr.bin/shlock/ |
H A D | shlock.c | 61 pid_t pid = -1; in main() local 76 tmp_pid < 1 || (pid = tmp_pid) != tmp_pid) in main() 95 if (pid != -1) in main() 96 return(create_lock(file, pid, uucpstyle, debug)); in main() 109 ret = snprintf(buf, sizeof(buf), "%ld\n", (long)pid); in create_lock() 124 getprogname(), file, (long)pid); in create_lock() 139 if ((uucpstyle && write(fd, &pid, sizeof(pid)) != sizeof(pid)) || in create_lock() 195 pid_t pid; in check_lock() local 229 memcpy(&pid, buf, sizeof(pid_t)); in check_lock() 244 tmp_pid < 1 || (pid = tmp_pid) != tmp_pid) { in check_lock() [all …]
|
/dragonfly/lib/libutil/ |
H A D | uucplock.c | 56 static int put_pid (int fd, pid_t pid); 67 pid_t pid, pid_old; in uu_lock() local 72 pid = getpid(); in uu_lock() 74 pid); in uu_lock() 106 if (!put_pid (tmpfd, pid)) in uu_lock() 198 put_pid(int fd, pid_t pid) in put_pid() argument 203 len = sprintf (buf, "%10d\n", (int)pid); in put_pid() 212 pid_t pid; in get_pid() local 217 pid = (pid_t)strtol (buf, NULL, 10); in get_pid() 219 pid = -1; in get_pid() [all …]
|
/dragonfly/contrib/binutils-2.27/libiberty/ |
H A D | pex-unix.c | 211 pid_t pid; member 225 if ((*pp)->pid == pid) in pex_wait() 235 return pid; in pex_wait() 501 pid_t pid; in pex_unix_exec_child() local 555 if (pid > 0) in pex_unix_exec_child() 579 return pid; in pex_unix_exec_child() 596 pid_t pid; in pex_unix_exec_child() local 610 pid = -1; in pex_unix_exec_child() 614 if (pid >= 0) in pex_unix_exec_child() 620 switch (pid) in pex_unix_exec_child() [all …]
|
H A D | pexecute.c | 85 pwait (int pid, int *status, int flags ATTRIBUTE_UNUSED) in pwait() argument 88 --pid; in pwait() 90 if (pex == NULL || pid < 0 || pid >= idx) in pwait() 93 if (pid == 0 && idx == 1) in pwait() 108 *status = vector[pid]; in pwait() 116 if (pid + 1 == idx) in pwait() 123 return pid + 1; in pwait()
|
/dragonfly/contrib/gdb-7/libiberty/ |
H A D | pex-unix.c | 210 pid_t pid; member 224 if ((*pp)->pid == pid) in pex_wait() 234 return pid; in pex_wait() 501 pid_t pid; in pex_unix_exec_child() local 555 if (pid > 0) in pex_unix_exec_child() 579 return pid; in pex_unix_exec_child() 596 pid_t pid; in pex_unix_exec_child() local 610 pid = -1; in pex_unix_exec_child() 614 if (pid >= 0) in pex_unix_exec_child() 620 switch (pid) in pex_unix_exec_child() [all …]
|
/dragonfly/contrib/gcc-4.7/libiberty/ |
H A D | pex-unix.c | 208 pid_t pid; member 222 if ((*pp)->pid == pid) in pex_wait() 232 return pid; in pex_wait() 499 pid_t pid; in pex_unix_exec_child() local 553 if (pid > 0) in pex_unix_exec_child() 577 return pid; in pex_unix_exec_child() 594 pid_t pid; in pex_unix_exec_child() local 608 pid = -1; in pex_unix_exec_child() 612 if (pid >= 0) in pex_unix_exec_child() 618 switch (pid) in pex_unix_exec_child() [all …]
|
/dragonfly/contrib/gcc-8.0/libiberty/ |
H A D | pex-unix.c | 210 pid_t pid; member 224 if ((*pp)->pid == pid) in pex_wait() 234 return pid; in pex_wait() 500 pid_t pid; in pex_unix_exec_child() local 554 if (pid > 0) in pex_unix_exec_child() 578 return pid; in pex_unix_exec_child() 595 pid_t pid; in pex_unix_exec_child() local 609 pid = -1; in pex_unix_exec_child() 613 if (pid >= 0) in pex_unix_exec_child() 619 switch (pid) in pex_unix_exec_child() [all …]
|
/dragonfly/test/stress/stress2/testcases/openat/ |
H A D | openat.c | 91 pid_t pid; in test_openat() local 96 pid = getpid(); in test_openat() 98 sprintf(file,"p%05d.%05d", pid, i); in test_openat() 113 pid_t pid; in test_renameat() local 118 pid = getpid(); in test_renameat() 120 sprintf(file,"p%05d.%05d", pid, i); in test_renameat() 125 sprintf(file2,"p%05d.%05d.togo", pid, i); in test_renameat() 129 sprintf(file2,"tmp/p%05d.%05d.togo", pid, i); in test_renameat() 139 pid_t pid; in test_unlinkat() local 143 pid = getpid(); in test_unlinkat() [all …]
|
/dragonfly/crypto/openssh/ |
H A D | readpass.c | 53 pid_t pid, ret; in ssh_askpass() local 69 if ((pid = fork()) == -1) { in ssh_askpass() 74 if (pid == 0) { in ssh_askpass() 234 pid_t pid; member 243 pid_t pid = -1; in notify_start() local 271 if ((pid = fork()) == -1) { in notify_start() 277 if (pid == 0) { in notify_start() 289 if (pid != -1) in notify_start() 290 kill(pid, SIGTERM); in notify_start() 293 ret->pid = pid; in notify_start() [all …]
|
/dragonfly/usr.bin/truss/ |
H A D | setup.c | 71 int pid; in setup_and_wait() local 74 pid = fork(); in setup_and_wait() 75 if (pid == -1) { in setup_and_wait() 78 if (pid == 0) { /* Child */ in setup_and_wait() 105 if (waitpid(pid, NULL, WNOHANG) != 0) { in setup_and_wait() 113 asprintf(&buf, "%s/%d/mem", procfs_path, pid); in setup_and_wait() 131 return pid; in setup_and_wait() 141 start_tracing(int pid, int flags) { in start_tracing() argument 146 asprintf(&buf, "%s/%d/mem", procfs_path, pid); in start_tracing() 159 if (kill(pid, 0) == -1) in start_tracing()
|
/dragonfly/test/socket/accept4/cloexec/ |
H A D | accept4_cloexec.c | 50 pid_t pid; in main() local 86 pid = fork(); in main() 87 if (pid < 0) { in main() 89 } else if (pid == 0) { in main() 102 kill(pid, SIGKILL); in main() 103 waitpid(pid, &status, 0); in main() 108 pid = fork(); in main() 109 if (pid < 0) { in main() 111 } else if (pid == 0) { in main() 118 if (waitpid(pid, &status, 0) < 0) in main()
|
/dragonfly/test/lockf/ |
H A D | lockf.c | 136 pid_t *pid; in main() local 152 pid = malloc(nprocs * sizeof(pid_t)); in main() 155 pid[i] = fork(); in main() 156 switch (pid[i]) { in main() 172 if (ptrace(PT_ATTACH, pid[i], 0, 0) < 0) in main() 173 err(1, "ptrace attach %d", pid[i]); in main() 175 if (waitpid(pid[i], &status, WUNTRACED) < 0) in main() 179 if (ptrace(PT_DETACH, pid[i], (caddr_t)1, 0) < 0) in main() 180 err(1, "ptrace detach %d", pid[i]); in main() 188 kill(pid[i], SIGINT); in main() [all …]
|
/dragonfly/contrib/gdb-7/gdb/common/ |
H A D | ptid.c | 29 ptid_build (int pid, long lwp, long tid) in ptid_build() argument 33 ptid.pid = pid; in ptid_build() 42 pid_to_ptid (int pid) in pid_to_ptid() argument 44 return ptid_build (pid, 0, 0); in pid_to_ptid() 52 return ptid.pid; in ptid_get_pid() 76 return (ptid1.pid == ptid2.pid in ptid_equal()
|
/dragonfly/contrib/binutils-2.34/libiberty/ |
H A D | pex-unix.c | 210 pid_t pid; member 224 if ((*pp)->pid == pid) in pex_wait() 234 return pid; in pex_wait() 289 psl->pid = cpid; in pex_wait() 476 pid_t pid; in pex_unix_exec_child() local 530 if (pid > 0) in pex_unix_exec_child() 554 return pid; in pex_unix_exec_child() 571 pid_t pid = -1; in pex_unix_exec_child() local 621 if (pid >= 0) in pex_unix_exec_child() 627 switch (pid) in pex_unix_exec_child() [all …]
|
H A D | pexecute.c | 85 pwait (int pid, int *status, int flags ATTRIBUTE_UNUSED) in pwait() argument 88 --pid; in pwait() 90 if (pex == NULL || pid < 0 || pid >= idx) in pwait() 93 if (pid == 0 && idx == 1) in pwait() 108 *status = vector[pid]; in pwait() 116 if (pid + 1 == idx) in pwait() 123 return pid + 1; in pwait()
|