bin/cpuset/cpuset.c
145
pid_t pid;
bin/cpuset/cpuset.c
153
id = pid = tid = setid = -1;
bin/cpuset/cpuset.c
192
id = pid = atoi(optarg);
bin/cpuset/cpuset.c
286
if (cpuset_setid(CPU_WHICH_PID, pid, setid))
bin/cpuset/cpuset.c
293
id = pid;
bin/kill/kill.c
124
pid = (pid_t)pidl;
bin/kill/kill.c
125
if (!**argv || *ep || pid != pidl)
bin/kill/kill.c
127
ret = kill(pid, numsig);
bin/kill/kill.c
58
pid_t pid;
bin/mv/mv.c
361
int pid, status;
bin/mv/mv.c
382
if (!(pid = vfork())) {
bin/mv/mv.c
387
if (waitpid(pid, &status, 0) == -1) {
bin/mv/mv.c
409
if (!(pid = vfork())) {
bin/mv/mv.c
413
if (waitpid(pid, &status, 0) == -1) {
bin/pkill/pkill.c
145
pid_t pid;
bin/pkill/pkill.c
528
pid = mypid;
bin/pkill/pkill.c
529
while (pid) {
bin/pkill/pkill.c
533
if (kp->ki_pid == pid) {
bin/pkill/pkill.c
535
pid = kp->ki_ppid;
bin/pkill/pkill.c
540
if (pid == mypid)
bin/pkill/pkill.c
541
pid = getppid();
bin/pwait/pwait.c
175
pid = strtol(s, &end, 10);
bin/pwait/pwait.c
176
if (pid < 0 || pid > pid_max || *end != '\0' || errno != 0) {
bin/pwait/pwait.c
180
if (pid == mypid) {
bin/pwait/pwait.c
187
p->pid = pid;
bin/pwait/pwait.c
193
EV_SET(e + nleft, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL);
bin/pwait/pwait.c
197
warn("%ld", pid);
bin/pwait/pwait.c
234
pid = e[i].ident;
bin/pwait/pwait.c
239
pid, WEXITSTATUS(status));
bin/pwait/pwait.c
242
pid, WTERMSIG(status));
bin/pwait/pwait.c
244
printf("%ld: terminated.\n", pid);
bin/pwait/pwait.c
247
k.pid = pid;
bin/pwait/pwait.c
258
printf("%d\n", p->pid);
bin/pwait/pwait.c
54
RB_ENTRY(pid) entry;
bin/pwait/pwait.c
55
pid_t pid;
bin/pwait/pwait.c
59
pidcmp(const struct pid *a, const struct pid *b)
bin/pwait/pwait.c
61
return (a->pid > b->pid ? 1 : a->pid < b->pid ? -1 : 0);
bin/pwait/pwait.c
64
RB_HEAD(pidtree, pid);
bin/pwait/pwait.c
66
RB_GENERATE_STATIC(pidtree, pid, entry, pidcmp);
bin/pwait/pwait.c
83
struct pid k, *p;
bin/pwait/pwait.c
87
long pid;
bin/sh/jobs.c
1002
TRACE(("In parent shell: child = %d\n", (int)pid));
bin/sh/jobs.c
1003
return pid;
bin/sh/jobs.c
1010
pid_t pid;
bin/sh/jobs.c
1021
pid = vfork();
bin/sh/jobs.c
1022
if (pid == -1) {
bin/sh/jobs.c
1027
if (pid == 0) {
bin/sh/jobs.c
1044
ps->pid = pid;
bin/sh/jobs.c
1053
TRACE(("In parent shell: child = %d\n", (int)pid));
bin/sh/jobs.c
1054
return pid;
bin/sh/jobs.c
1146
pid_t pid;
bin/sh/jobs.c
1182
pid = wait3(&status, wflags, (struct rusage *)NULL);
bin/sh/jobs.c
1183
TRACE(("wait returns %d, status=%d\n", (int)pid, status));
bin/sh/jobs.c
1184
if (pid == 0 && (mode & DOWAIT_SIG) != 0) {
bin/sh/jobs.c
1185
pid = -1;
bin/sh/jobs.c
1195
} while (pid == -1 && errno == EINTR);
bin/sh/jobs.c
1196
if (pid == -1 && errno == ECHILD && job != NULL)
bin/sh/jobs.c
1204
if (pid <= 0)
bin/sh/jobs.c
1205
return pid;
bin/sh/jobs.c
1213
if (sp->pid == -1)
bin/sh/jobs.c
1215
if (sp->pid == pid && (sp->status == -1 ||
bin/sh/jobs.c
1218
(int)pid, sp->status,
bin/sh/jobs.c
1277
return pid;
bin/sh/jobs.c
255
pgrp = jp->ps[0].pid;
bin/sh/jobs.c
298
kill(-jp->ps[0].pid, SIGCONT);
bin/sh/jobs.c
425
out1fmt("%d\n", (int)ps->pid);
bin/sh/jobs.c
443
fmtstr(s, 64, "%d ", (int)ps->pid);
bin/sh/jobs.c
623
out1fmt("%d", (int)jp->ps[i].pid);
bin/sh/jobs.c
641
pid_t pid;
bin/sh/jobs.c
697
pid = (pid_t)number(name);
bin/sh/jobs.c
700
&& jp->ps[jp->nprocs - 1].pid == pid)
bin/sh/jobs.c
730
return kill(-jp->ps[0].pid, sig);
bin/sh/jobs.c
735
if (kill(jp->ps[i].pid, sig) == 0)
bin/sh/jobs.c
81
pid_t pid; /* process id */
bin/sh/jobs.c
891
pid_t pid;
bin/sh/jobs.c
900
pid = fork();
bin/sh/jobs.c
901
if (pid == -1) {
bin/sh/jobs.c
906
if (pid == 0) {
bin/sh/jobs.c
925
pgrp = jp->ps[0].pid;
bin/sh/jobs.c
973
return pid;
bin/sh/jobs.c
977
pgrp = pid;
bin/sh/jobs.c
979
pgrp = jp->ps[0].pid;
bin/sh/jobs.c
980
setpgid(pid, pgrp);
bin/sh/jobs.c
986
backgndpid = pid; /* set $! */
bin/sh/jobs.c
991
ps->pid = pid;
bin/timeout/timeout.c
168
send_sig(pid_t pid, int signo, bool foreground)
bin/timeout/timeout.c
175
if (kill(pid, signo) < 0 && errno != ESRCH)
bin/timeout/timeout.c
176
warn("kill(%d, %s)", (int)pid, sys_signame[signo]);
bin/timeout/timeout.c
201
kill(pid, SIGCONT);
bin/timeout/timeout.c
277
pid_t pid;
bin/timeout/timeout.c
349
pid = fork();
bin/timeout/timeout.c
350
if (pid < 0)
bin/timeout/timeout.c
352
if (pid == 0) {
bin/timeout/timeout.c
426
} else if (si.si_pid == pid) {
bin/timeout/timeout.c
465
send_sig(pid, sig, foreground);
bin/timeout/timeout.c
479
send_sig(pid, sig, foreground);
crypto/heimdal/appl/ftp/ftp/cmds.c
1238
pid_t pid;
crypto/heimdal/appl/ftp/ftp/cmds.c
1245
if ((pid = fork()) == 0) {
crypto/heimdal/appl/ftp/ftp/cmds.c
1246
for (pid = 3; pid < 20; pid++)
crypto/heimdal/appl/ftp/ftp/cmds.c
1247
close(pid);
crypto/heimdal/appl/ftp/ftp/cmds.c
1274
if (pid > 0)
crypto/heimdal/appl/ftp/ftp/cmds.c
1275
while (waitpid(-1, &waitstatus, 0) != pid)
crypto/heimdal/appl/ftp/ftp/cmds.c
1279
if (pid == -1) {
crypto/heimdal/appl/ftp/ftpd/popen.c
105
int argc, gargc, pdes[2], pid;
crypto/heimdal/appl/ftp/ftpd/popen.c
163
switch(pid = fork()) {
crypto/heimdal/appl/ftp/ftpd/popen.c
198
pids[fileno(iop)] = pid;
crypto/heimdal/appl/ftp/ftpd/popen.c
212
pid_t pid;
crypto/heimdal/appl/ftp/ftpd/popen.c
227
while ((pid = waitpid(pids[fdes], &status, 0)) < 0 && errno == EINTR)
crypto/heimdal/appl/ftp/ftpd/popen.c
231
if (pid < 0)
crypto/heimdal/appl/ftp/ftpd/popen.c
232
return (pid);
crypto/heimdal/appl/login/login.c
70
pid_t pid;
crypto/heimdal/appl/login/login.c
82
pid = fork();
crypto/heimdal/appl/login/login.c
83
if(pid == 0) {
crypto/heimdal/appl/login/login.c
88
if(pid == -1)
crypto/heimdal/appl/login/login.c
92
setproctitle("waitpid %d", pid);
crypto/heimdal/appl/login/login.c
97
ret = waitpid(pid, &status, 0);
crypto/heimdal/appl/login/shadow.c
48
pid_t pid;
crypto/heimdal/appl/login/shadow.c
50
switch (pid = fork()) {
crypto/heimdal/appl/login/shadow.c
58
waitpid(pid, &status, 0);
crypto/heimdal/appl/push/push.c
385
pid_t pid;
crypto/heimdal/appl/push/push.c
387
pid = fork();
crypto/heimdal/appl/push/push.c
388
if (pid < 0)
crypto/heimdal/appl/push/push.c
390
else if(pid != 0) {
crypto/heimdal/appl/rcp/util.c
121
pid_t pid;
crypto/heimdal/appl/rcp/util.c
123
pid = fork();
crypto/heimdal/appl/rcp/util.c
124
switch (pid) {
crypto/heimdal/appl/rcp/util.c
134
if (waitpid(pid, &status, 0) < 0)
crypto/heimdal/appl/rsh/rsh.c
653
pid_t pid;
crypto/heimdal/appl/rsh/rsh.c
658
pid = fork();
crypto/heimdal/appl/rsh/rsh.c
659
if (pid < 0)
crypto/heimdal/appl/rsh/rsh.c
661
else if(pid == 0) {
crypto/heimdal/appl/rsh/rsh.c
684
while(waitpid(pid, &status, 0) < 0)
crypto/heimdal/appl/rsh/rshd.c
509
pid_t pid;
crypto/heimdal/appl/rsh/rshd.c
514
pid = fork ();
crypto/heimdal/appl/rsh/rshd.c
515
if (pid < 0)
crypto/heimdal/appl/rsh/rshd.c
517
if (pid == 0) { /* child */
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1148
int pid = i;
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1158
wtmp.ut_pid = pid;
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1175
utmp_sig_notify(pid);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1288
int pid = getpid();
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1304
utmpx.ut_pid = pid;
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1729
utmp_sig_notify(pid)
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1731
kill(pid, SIGUSR1);
crypto/heimdal/appl/test/gssapi_client.c
230
pid_t pid;
crypto/heimdal/appl/test/gssapi_client.c
236
pid = fork ();
crypto/heimdal/appl/test/gssapi_client.c
237
if (pid < 0)
crypto/heimdal/appl/test/gssapi_client.c
239
if (pid != 0) {
crypto/heimdal/appl/test/gssapi_server.c
260
pid_t pid;
crypto/heimdal/appl/test/gssapi_server.c
266
pid = fork ();
crypto/heimdal/appl/test/gssapi_server.c
267
if (pid < 0)
crypto/heimdal/appl/test/gssapi_server.c
269
if (pid != 0) {
crypto/heimdal/kadmin/kadm_conn.c
132
pid_t pid;
crypto/heimdal/kadmin/kadm_conn.c
155
pid = fork();
crypto/heimdal/kadmin/kadm_conn.c
156
if(pid == 0) {
crypto/heimdal/kcm/acl.c
140
client->pid, kcm_op2string(opcode), ccache->name);
crypto/heimdal/kcm/cache.c
41
char *kcm_ccache_nextid(pid_t pid, uid_t uid, gid_t gid)
crypto/heimdal/kcm/cache.c
443
pid_t pid,
crypto/heimdal/kcm/cache.c
451
name = kcm_ccache_nextid(pid, uid, gid);
crypto/heimdal/kcm/connect.c
54
peercred.pid = heim_ipc_cred_get_pid(cred);
crypto/heimdal/kcm/connect.c
59
peercred.pid);
crypto/heimdal/kcm/connect.c
70
buf[0], buf[1], peercred.pid);
crypto/heimdal/kcm/kcm_locl.h
146
pid_t pid;
crypto/heimdal/kcm/kcm_locl.h
48
kcm_op2string(_opcode), (_client)->pid, (_client)->uid); \
crypto/heimdal/kcm/kcm_locl.h
53
kcm_op2string(_opcode), (_name), (_client)->pid, (_client)->uid); \
crypto/heimdal/kcm/protocol.c
127
name = kcm_ccache_nextid(client->pid, client->uid, client->gid);
crypto/heimdal/kcm/protocol.c
1758
if (client->pid == -1) {
crypto/heimdal/kcm/protocol.c
1767
client->pid);
crypto/heimdal/kcm/protocol.c
1774
kcm_log(0, "Process %d: didn't send a message", client->pid);
crypto/heimdal/kcm/protocol.c
1780
client->pid, opcode);
crypto/heimdal/kcm/protocol.c
1787
client->pid, kcm_op2string(opcode));
crypto/heimdal/lib/ipc/common.c
46
pid_t pid;
crypto/heimdal/lib/ipc/common.c
71
return cred->pid;
crypto/heimdal/lib/ipc/common.c
82
_heim_ipc_create_cred(uid_t uid, gid_t gid, pid_t pid, pid_t session, heim_icred *cred)
crypto/heimdal/lib/ipc/common.c
89
(*cred)->pid = pid;
crypto/heimdal/lib/ipc/server.c
1075
c->unixrights.pid = (pid_t) 0;
crypto/heimdal/lib/ipc/server.c
212
pid_t pid;
crypto/heimdal/lib/ipc/server.c
225
audit_token_to_au32(client_creds, NULL, &uid, &gid, NULL, NULL, &pid, &session, NULL);
crypto/heimdal/lib/ipc/server.c
227
kr = _heim_ipc_create_cred(uid, gid, pid, session, &s->cred);
crypto/heimdal/lib/ipc/server.c
267
pid_t pid;
crypto/heimdal/lib/ipc/server.c
276
audit_token_to_au32(client_creds, NULL, &uid, &gid, NULL, NULL, &pid, &session, NULL);
crypto/heimdal/lib/ipc/server.c
278
kr = _heim_ipc_create_cred(uid, gid, pid, session, &s->cred);
crypto/heimdal/lib/ipc/server.c
476
pid_t pid;
crypto/heimdal/lib/ipc/server.c
508
c->unixrights.pid = 0;
crypto/heimdal/lib/ipc/server.c
523
c->unixrights.pid = 0;
crypto/heimdal/lib/ipc/server.c
537
c->unixrights.pid = pc.pid;
crypto/heimdal/lib/ipc/server.c
553
c->unixrights.pid = peercred.cr_pid;
crypto/heimdal/lib/ipc/server.c
601
c->unixrights.pid = 0;
crypto/heimdal/lib/ipc/server.c
944
c->unixrights.pid, -1, &cs->cred);
crypto/heimdal/lib/roken/getifaddrs.c
337
pid_t pid = getpid();
crypto/heimdal/lib/roken/getifaddrs.c
356
if (nh->nlmsg_pid != pid ||
crypto/heimdal/lib/roken/getifaddrs.c
511
pid_t pid = getpid();
crypto/heimdal/lib/roken/getifaddrs.c
605
if (nlh->nlmsg_pid != pid ||
crypto/heimdal/lib/roken/rkpty.c
205
eval_parent(pid_t pid)
crypto/heimdal/lib/roken/rkpty.c
289
ret = waitpid(pid, &status, 0);
crypto/heimdal/lib/roken/rkpty.c
324
pid_t pid;
crypto/heimdal/lib/roken/rkpty.c
351
pid = fork();
crypto/heimdal/lib/roken/rkpty.c
352
switch (pid) {
crypto/heimdal/lib/roken/rkpty.c
379
return eval_parent(pid);
crypto/heimdal/lib/roken/simple_exec.c
110
kill(pid, SIGTERM);
crypto/heimdal/lib/roken/simple_exec.c
138
wait_for_process(pid_t pid)
crypto/heimdal/lib/roken/simple_exec.c
140
return wait_for_process_timed(pid, NULL, NULL, 0);
crypto/heimdal/lib/roken/simple_exec.c
148
pid_t pid;
crypto/heimdal/lib/roken/simple_exec.c
158
pid = fork();
crypto/heimdal/lib/roken/simple_exec.c
159
switch(pid) {
crypto/heimdal/lib/roken/simple_exec.c
229
return pid;
crypto/heimdal/lib/roken/simple_exec.c
236
pid_t pid = fork();
crypto/heimdal/lib/roken/simple_exec.c
237
switch(pid){
crypto/heimdal/lib/roken/simple_exec.c
244
return wait_for_process_timed(pid, func, ptr, timeout);
crypto/heimdal/lib/roken/simple_exec.c
259
pid_t pid = fork();
crypto/heimdal/lib/roken/simple_exec.c
260
switch(pid){
crypto/heimdal/lib/roken/simple_exec.c
267
return wait_for_process_timed(pid, func, ptr, timeout);
crypto/heimdal/lib/roken/simple_exec.c
82
wait_for_process_timed(pid_t pid, time_t (*func)(void *),
crypto/heimdal/lib/roken/simple_exec.c
99
while(waitpid(pid, &status, 0) < 0) {
crypto/krb5/src/kadmin/server/ovsec_kadmd.c
120
unsigned long pid;
crypto/krb5/src/kadmin/server/ovsec_kadmd.c
126
pid = (unsigned long)getpid();
crypto/krb5/src/kadmin/server/ovsec_kadmd.c
127
st1 = (fprintf(file, "%ld\n", pid) < 0) ? errno : 0;
crypto/krb5/src/kdc/main.c
450
pid_t pid;
crypto/krb5/src/kdc/main.c
462
pid = wait(&status);
crypto/krb5/src/kdc/main.c
463
if (pid >= 0)
crypto/krb5/src/kdc/main.c
478
pid_t pid, *pids;
crypto/krb5/src/kdc/main.c
509
pid = fork();
crypto/krb5/src/kdc/main.c
510
if (pid == 0) {
crypto/krb5/src/kdc/main.c
520
"handlers in pid %d"), pid);
crypto/krb5/src/kdc/main.c
531
if (pid == -1) {
crypto/krb5/src/kdc/main.c
538
pids[i] = pid;
crypto/krb5/src/kdc/main.c
547
pid = wait(&status);
crypto/krb5/src/kdc/main.c
548
if (pid >= 0) {
crypto/krb5/src/kdc/main.c
550
(long) pid, status);
crypto/krb5/src/kdc/main.c
554
if (pids[i] == pid)
crypto/krb5/src/kdc/main.c
837
unsigned long pid;
crypto/krb5/src/kdc/main.c
843
pid = (unsigned long)getpid();
crypto/krb5/src/kdc/main.c
844
st1 = (fprintf(file, "%ld\n", pid) < 0) ? errno : 0;
crypto/krb5/src/kprop/kpropd.c
183
unsigned long pid;
crypto/krb5/src/kprop/kpropd.c
189
pid = (unsigned long)getpid();
crypto/krb5/src/kprop/kpropd.c
190
st1 = (fprintf(fp, "%ld\n", pid) < 0) ? errno : 0;
crypto/krb5/src/lib/crypto/builtin/des/t_verify.c
74
int pid;
crypto/krb5/src/lib/crypto/crypto_tests/t_fork.c
107
if (pid != 0) {
crypto/krb5/src/lib/crypto/crypto_tests/t_fork.c
109
assert(wpid == pid);
crypto/krb5/src/lib/crypto/crypto_tests/t_fork.c
64
pid_t pid, wpid;
crypto/krb5/src/lib/crypto/crypto_tests/t_fork.c
84
pid = fork();
crypto/krb5/src/lib/crypto/crypto_tests/t_fork.c
85
assert(pid >= 0);
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
124
pid_t *pids, pid;
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
138
pid = wait(&status);
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
139
assert(pid != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0);
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
141
if (pids[i] == pid)
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
155
pid_t pid;
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
160
pid = fork();
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
161
assert(pid != -1);
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
162
if (pid == 0)
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
168
pid = wait(&status);
crypto/krb5/src/lib/krb5/rcache/t_rcfile2.c
169
assert(pid != -1);
crypto/krb5/src/util/support/mkstemp.c
82
u_int pid;
crypto/krb5/src/util/support/mkstemp.c
84
pid = getpid();
crypto/krb5/src/util/support/mkstemp.c
87
*trv = (pid % 10) + '0';
crypto/krb5/src/util/support/mkstemp.c
88
pid /= 10;
crypto/krb5/src/util/verto/ev.c
2636
child_reap (EV_P_ int chain, int pid, int status)
crypto/krb5/src/util/verto/ev.c
2643
if ((w->pid == pid || !w->pid)
crypto/krb5/src/util/verto/ev.c
2647
w->rpid = pid;
crypto/krb5/src/util/verto/ev.c
2662
int pid, status;
crypto/krb5/src/util/verto/ev.c
2665
if (0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED)))
crypto/krb5/src/util/verto/ev.c
2668
|| 0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED)))
crypto/krb5/src/util/verto/ev.c
2675
child_reap (EV_A_ pid, pid, status);
crypto/krb5/src/util/verto/ev.c
2677
child_reap (EV_A_ 0, pid, status); /* this might trigger a watcher twice, but feed_event catches that */
crypto/krb5/src/util/verto/ev.c
4176
wlist_add (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w);
crypto/krb5/src/util/verto/ev.c
4190
wlist_del (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w);
crypto/krb5/src/util/verto/ev.h
362
int pid; /* ro */
crypto/krb5/src/util/verto/ev.h
697
#define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0)
crypto/krb5/src/util/verto/ev.h
711
#define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0)
crypto/krb5/src/windows/installer/wix/custom/custom.cpp
325
DWORD pid;
crypto/openssh/audit-bsm.c
260
pid_t pid = getpid();
crypto/openssh/audit-bsm.c
278
pid, pid, &tid));
crypto/openssh/auth-pam.c
192
pid_t pid;
crypto/openssh/auth-pam.c
196
switch ((pid = fork())) {
crypto/openssh/auth-pam.c
206
*thread = pid;
crypto/openssh/auth2-pubkey.c
388
pid_t pid;
crypto/openssh/auth2-pubkey.c
478
if ((pid = subprocess("AuthorizedPrincipalsCommand", command,
crypto/openssh/auth2-pubkey.c
492
if (exited_cleanly(pid, "AuthorizedPrincipalsCommand", command, 0) != 0)
crypto/openssh/auth2-pubkey.c
661
pid_t pid;
crypto/openssh/auth2-pubkey.c
748
if ((pid = subprocess("AuthorizedKeysCommand", command,
crypto/openssh/auth2-pubkey.c
764
if (exited_cleanly(pid, "AuthorizedKeysCommand", command, 0) != 0)
crypto/openssh/clientloop.c
1175
pid_t pid;
crypto/openssh/clientloop.c
1301
pid = fork();
crypto/openssh/clientloop.c
1302
if (pid == -1) {
crypto/openssh/clientloop.c
1306
if (pid != 0) { /* This is the parent. */
crypto/openssh/loginrec.c
1742
li.pid = getpid();
crypto/openssh/loginrec.c
331
logininfo *login_alloc_entry(pid_t pid, const char *username,
crypto/openssh/loginrec.c
337
login_init_entry(newli, pid, username, hostname, line);
crypto/openssh/loginrec.c
359
login_init_entry(struct logininfo *li, pid_t pid, const char *username,
crypto/openssh/loginrec.c
366
li->pid = pid;
crypto/openssh/loginrec.c
673
ut->ut_pid = li->pid;
crypto/openssh/loginrec.c
756
utx->ut_pid = li->pid;
crypto/openssh/loginrec.h
68
pid_t pid; /* PID of login process */
crypto/openssh/loginrec.h
94
struct logininfo *login_alloc_entry(pid_t pid, const char *username,
crypto/openssh/loginrec.h
99
int login_init_entry(struct logininfo *li, pid_t pid, const char *username,
crypto/openssh/logintest.c
76
li->pid, li->uid, li->line,
crypto/openssh/misc.c
2219
exited_cleanly(pid_t pid, const char *tag, const char *cmd, int quiet)
crypto/openssh/misc.c
2223
while (waitpid(pid, &status, 0) == -1) {
crypto/openssh/misc.c
2766
pid_t pid;
crypto/openssh/misc.c
2828
switch ((pid = fork())) {
crypto/openssh/misc.c
2912
kill(pid, SIGTERM);
crypto/openssh/misc.c
2913
while (waitpid(pid, NULL, 0) == -1 && errno == EINTR)
crypto/openssh/misc.c
2918
debug3_f("%s pid %ld", tag, (long)pid);
crypto/openssh/misc.c
2921
return pid;
crypto/openssh/monitor.c
1652
record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid,
crypto/openssh/monitor.c
1660
debug3_f("session %d pid %ld", s->self, (long)s->pid);
crypto/openssh/monitor.c
1683
s->pid = pmonitor->m_pid;
crypto/openssh/monitor.c
396
monitor_set_child_handler(pid_t pid)
crypto/openssh/monitor.c
398
monitor_child_pid = pid;
crypto/openssh/mux.c
1660
u_int pid, type, rid;
crypto/openssh/mux.c
1695
if ((r = sshbuf_get_u32(m, &pid)) != 0)
crypto/openssh/mux.c
1699
debug3_f("done pid = %u", pid);
crypto/openssh/mux.c
1703
return pid;
crypto/openssh/mux.c
2268
u_int pid;
crypto/openssh/mux.c
2335
if ((pid = mux_client_request_alive(sock)) == 0)
crypto/openssh/mux.c
2337
fprintf(stderr, "Master running (pid=%u)\r\n", pid);
crypto/openssh/openbsd-compat/arc4random.h
55
pid_t pid = getpid();
crypto/openssh/openbsd-compat/arc4random.h
57
if (_rs_pid == 0 || _rs_pid == 1 || _rs_pid != pid || _rs_forked) {
crypto/openssh/openbsd-compat/arc4random.h
58
_rs_pid = pid;
crypto/openssh/openbsd-compat/bsd-closefrom.c
100
sz = proc_pidinfo(pid, PROC_PIDLISTFDS, 0, NULL, 0);
crypto/openssh/openbsd-compat/bsd-closefrom.c
107
r = proc_pidinfo(pid, PROC_PIDLISTFDS, 0, fdinfo_buf, sz);
crypto/openssh/openbsd-compat/bsd-closefrom.c
97
pid_t pid = getpid();
crypto/openssh/openbsd-compat/bsd-misc.c
343
getpgid(pid_t pid)
crypto/openssh/openbsd-compat/bsd-misc.c
346
return getpgrp(pid);
crypto/openssh/openbsd-compat/bsd-misc.c
348
if (pid == 0)
crypto/openssh/openbsd-compat/bsd-misc.c
408
getsid(pid_t pid)
crypto/openssh/openbsd-compat/bsd-waitpid.c
33
waitpid(int pid, int *stat_loc, int options)
crypto/openssh/openbsd-compat/bsd-waitpid.c
38
if (pid <= 0) {
crypto/openssh/openbsd-compat/bsd-waitpid.c
39
if (pid != -1) {
crypto/openssh/openbsd-compat/bsd-waitpid.c
44
pid = 0;
crypto/openssh/openbsd-compat/bsd-waitpid.c
46
wait_pid = wait4(pid, &statusp, options, NULL);
crypto/openssh/openbsd-compat/port-solaris.c
139
solaris_contract_post_fork_parent(pid_t pid)
crypto/openssh/openbsd-compat/port-solaris.c
163
if (r != 0 || pid <= 0)
crypto/openssh/openbsd-compat/port-solaris.h
25
void solaris_contract_post_fork_parent(pid_t pid);
crypto/openssh/readconf.c
541
pid_t pid;
crypto/openssh/readconf.c
555
if ((pid = fork()) == 0) {
crypto/openssh/readconf.c
575
if (pid == -1)
crypto/openssh/readconf.c
578
while (waitpid(pid, &status, 0) == -1) {
crypto/openssh/readpass.c
235
pid_t pid;
crypto/openssh/readpass.c
244
pid_t pid = -1;
crypto/openssh/readpass.c
272
if ((pid = fork()) == -1) {
crypto/openssh/readpass.c
278
if (pid == 0) {
crypto/openssh/readpass.c
290
if (pid != -1)
crypto/openssh/readpass.c
291
kill(pid, SIGTERM);
crypto/openssh/readpass.c
294
ret->pid = pid;
crypto/openssh/readpass.c
308
if (ctx != NULL && fmt != NULL && ctx->pid == -1) {
crypto/openssh/readpass.c
320
if (ctx == NULL || ctx->pid <= 0) {
crypto/openssh/readpass.c
324
kill(ctx->pid, SIGTERM);
crypto/openssh/readpass.c
325
while ((ret = waitpid(ctx->pid, NULL, 0)) == -1) {
crypto/openssh/readpass.c
53
pid_t pid, ret;
crypto/openssh/readpass.c
69
if ((pid = fork()) == -1) {
crypto/openssh/readpass.c
74
if (pid == 0) {
crypto/openssh/readpass.c
98
while ((ret = waitpid(pid, &status, 0)) == -1)
crypto/openssh/scp.c
210
suspone(int pid, int signo)
crypto/openssh/scp.c
214
if (pid > 1) {
crypto/openssh/scp.c
215
kill(pid, signo);
crypto/openssh/scp.c
216
while (waitpid(pid, &status, WUNTRACED) == -1 &&
crypto/openssh/scp.c
237
pid_t pid;
crypto/openssh/scp.c
248
if ((pid = fork()) == -1)
crypto/openssh/scp.c
251
if (pid == 0) {
crypto/openssh/scp.c
257
do_cmd_pid = pid;
crypto/openssh/scp.c
262
while (waitpid(pid, &status, 0) == -1)
crypto/openssh/scp.c
282
char *cmd, int *fdin, int *fdout, pid_t *pid)
crypto/openssh/scp.c
313
*pid = fork();
crypto/openssh/scp.c
314
switch (*pid) {
crypto/openssh/scp.c
385
pid_t pid;
crypto/openssh/scp.c
397
pid = fork();
crypto/openssh/scp.c
398
if (pid == 0) {
crypto/openssh/scp.c
421
} else if (pid == -1) {
crypto/openssh/scp.c
424
while (waitpid(pid, &status, 0) == -1)
crypto/openssh/serverloop.c
305
pid_t pid;
crypto/openssh/serverloop.c
310
while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
crypto/openssh/serverloop.c
311
(pid == -1 && errno == EINTR))
crypto/openssh/serverloop.c
312
if (pid > 0)
crypto/openssh/serverloop.c
313
session_close_by_pid(ssh, pid, status);
crypto/openssh/session.c
1797
(long)s->pid);
crypto/openssh/session.c
1876
session_by_pid(pid_t pid)
crypto/openssh/session.c
1879
debug("session_by_pid: pid %ld", (long)pid);
crypto/openssh/session.c
1882
if (s->used && s->pid == pid)
crypto/openssh/session.c
1885
error("session_by_pid: unknown pid %ld", (long)pid);
crypto/openssh/session.c
2156
if (s->pid <= 0) {
crypto/openssh/session.c
2166
debug_f("signal %s, killpg(%ld, %d)", signame, (long)s->pid, sig);
crypto/openssh/session.c
2168
r = killpg(s->pid, sig);
crypto/openssh/session.c
2171
error_f("killpg(%ld, %d): %s", (long)s->pid,
crypto/openssh/session.c
2282
if (s->pid != 0)
crypto/openssh/session.c
2283
record_logout(s->pid, s->tty, s->pw->pw_name);
crypto/openssh/session.c
2413
(long)s->pid, note == NULL ? "UNKNOWN" : note);
crypto/openssh/session.c
2468
session_close_by_pid(struct ssh *ssh, pid_t pid, int status)
crypto/openssh/session.c
2470
Session *s = session_by_pid(pid);
crypto/openssh/session.c
2472
debug_f("no session for pid %ld", (long)pid);
crypto/openssh/session.c
2479
s->pid = 0;
crypto/openssh/session.c
2496
debug_f("channel %d child %ld", id, (long)s->pid);
crypto/openssh/session.c
2497
if (s->pid != 0) {
crypto/openssh/session.c
401
pid_t pid;
crypto/openssh/session.c
449
switch ((pid = fork())) {
crypto/openssh/session.c
526
s->pid = pid;
crypto/openssh/session.c
571
pid_t pid;
crypto/openssh/session.c
601
switch ((pid = fork())) {
crypto/openssh/session.c
650
s->pid = pid;
crypto/openssh/session.h
37
pid_t pid;
crypto/openssh/sftp.c
223
pid_t pid;
crypto/openssh/sftp.c
225
pid = sshpid;
crypto/openssh/sftp.c
226
if (pid > 1) {
crypto/openssh/sftp.c
227
kill(pid, SIGTERM);
crypto/openssh/sftp.c
228
(void)waitpid(pid, NULL, 0);
crypto/openssh/sftp.c
268
pid_t pid;
crypto/openssh/sftp.c
272
while ((pid = waitpid(sshpid, NULL, WNOHANG)) == -1 && errno == EINTR)
crypto/openssh/sftp.c
274
if (pid == sshpid) {
crypto/openssh/sftp.c
328
pid_t pid;
crypto/openssh/sftp.c
336
if ((pid = fork()) == -1)
crypto/openssh/sftp.c
339
if (pid == 0) {
crypto/openssh/sftp.c
352
while (waitpid(pid, &status, 0) == -1)
crypto/openssh/ssh-agent.c
2254
pid_t pid;
crypto/openssh/ssh-agent.c
2255
char pidstrbuf[1 + 3 * sizeof pid];
crypto/openssh/ssh-agent.c
2370
pid = (int)strtonum(pidstr, 2, INT_MAX, &errstr);
crypto/openssh/ssh-agent.c
2377
if (kill(pid, SIGTERM) == -1) {
crypto/openssh/ssh-agent.c
2384
printf("echo Agent pid %ld killed;\n", (long)pid);
crypto/openssh/ssh-agent.c
2411
pid = (int)strtonum(pidstr, 1, INT_MAX, &errstr);
crypto/openssh/ssh-agent.c
2414
if (pid != getpid())
crypto/openssh/ssh-agent.c
2415
fatal("bad LISTEN_PID: %d vs pid %d", pid, getpid());
crypto/openssh/ssh-agent.c
2473
pid = fork();
crypto/openssh/ssh-agent.c
2474
if (pid == -1) {
crypto/openssh/ssh-agent.c
2478
if (pid != 0) { /* Parent - execute the given command. */
crypto/openssh/ssh-agent.c
2480
snprintf(pidstrbuf, sizeof pidstrbuf, "%ld", (long)pid);
crypto/openssh/ssh-agent.c
2487
printf("echo Agent pid %ld;\n", (long)pid);
crypto/openssh/ssh-pkcs11-client.c
172
helper->pid = -1;
crypto/openssh/ssh-pkcs11-client.c
569
pid_t pid;
crypto/openssh/ssh-pkcs11-client.c
583
if ((pid = fork()) == -1) {
crypto/openssh/ssh-pkcs11-client.c
594
} else if (pid == 0) {
crypto/openssh/ssh-pkcs11-client.c
616
helper->pid = pid;
crypto/openssh/ssh-pkcs11-client.c
618
helper->path, helper->fd, (long)helper->pid);
crypto/openssh/ssh-pkcs11-client.c
64
pid_t pid;
crypto/openssh/ssh-sk-client.c
104
debug3_f("started pid=%ld", (long)pid);
crypto/openssh/ssh-sk-client.c
106
*pidp = pid;
crypto/openssh/ssh-sk-client.c
112
reap_helper(pid_t pid)
crypto/openssh/ssh-sk-client.c
116
debug3_f("pid=%ld", (long)pid);
crypto/openssh/ssh-sk-client.c
119
while (waitpid(pid, &status, 0) == -1) {
crypto/openssh/ssh-sk-client.c
144
pid_t pid;
crypto/openssh/ssh-sk-client.c
150
if ((r = start_helper(&fd, &pid, &osigchld)) != 0)
crypto/openssh/ssh-sk-client.c
211
if ((r2 = reap_helper(pid)) != 0) {
crypto/openssh/ssh-sk-client.c
51
pid_t pid;
crypto/openssh/ssh-sk-client.c
77
if ((pid = fork()) == -1) {
crypto/openssh/ssh-sk-client.c
86
if (pid == 0) {
crypto/openssh/ssh.c
1886
pid_t pid;
crypto/openssh/ssh.c
1894
switch ((pid = fork())) {
crypto/openssh/ssh.c
1905
debug2_f("background process is %ld", (long)pid);
crypto/openssh/ssh.c
2544
pid_t pid;
crypto/openssh/ssh.c
2547
while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
crypto/openssh/ssh.c
2548
(pid == -1 && errno == EINTR))
crypto/openssh/sshconnect.c
119
pid_t pid;
crypto/openssh/sshconnect.c
134
if ((pid = fork()) == 0) {
crypto/openssh/sshconnect.c
1707
pid_t pid;
crypto/openssh/sshconnect.c
1719
pid = fork();
crypto/openssh/sshconnect.c
172
if (pid == -1)
crypto/openssh/sshconnect.c
1720
if (pid == 0) {
crypto/openssh/sshconnect.c
1727
} else if (pid == -1)
crypto/openssh/sshconnect.c
1729
while (waitpid(pid, &status, 0) == -1)
crypto/openssh/sshconnect.c
181
while (waitpid(pid, NULL, 0) == -1)
crypto/openssh/sshconnect.c
201
pid_t pid;
crypto/openssh/sshconnect.c
217
if ((pid = fork()) == 0) {
crypto/openssh/sshconnect.c
256
if (pid == -1)
crypto/openssh/sshconnect.c
259
proxy_command_pid = pid; /* save pid to clean up later */
crypto/openssh/sshconnect.c
889
pid_t pid;
crypto/openssh/sshconnect.c
935
if ((pid = subprocess(tag, command, ac, av, &f,
crypto/openssh/sshconnect.c
942
if (exited_cleanly(pid, tag, command, 0) != 0)
crypto/openssh/sshconnect2.c
2017
pid_t pid;
crypto/openssh/sshconnect2.c
2042
if ((pid = fork()) == -1) {
crypto/openssh/sshconnect2.c
2047
if (pid == 0) {
crypto/openssh/sshconnect2.c
2092
while (waitpid(pid, &status, 0) == -1) {
crypto/openssh/sshconnect2.c
2094
error_f("waitpid %ld: %s", (long)pid, strerror(errno));
crypto/openssh/sshd-session.c
341
pid_t pid;
crypto/openssh/sshd-session.c
348
if ((pid = fork()) == -1)
crypto/openssh/sshd-session.c
350
else if (pid != 0) {
crypto/openssh/sshd-session.c
351
debug2("Network child is on pid %ld", (long)pid);
crypto/openssh/sshd-session.c
353
pmonitor->m_pid = pid;
crypto/openssh/sshd-session.c
364
while (waitpid(pid, &status, 0) == -1) {
crypto/openssh/sshd.c
1120
if (children[i].pid > 0)
crypto/openssh/sshd.c
1121
kill(children[i].pid, SIGTERM);
crypto/openssh/sshd.c
1131
"config", (long)children[i].pid,
crypto/openssh/sshd.c
1136
(long)children[i].pid,
crypto/openssh/sshd.c
1142
(int)c, (long)children[i].pid,
crypto/openssh/sshd.c
1247
if ((child->pid = fork()) == 0) {
crypto/openssh/sshd.c
1271
platform_post_fork_parent(child->pid);
crypto/openssh/sshd.c
1272
if (child->pid == -1)
crypto/openssh/sshd.c
1275
debug("Forked child %ld.", (long)child->pid);
crypto/openssh/sshd.c
197
pid_t pid;
crypto/openssh/sshd.c
244
children[i].pid = -1;
crypto/openssh/sshd.c
263
children[i].pid > 0)
crypto/openssh/sshd.c
314
child->pid = -1;
crypto/openssh/sshd.c
332
if (child->pid == -1 || force_final)
crypto/openssh/sshd.c
338
child_exit(pid_t pid, int status)
crypto/openssh/sshd.c
342
if (children == NULL || pid <= 0)
crypto/openssh/sshd.c
345
if (children[i].pid == pid) {
crypto/openssh/sshd.c
384
"signal %d%s", (long)child->pid, child->id,
crypto/openssh/sshd.c
391
"status=0x%x%s", (long)child->pid, child->id, child->status,
crypto/openssh/sshd.c
398
"normally%s", (long)child->pid, child->id,
crypto/openssh/sshd.c
404
"pid = %ld%s", child->id, (long)child->pid,
crypto/openssh/sshd.c
410
(long)child->pid, child->id, child_status);
crypto/openssh/sshd.c
416
(long)child->pid, child->id, child_status);
crypto/openssh/sshd.c
422
(long)child->pid, child->id, child_status);
crypto/openssh/sshd.c
427
"with status %d%s", (long)child->pid, child->id,
crypto/openssh/sshd.c
436
child->pid = -1;
crypto/openssh/sshd.c
447
pid_t pid;
crypto/openssh/sshd.c
454
if ((pid = waitpid(-1, &status, WNOHANG)) == 0)
crypto/openssh/sshd.c
456
else if (pid == -1) {
crypto/openssh/sshd.c
463
child_exit(pid, status);
crypto/openssh/sshd.c
498
if (children[i].pipefd == -1 && children[i].pid <= 0)
crypto/openssh/sshd.c
509
(long)children[i].pid, children[i].id, child_status);
crypto/openssh/sshd.c
803
pid_t pid;
crypto/openssh/sshd.c
805
if ((pid = fork()) == -1)
crypto/openssh/sshd.c
807
if (pid != 0)
crypto/openssh/sshlogin.c
137
record_login(pid_t pid, const char *tty, const char *user, uid_t uid,
crypto/openssh/sshlogin.c
145
li = login_alloc_entry(pid, user, host, tty);
crypto/openssh/sshlogin.c
153
record_utmp_only(pid_t pid, const char *ttyname, const char *user,
crypto/openssh/sshlogin.c
158
li = login_alloc_entry(pid, user, host, ttyname);
crypto/openssh/sshlogin.c
167
record_logout(pid_t pid, const char *tty, const char *user)
crypto/openssh/sshlogin.c
171
li = login_alloc_entry(pid, user, NULL, tty);
crypto/openssl/apps/lib/vms_term_sock.c
559
static unsigned int pid = 0;
crypto/openssl/apps/lib/vms_term_sock.c
568
if (pid == 0)
crypto/openssl/apps/lib/vms_term_sock.c
569
pid = getpid();
crypto/openssl/apps/lib/vms_term_sock.c
583
LocTime->tm_sec, pid, msg);
crypto/openssl/apps/ocsp.c
38
int setpgid(pid_t pid, pid_t pgid)
crypto/openssl/crypto/cms/cms_env.c
793
ASN1_OCTET_STRING **pid,
crypto/openssl/crypto/cms/cms_env.c
806
if (pid)
crypto/openssl/crypto/cms/cms_env.c
807
*pid = rkid->keyIdentifier;
crypto/openssl/crypto/err/err.c
662
void ERR_remove_state(unsigned long pid)
crypto/openssl/crypto/ocsp/ocsp_cl.c
184
const ASN1_OCTET_STRING **pid,
crypto/openssl/crypto/ocsp/ocsp_cl.c
191
*pid = NULL;
crypto/openssl/crypto/ocsp/ocsp_cl.c
193
*pid = rid->value.byKey;
crypto/openssl/crypto/ocsp/ocsp_cl.c
202
ASN1_OCTET_STRING **pid,
crypto/openssl/crypto/ocsp/ocsp_cl.c
209
*pid = NULL;
crypto/openssl/crypto/ocsp/ocsp_cl.c
211
*pid = ASN1_OCTET_STRING_dup(rid->value.byKey);
crypto/openssl/crypto/ocsp/ocsp_cl.c
216
if (*pname == NULL && *pid == NULL)
crypto/openssl/include/openssl/cms.h
341
ASN1_OCTET_STRING **pid,
crypto/openssl/include/openssl/err.h
493
OSSL_DEPRECATEDIN_1_0_0 void ERR_remove_state(unsigned long pid);
crypto/openssl/include/openssl/ocsp.h
339
const ASN1_OCTET_STRING **pid,
crypto/openssl/include/openssl/ocsp.h
342
ASN1_OCTET_STRING **pid,
crypto/openssl/providers/implementations/rands/seeding/rand_unix.c
753
pid_t pid;
crypto/openssl/providers/implementations/rands/seeding/rand_unix.c
766
data.pid = getpid();
crypto/openssl/providers/implementations/rands/seeding/rand_vms.c
558
pid_t pid;
crypto/openssl/providers/implementations/rands/seeding/rand_vms.c
588
data.pid = getpid();
crypto/openssl/providers/implementations/rands/seeding/rand_vxworks.c
82
pid_t pid;
crypto/openssl/providers/implementations/rands/seeding/rand_vxworks.c
94
data.pid = getpid();
crypto/openssl/providers/implementations/rands/seeding/rand_win.c
131
DWORD pid;
crypto/openssl/providers/implementations/rands/seeding/rand_win.c
144
data.pid = GetCurrentProcessId();
crypto/openssl/test/drbgtest.c
283
pid_t pid; /* process id */
crypto/openssl/test/drbgtest.c
335
pid_t pid;
crypto/openssl/test/drbgtest.c
341
if (!TEST_int_ge(pid = fork(), 0)) {
crypto/openssl/test/drbgtest.c
345
} else if (pid > 0) {
crypto/openssl/test/drbgtest.c
351
if (TEST_int_eq(waitpid(pid, &status, 0), pid)
crypto/openssl/test/drbgtest.c
357
result[0].pid = pid;
crypto/openssl/test/drbgtest.c
362
result[1].pid = pid;
crypto/openssl/test/drbgtest.c
402
pid_t pid = getpid();
crypto/openssl/test/drbgtest.c
442
result[0].pid = pid;
crypto/openssl/test/drbgtest.c
447
result[1].pid = pid;
crypto/openssl/test/drbgtest.c
505
result[i].pid,
include/protocols/talkd.h
73
int32_t pid; /* caller's process id */
include/sched.h
42
int sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset);
include/sched.h
43
int sched_setaffinity(pid_t pid, size_t cpusetsz, const cpuset_t *cpuset);
lib/csu/tests/cxx_constructors.cc
77
pid_t pid, wpid;
lib/csu/tests/cxx_constructors.cc
80
pid = fork();
lib/csu/tests/cxx_constructors.cc
81
switch(pid) {
lib/csu/tests/cxx_constructors.cc
88
while ((wpid = waitpid(pid, &status, 0)) == -1 &&
lib/csu/tests/fini_test.c
112
pid_t pid, wpid;
lib/csu/tests/fini_test.c
115
pid = fork();
lib/csu/tests/fini_test.c
116
switch(pid) {
lib/csu/tests/fini_test.c
123
while ((wpid = waitpid(pid, &status, 0)) == -1 &&
lib/csu/tests/fini_test.c
70
pid_t pid, wpid;
lib/csu/tests/fini_test.c
73
pid = fork();
lib/csu/tests/fini_test.c
74
switch(pid) {
lib/csu/tests/fini_test.c
81
while ((wpid = waitpid(pid, &status, 0)) == -1 &&
lib/libc/compat-43/setpgrp.c
36
setpgrp(pid_t pid, pid_t pgid)
lib/libc/compat-43/setpgrp.c
38
return(setpgid(pid, pgid));
lib/libc/gen/clock_getcpuclockid.c
35
clock_getcpuclockid(pid_t pid, clockid_t *clock_id)
lib/libc/gen/clock_getcpuclockid.c
37
if (clock_getcpuclockid2(pid, CPUCLOCK_WHICH_PID, clock_id))
lib/libc/gen/popen.c
116
switch (pid = vfork()) {
lib/libc/gen/popen.c
167
cur->pid = pid;
lib/libc/gen/popen.c
191
struct pid *cur, *last = NULL;
lib/libc/gen/popen.c
193
pid_t pid;
lib/libc/gen/popen.c
217
pid = _wait4(cur->pid, &pstat, 0, (struct rusage *)0);
lib/libc/gen/popen.c
218
} while (pid == -1 && errno == EINTR);
lib/libc/gen/popen.c
222
return (pid == -1 ? -1 : pstat);
lib/libc/gen/popen.c
53
SLIST_ENTRY(pid) next;
lib/libc/gen/popen.c
55
pid_t pid;
lib/libc/gen/popen.c
57
static SLIST_HEAD(, pid) pidlist = SLIST_HEAD_INITIALIZER(pidlist);
lib/libc/gen/popen.c
66
struct pid *cur;
lib/libc/gen/popen.c
68
int pdes[2], pid, twoway, cloexec;
lib/libc/gen/popen.c
71
struct pid *p;
lib/libc/gen/popen.c
90
if ((cur = malloc(sizeof(struct pid))) == NULL) {
lib/libc/gen/posix_spawn.c
279
do_posix_spawn(pid_t *pid, const char *path,
lib/libc/gen/posix_spawn.c
389
} else if (pid != NULL) {
lib/libc/gen/posix_spawn.c
391
*pid = p;
lib/libc/gen/posix_spawn.c
399
posix_spawn(pid_t *pid, const char *path,
lib/libc/gen/posix_spawn.c
404
return (do_posix_spawn(pid, path, fa, sa, argv, envp, 0));
lib/libc/gen/posix_spawn.c
408
posix_spawnp(pid_t *pid, const char *path,
lib/libc/gen/posix_spawn.c
413
return (do_posix_spawn(pid, path, fa, sa, argv, envp, 1));
lib/libc/gen/sched_getaffinity.c
38
sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset)
lib/libc/gen/sched_getaffinity.c
44
if (pid == 0 || pid > _PID_MAX)
lib/libc/gen/sched_getaffinity.c
52
pid == 0 ? -1 : pid, cpusetsz, cpuset);
lib/libc/gen/sched_setaffinity.c
39
sched_setaffinity(pid_t pid, size_t cpusetsz, const cpuset_t *cpuset)
lib/libc/gen/sched_setaffinity.c
48
if (pid == 0 || pid > _PID_MAX)
lib/libc/gen/sched_setaffinity.c
74
pid == 0 ? -1 : pid, sizeof(cpuset_t), &c);
lib/libc/gen/syslog.c
471
pid_t pid;
lib/libc/gen/syslog.c
490
pid = (pid_t)strtol(begin + 1, &p, 10);
lib/libc/gen/syslog.c
494
LogPid = pid;
lib/libc/gen/termios.c
109
tcsetsid(int fd, pid_t pid)
lib/libc/gen/termios.c
112
if (pid != getsid(0)) {
lib/libc/gen/wordexp.c
131
pid_t pid; /* Process ID of child */
lib/libc/gen/wordexp.c
156
if ((pid = fork()) < 0) {
lib/libc/gen/wordexp.c
166
else if (pid == 0) {
lib/libc/gen/wordexp.c
261
wpid = _waitpid(pid, &status, 0);
lib/libc/net/rcmd.c
111
pid = getpid();
lib/libc/net/rcmd.c
160
_fcntl(s, F_SETOWN, pid);
lib/libc/net/rcmd.c
86
pid_t pid;
lib/libc/posix1e/mac_get.c
41
extern int __mac_get_pid(pid_t pid, struct mac *mac_p);
lib/libc/posix1e/mac_get.c
75
mac_get_pid(pid_t pid, struct mac *label)
lib/libc/posix1e/mac_get.c
78
return (__mac_get_pid(pid, label));
lib/libc/rpc/clnt_simple.c
151
if (!(rcp->valid && rcp->pid == getpid() &&
lib/libc/rpc/clnt_simple.c
165
rcp->pid = getpid();
lib/libc/rpc/clnt_simple.c
66
pid_t pid; /* process-id at moment of creation */
lib/libc/rpc/key_call.c
260
pid_t pid; /* process-id at moment of creation */
lib/libc/rpc/key_call.c
326
if (kcp->client != NULL && kcp->pid != getpid()) {
lib/libc/rpc/key_call.c
393
kcp->pid = getpid();
lib/libc/stdlib/system.c
112
while (_wait4(pid, &pstat, 0, NULL) < 0) {
lib/libc/stdlib/system.c
66
pid_t pid;
lib/libc/stdlib/system.c
94
if ((pid = fork()) < 0) { /* error */
lib/libc/stdlib/system.c
96
} else if (pid == 0) { /* child */
lib/libc/sys/wait4.c
38
wait4(pid_t pid, int *status, int options, struct rusage *ru)
lib/libc/sys/wait4.c
40
return (INTERPOS_SYS(wait4, pid, status, options, ru));
lib/libc/sys/waitpid.c
44
__waitpid(pid_t pid, int *istat, int options)
lib/libc/sys/waitpid.c
46
return (INTERPOS_SYS(wait4, pid, istat, options, NULL));
lib/libc/tests/gen/arc4random_test.c
57
pid_t pid;
lib/libc/tests/gen/arc4random_test.c
66
pid = fork();
lib/libc/tests/gen/arc4random_test.c
67
ATF_REQUIRE(0 <= pid);
lib/libc/tests/gen/arc4random_test.c
68
if (pid == 0) {
lib/libc/tests/gen/fmtmsg_test.c
161
pid_t pid, wpid;
lib/libc/tests/gen/fmtmsg_test.c
169
pid = fork();
lib/libc/tests/gen/fmtmsg_test.c
170
if (pid == -1)
lib/libc/tests/gen/fmtmsg_test.c
172
if (pid == 0) {
lib/libc/tests/gen/fmtmsg_test.c
208
while ((wpid = waitpid(pid, &status, 0)) == -1 && errno == EINTR)
lib/libc/tests/gen/posix_spawn_test.c
106
pid_t pid, waitres;
lib/libc/tests/gen/posix_spawn_test.c
112
error = posix_spawnp(&pid, myargs[0], NULL, NULL, myargs, myenv);
lib/libc/tests/gen/posix_spawn_test.c
114
waitres = waitpid(pid, &status, 0);
lib/libc/tests/gen/posix_spawn_test.c
115
ATF_REQUIRE(waitres == pid);
lib/libc/tests/gen/posix_spawn_test.c
125
pid_t pid;
lib/libc/tests/gen/posix_spawn_test.c
130
error = posix_spawnp(&pid, buf, NULL, NULL, myargs, myenv);
lib/libc/tests/gen/posix_spawn_test.c
164
pid_t pid;
lib/libc/tests/gen/posix_spawn_test.c
169
error = posix_spawnp(&pid, myargs[0], NULL, NULL, myargs,
lib/libc/tests/gen/posix_spawn_test.c
55
pid_t pid, waitres;
lib/libc/tests/gen/posix_spawn_test.c
67
error = posix_spawnp(&pid, myargs[0], NULL, NULL, myargs, myenv);
lib/libc/tests/gen/posix_spawn_test.c
69
waitres = waitpid(pid, &status, 0);
lib/libc/tests/gen/posix_spawn_test.c
70
ATF_REQUIRE(waitres == pid);
lib/libc/tests/gen/posix_spawn_test.c
79
pid_t pid, waitres;
lib/libc/tests/gen/posix_spawn_test.c
88
error = posix_spawn(&pid, myargs[0], NULL, NULL, myargs, myenv);
lib/libc/tests/gen/posix_spawn_test.c
90
waitres = waitpid(pid, &status, 0);
lib/libc/tests/gen/posix_spawn_test.c
91
ATF_REQUIRE(waitres == pid);
lib/libc/tests/stdio/getdelim_test.c
287
pid_t pid;
lib/libc/tests/stdio/getdelim_test.c
298
ATF_REQUIRE((pid = fork()) >= 0);
lib/libc/tests/stdio/getdelim_test.c
299
if (pid == 0) {
lib/libc/tests/stdio/getdelim_test.c
398
ATF_REQUIRE(waitpid(pid, &status, WEXITED) != -1);
lib/libc/tests/stdlib/libc_exit_test.c
101
ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0),
lib/libc/tests/stdlib/libc_exit_test.c
126
pid_t pid;
lib/libc/tests/stdlib/libc_exit_test.c
129
pid = fork();
lib/libc/tests/stdlib/libc_exit_test.c
130
if (pid == 0) {
lib/libc/tests/stdlib/libc_exit_test.c
140
ATF_REQUIRE_MSG(pid > 0,
lib/libc/tests/stdlib/libc_exit_test.c
142
ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0),
lib/libc/tests/stdlib/libc_exit_test.c
59
pid_t pid;
lib/libc/tests/stdlib/libc_exit_test.c
62
pid = fork();
lib/libc/tests/stdlib/libc_exit_test.c
63
if (pid == 0) {
lib/libc/tests/stdlib/libc_exit_test.c
71
ATF_REQUIRE_MSG(pid > 0,
lib/libc/tests/stdlib/libc_exit_test.c
73
ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0),
lib/libc/tests/stdlib/libc_exit_test.c
91
pid_t pid;
lib/libc/tests/stdlib/libc_exit_test.c
94
pid = fork();
lib/libc/tests/stdlib/libc_exit_test.c
95
if (pid == 0) {
lib/libc/tests/stdlib/libc_exit_test.c
99
ATF_REQUIRE_MSG(pid > 0,
lib/libc/tests/stdtime/detect_tz_changes_test.c
212
pid_t pid;
lib/libc/tests/stdtime/detect_tz_changes_test.c
233
if ((pid = fork()) < 0)
lib/libc/tests/stdtime/detect_tz_changes_test.c
235
if (pid == 0) {
lib/libc/tests/stdtime/detect_tz_changes_test.c
359
ATF_REQUIRE_EQ(pid, waitpid(pid, &status, 0));
lib/libc/tests/sys/cpuset_test.c
310
pid_t pid;
lib/libc/tests/sys/cpuset_test.c
333
ATF_REQUIRE((pid = fork()) != -1);
lib/libc/tests/sys/cpuset_test.c
335
if (pid == 0) {
lib/libc/tests/sys/cpuset_test.c
346
while ((error = waitpid(pid, &status, 0)) == -1 &&
lib/libc/tests/sys/cpuset_test.c
354
ATF_REQUIRE_EQ(pid, error);
lib/libc/tests/sys/cpuset_test.c
581
pid_t pid;
lib/libc/tests/sys/cpuset_test.c
585
ATF_REQUIRE((pid = fork()) != -1);
lib/libc/tests/sys/cpuset_test.c
586
if (pid == 0)
lib/libc/tests/sys/cpuset_test.c
589
while ((error = waitpid(pid, &status, 0)) == -1 && errno == EINTR) {
lib/libc/tests/sys/cpuset_test.c
594
ATF_REQUIRE_EQ(pid, error);
lib/libc/tests/sys/cpuset_test.c
617
pid_t pid;
lib/libc/tests/sys/cpuset_test.c
627
ATF_REQUIRE((pid = pdfork(&pfd, 0)) != -1);
lib/libc/tests/sys/cpuset_test.c
629
if (pid == 0) {
lib/libc/tests/sys/cpuset_test.c
691
pid_t pid;
lib/libc/tests/sys/cpuset_test.c
712
ATF_REQUIRE((pid = pdfork(&pfd, 0)) != -1);
lib/libc/tests/sys/cpuset_test.c
714
if (pid == 0) {
lib/libc/tests/sys/cpuset_test.c
751
error = cpuset_getid(CPU_LEVEL_ROOT, CPU_WHICH_PID, pid, &setid);
lib/libc/yp/yplib.c
283
static pid_t pid = -1;
lib/libc/yp/yplib.c
302
if (!(pid == -1 || pid == gpid)) {
lib/libc/yp/yplib.c
313
pid = gpid;
lib/libcasper/libcasper/libcasper.c
104
} else if (pid > 0) {
lib/libcasper/libcasper/libcasper.c
88
pid_t pid;
lib/libcasper/libcasper/libcasper.c
98
pid = pdfork(&pfd, 0);
lib/libcasper/libcasper/libcasper.c
99
if (pid == 0) {
lib/libcasper/libcasper/zygote.c
112
pid_t pid;
lib/libcasper/libcasper/zygote.c
152
pid = pdfork(&procfd, 0);
lib/libcasper/libcasper/zygote.c
153
switch (pid) {
lib/libcasper/libcasper/zygote.c
192
pid_t pid;
lib/libcasper/libcasper/zygote.c
197
pid = fork();
lib/libcasper/libcasper/zygote.c
198
switch (pid) {
lib/libdpv/dialog_util.c
224
dialog_spawn_gauge(char *init_prompt, pid_t *pid)
lib/libdpv/dialog_util.c
327
error = posix_spawnp(pid, dialog, &action,
lib/libdpv/dpv.c
132
pid_t pid;
lib/libdpv/dpv.c
502
dialog_out = dialog_spawn_gauge(init_prompt, &pid);
lib/libdpv/dpv.c
697
waitpid(pid, (int *)NULL, 0);
lib/libdpv/util.c
58
shell_spawn_pipecmd(const char *cmd, const char *label, pid_t *pid)
lib/libdpv/util.c
99
error = posix_spawnp(pid, shellcmd, &action,
lib/libipsec/pfkey.c
1863
u_int satype, u_int32_t seq, pid_t pid)
lib/libipsec/pfkey.c
1882
p->sadb_msg_pid = (u_int32_t)pid;
lib/libipsec/pfkey.c
665
pid_t pid = getpid();
lib/libipsec/pfkey.c
674
newmsg->sadb_msg_pid == pid)
lib/libkvm/kvm_vnet.c
139
pid = 0;
lib/libkvm/kvm_vnet.c
165
if (proc.p_pid == pid)
lib/libkvm/kvm_vnet.c
58
_kvm_vnet_selectpid(kvm_t *kd, pid_t pid)
lib/libnv/tests/nv_array_tests.cc
1000
pid_t pid;
lib/libnv/tests/nv_array_tests.cc
1006
pid = atf::utils::fork();
lib/libnv/tests/nv_array_tests.cc
1007
ATF_REQUIRE(pid >= 0);
lib/libnv/tests/nv_array_tests.cc
1008
if (pid == 0) {
lib/libnv/tests/nv_array_tests.cc
1048
atf::utils::wait(pid, 0, "", "");
lib/libnv/tests/nvlist_send_recv_test.c
343
pid_t pid;
lib/libnv/tests/nvlist_send_recv_test.c
347
pid = fork();
lib/libnv/tests/nvlist_send_recv_test.c
348
ATF_REQUIRE(pid >= 0);
lib/libnv/tests/nvlist_send_recv_test.c
349
if (pid == 0) {
lib/libnv/tests/nvlist_send_recv_test.c
359
ATF_REQUIRE(waitpid(pid, &status, 0) == pid);
lib/libnv/tests/nvlist_send_recv_test.c
436
pid_t pid;
lib/libnv/tests/nvlist_send_recv_test.c
440
pid = fork();
lib/libnv/tests/nvlist_send_recv_test.c
441
ATF_REQUIRE(pid >= 0);
lib/libnv/tests/nvlist_send_recv_test.c
442
if (pid == 0) {
lib/libnv/tests/nvlist_send_recv_test.c
469
ATF_REQUIRE(waitpid(pid, &status, 0) == pid);
lib/libnv/tests/nvlist_send_recv_test.c
554
pid_t pid;
lib/libnv/tests/nvlist_send_recv_test.c
562
pid = fork();
lib/libnv/tests/nvlist_send_recv_test.c
563
ATF_REQUIRE(pid >= 0);
lib/libnv/tests/nvlist_send_recv_test.c
565
if (pid == 0) {
lib/libnv/tests/nvlist_send_recv_test.c
603
ATF_REQUIRE(waitpid(pid, &status, 0) == pid);
lib/libnv/tests/nvlist_send_recv_test.c
617
pid_t pid;
lib/libnv/tests/nvlist_send_recv_test.c
621
pid = fork();
lib/libnv/tests/nvlist_send_recv_test.c
622
ATF_REQUIRE(pid >= 0);
lib/libnv/tests/nvlist_send_recv_test.c
624
if (pid == 0) {
lib/libnv/tests/nvlist_send_recv_test.c
658
ATF_REQUIRE(waitpid(pid, &status, 0) == pid);
lib/libnv/tests/nvlist_send_recv_test.c
673
pid_t pid;
lib/libnv/tests/nvlist_send_recv_test.c
677
pid = fork();
lib/libnv/tests/nvlist_send_recv_test.c
678
ATF_REQUIRE(pid >= 0);
lib/libnv/tests/nvlist_send_recv_test.c
680
if (pid == 0) {
lib/libnv/tests/nvlist_send_recv_test.c
724
ATF_REQUIRE(waitpid(pid, &status, 0) == pid);
lib/libopenbsd/imsg.c
167
pid_t pid, int fd, const void *data, u_int16_t datalen)
lib/libopenbsd/imsg.c
171
if ((wbuf = imsg_create(ibuf, type, peerid, pid, datalen)) == NULL)
lib/libopenbsd/imsg.c
186
pid_t pid, int fd, const struct iovec *iov, int iovcnt)
lib/libopenbsd/imsg.c
194
if ((wbuf = imsg_create(ibuf, type, peerid, pid, datalen)) == NULL)
lib/libopenbsd/imsg.c
211
pid_t pid, u_int16_t datalen)
lib/libopenbsd/imsg.c
225
if ((hdr.pid = pid) == 0)
lib/libopenbsd/imsg.c
226
hdr.pid = ibuf->pid;
lib/libopenbsd/imsg.c
42
ibuf->pid = getpid();
lib/libopenbsd/imsg.h
60
pid_t pid;
lib/libopenbsd/imsg.h
70
u_int32_t pid;
lib/libpam/modules/pam_exec/pam_exec.c
173
pid_t pid;
lib/libpam/modules/pam_exec/pam_exec.c
179
pid = 0;
lib/libpam/modules/pam_exec/pam_exec.c
312
if ((pid = pdfork(&pd, 0)) == 0) {
lib/libpam/modules/pam_exec/pam_exec.c
333
if (pid == -1) {
lib/libpam/modules/pam_exec/pam_exec.c
411
while (waitpid(pid, &status, 0) == -1) {
lib/libpam/modules/pam_ssh/pam_ssh.c
277
pid_t pid;
lib/libpam/modules/pam_ssh/pam_ssh.c
286
pid = fork();
lib/libpam/modules/pam_ssh/pam_ssh.c
287
if (pid == (pid_t)-1) {
lib/libpam/modules/pam_ssh/pam_ssh.c
293
if (pid == 0) {
lib/libpam/modules/pam_ssh/pam_ssh.c
424
pid_t pid;
lib/libpam/modules/pam_ssh/pam_ssh.c
430
pid = (pid_t)strtol(ssh_agent_pid, &end, 10);
lib/libpam/modules/pam_ssh/pam_ssh.c
435
openpam_log(PAM_LOG_DEBUG, "killing ssh agent %d", (int)pid);
lib/libpam/modules/pam_ssh/pam_ssh.c
436
if (kill(pid, SIGTERM) == -1 ||
lib/libpam/modules/pam_ssh/pam_ssh.c
437
(waitpid(pid, &status, 0) == -1 && errno != ECHILD))
lib/libpmc/libpmc.c
1252
pmc_attach(pmc_id_t pmc, pid_t pid)
lib/libpmc/libpmc.c
1257
pmc_attach_args.pm_pid = pid;
lib/libpmc/libpmc.c
1302
pmc_detach(pmc_id_t pmc, pid_t pid)
lib/libpmc/libpmc.c
1307
pmc_detach_args.pm_pid = pid;
lib/libpmcstat/libpmcstat_logging.c
195
pid_t pid;
lib/libpmcstat/libpmcstat_logging.c
230
pid = ev.pl_u.pl_mi.pl_pid;
lib/libpmcstat/libpmcstat_logging.c
231
if (pid == -1)
lib/libpmcstat/libpmcstat_logging.c
234
pp = pmcstat_process_lookup(pid,
lib/libpmcstat/libpmcstat_logging.c
241
image = pmcstat_image_from_path(image_path, pid == -1,
lib/libpmcstat/libpmcstat_logging.c
254
pid = ev.pl_u.pl_mo.pl_pid;
lib/libpmcstat/libpmcstat_logging.c
255
if (pid == -1)
lib/libpmcstat/libpmcstat_logging.c
258
pp = pmcstat_process_lookup(pid, 0);
lib/libpmcstat/libpmcstat_process.c
216
pmcstat_process_lookup(pid_t pid, int allocate)
lib/libpmcstat/libpmcstat_process.c
222
hash = (uint32_t) pid & PMCSTAT_HASH_MASK; /* simplicity wins */
lib/libpmcstat/libpmcstat_process.c
225
if (pp->pp_pid == pid) {
lib/libpmcstat/libpmcstat_process.c
249
pp->pp_pid = pid;
lib/libpmcstat/libpmcstat_process.c
263
pid_t pid;
lib/libpmcstat/libpmcstat_process.c
270
switch (pid = fork()) {
lib/libpmcstat/libpmcstat_process.c
300
EV_SET(&kev, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, 0,
lib/libpmcstat/libpmcstat_process.c
303
err(EX_OSERR, "ERROR: cannot monitor child process %d", pid);
lib/libpmcstat/libpmcstat_process.c
308
pt->pt_pid = pid;
lib/libproc/libproc.h
123
pid_t pid;
lib/libproc/libproc.h
126
#define proc_getpid(phdl) (((struct proc_handle_public *)(phdl))->pid)
lib/libproc/libproc.h
138
int proc_attach(pid_t pid, int flags, struct proc_handle **pphdl);
lib/libproc/proc_create.c
126
proc_attach(pid_t pid, int flags, struct proc_handle **pphdl)
lib/libproc/proc_create.c
131
if (pid == 0 || (pid == getpid() && (flags & PATTACH_RDONLY) == 0))
lib/libproc/proc_create.c
140
error = proc_init(pid, flags, PS_RUN, &phdl);
lib/libproc/proc_create.c
147
DPRINTF("ERROR: cannot ptrace child process %d", pid);
lib/libproc/proc_create.c
152
if (waitpid(pid, &status, WUNTRACED) == -1) {
lib/libproc/proc_create.c
154
DPRINTF("ERROR: child process %d didn't stop as expected", pid);
lib/libproc/proc_create.c
160
DPRINTFX("ERROR: child process %d status 0x%x", pid, status);
lib/libproc/proc_create.c
183
pid_t pid;
lib/libproc/proc_create.c
191
if ((pid = fork()) == -1)
lib/libproc/proc_create.c
193
else if (pid == 0) {
lib/libproc/proc_create.c
210
if (waitpid(pid, &status, WUNTRACED) == -1) {
lib/libproc/proc_create.c
212
DPRINTF("ERROR: child process %d didn't stop as expected", pid);
lib/libproc/proc_create.c
219
DPRINTFX("ERROR: child process %d status 0x%x", pid, status);
lib/libproc/proc_create.c
224
error = proc_init(pid, 0, PS_IDLE, &phdl);
lib/libproc/proc_create.c
72
proc_init(pid_t pid, int flags, int status, struct proc_handle **pphdl)
lib/libproc/proc_create.c
83
phdl->public.pid = pid;
lib/libproc/proc_create.c
91
if ((kp = procstat_getprocs(phdl->procstat, KERN_PROC_PID, pid,
lib/libproc/proc_util.c
100
ptrace(request, pid, 0, 0);
lib/libproc/proc_util.c
101
kill(pid, SIGCONT);
lib/libproc/proc_util.c
87
pid_t pid;
lib/libproc/proc_util.c
96
pid = proc_getpid(phdl);
lib/libproc/proc_util.c
97
if (ptrace(request, pid, 0, 0) != 0 && errno == EBUSY) {
lib/libproc/proc_util.c
98
kill(pid, SIGSTOP);
lib/libproc/proc_util.c
99
waitpid(pid, &status, WUNTRACED);
lib/libprocstat/libprocstat.c
122
static Elf_Auxinfo *procstat_getauxv_sysctl(pid_t pid, unsigned int *cntp);
lib/libprocstat/libprocstat.c
156
static gid_t *procstat_getgroups_sysctl(pid_t pid, unsigned int *count);
lib/libprocstat/libprocstat.c
157
static struct kinfo_kstack *procstat_getkstack_sysctl(pid_t pid,
lib/libprocstat/libprocstat.c
163
static int procstat_getosrel_sysctl(pid_t pid, int *osrelp);
lib/libprocstat/libprocstat.c
166
static int procstat_getpathname_sysctl(pid_t pid, char *pathname,
lib/libprocstat/libprocstat.c
172
static int procstat_getrlimit_sysctl(pid_t pid, int which,
lib/libprocstat/libprocstat.c
178
static int procstat_getumask_sysctl(pid_t pid, unsigned short *maskp);
lib/libprocstat/libprocstat.c
2014
procstat_getgroups_sysctl(pid_t pid, unsigned int *cntp)
lib/libprocstat/libprocstat.c
2023
mib[3] = pid;
lib/libprocstat/libprocstat.c
2031
warn("sysctl: kern.proc.groups: %d", pid);
lib/libprocstat/libprocstat.c
2095
procstat_getumask_sysctl(pid_t pid, unsigned short *maskp)
lib/libprocstat/libprocstat.c
2104
mib[3] = pid;
lib/libprocstat/libprocstat.c
2108
warn("sysctl: kern.proc.umask: %d", pid);
lib/libprocstat/libprocstat.c
2175
procstat_getrlimit_sysctl(pid_t pid, int which, struct rlimit* rlimit)
lib/libprocstat/libprocstat.c
2183
name[3] = pid;
lib/libprocstat/libprocstat.c
2188
warn("sysctl: kern.proc.rlimit: %d", pid);
lib/libprocstat/libprocstat.c
2239
procstat_getpathname_sysctl(pid_t pid, char *pathname, size_t maxlen)
lib/libprocstat/libprocstat.c
2247
name[3] = pid;
lib/libprocstat/libprocstat.c
2251
warn("sysctl: kern.proc.pathname: %d", pid);
lib/libprocstat/libprocstat.c
2319
procstat_getosrel_sysctl(pid_t pid, int *osrelp)
lib/libprocstat/libprocstat.c
2327
name[3] = pid;
lib/libprocstat/libprocstat.c
2331
warn("sysctl: kern.proc.osrel: %d", pid);
lib/libprocstat/libprocstat.c
2378
is_elf32_sysctl(pid_t pid)
lib/libprocstat/libprocstat.c
2387
name[3] = pid;
lib/libprocstat/libprocstat.c
2400
procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp)
lib/libprocstat/libprocstat.c
2411
name[3] = pid;
lib/libprocstat/libprocstat.c
2421
warn("sysctl: kern.proc.auxv: %d: %d", pid, errno);
lib/libprocstat/libprocstat.c
2457
procstat_getauxv_sysctl(pid_t pid, unsigned int *cntp)
lib/libprocstat/libprocstat.c
2464
if (is_elf32_sysctl(pid))
lib/libprocstat/libprocstat.c
2465
return (procstat_getauxv32_sysctl(pid, cntp));
lib/libprocstat/libprocstat.c
2470
name[3] = pid;
lib/libprocstat/libprocstat.c
2479
warn("sysctl: kern.proc.auxv: %d: %d", pid, errno);
lib/libprocstat/libprocstat.c
2574
procstat_getkstack_sysctl(pid_t pid, int *cntp)
lib/libprocstat/libprocstat.c
2583
name[3] = pid;
lib/libprocstat/libprocstat.c
2588
warn("sysctl: kern.proc.kstack: %d", pid);
lib/libprocstat/libprocstat.c
2605
warn("sysctl: kern.proc.pid: %d", pid);
lib/libprocstat/libprocstat.c
2716
a->pid = kl->kl_pid;
lib/libprocstat/libprocstat.c
2776
procstat_getrlimitusage_sysctl(pid_t pid, unsigned *cntp)
lib/libprocstat/libprocstat.c
2785
name[3] = pid;
lib/libprocstat/libprocstat.c
2830
procstat_get_kqueue_info_sysctl(pid_t pid, int kqfd, unsigned int *cntp,
lib/libprocstat/libprocstat.c
2840
name[3] = pid;
lib/libprocstat/libprocstat.c
2848
pid, kqfd, strerror(errno));
lib/libprocstat/libprocstat.c
2861
pid, kqfd, strerror(errno));
lib/libprocstat/libprocstat.h
179
int pid;
lib/libsdp/sdp.h
266
uint8_t pid; /* PDU ID - SDP_PDU_xxx */
lib/libsdp/search.c
159
xpdu.pdu.pid = SDP_PDU_SERVICE_SEARCH_ATTRIBUTE_REQUEST;
lib/libsdp/search.c
201
if (xpdu.pdu.pid == SDP_PDU_ERROR_RESPONSE ||
lib/libsdp/service.c
132
pdu.pid = SDP_PDU_SERVICE_UNREGISTER_REQUEST;
lib/libsdp/service.c
176
pdu.pid = SDP_PDU_SERVICE_CHANGE_REQUEST;
lib/libsdp/service.c
223
if (pdu->pid != SDP_PDU_ERROR_RESPONSE || pdu->tid != ss->tid ||
lib/libsdp/service.c
68
pdu.pid = SDP_PDU_SERVICE_REGISTER_REQUEST;
lib/libsys/_libsys.h
485
int __sys_wait4(int pid, int * status, int options, struct rusage * rusage);
lib/libsys/_libsys.h
499
int __sys_ptrace(int req, pid_t pid, caddr_t addr, int data);
lib/libsys/_libsys.h
510
int __sys_kill(int pid, int signum);
lib/libsys/_libsys.h
515
int __sys_ktrace(const char * fname, int ops, int facs, int pid);
lib/libsys/_libsys.h
536
int __sys_setpgid(int pid, int pgid);
lib/libsys/_libsys.h
579
int __sys_rtprio(int function, pid_t pid, struct rtprio * rtp);
lib/libsys/_libsys.h
597
int __sys_getpgid(pid_t pid);
lib/libsys/_libsys.h
644
int __sys_getsid(pid_t pid);
lib/libsys/_libsys.h
654
int __sys_sched_setparam(pid_t pid, const struct sched_param * param);
lib/libsys/_libsys.h
655
int __sys_sched_getparam(pid_t pid, struct sched_param * param);
lib/libsys/_libsys.h
656
int __sys_sched_setscheduler(pid_t pid, int policy, const struct sched_param * param);
lib/libsys/_libsys.h
657
int __sys_sched_getscheduler(pid_t pid);
lib/libsys/_libsys.h
661
int __sys_sched_rr_get_interval(pid_t pid, struct timespec * interval);
lib/libsys/_libsys.h
714
int __sys___mac_get_pid(pid_t pid, struct mac * mac_p);
lib/libsys/_libsys.h
754
int __sys_sigqueue(pid_t pid, int signum, void * value);
lib/libsys/_libsys.h
775
int __sys_thr_kill2(pid_t pid, long id, int sig);
lib/libsys/ptrace.c
40
_ptrace(int request, pid_t pid, caddr_t addr, int data)
lib/libsys/ptrace.c
44
return (__sys_ptrace(request, pid, addr, data));
lib/libsysdecode/linux.c
139
pid_t pid;
lib/libsysdecode/linux.c
169
pid = LINUX_CPUCLOCK_ID(which);
lib/libsysdecode/linux.c
170
fprintf(fp, "(%d)", pid);
lib/libthr/thread/thr_syscalls.c
556
__thr_wait4(pid_t pid, int *status, int options, struct rusage *rusage)
lib/libthr/thread/thr_syscalls.c
563
ret = __sys_wait4(pid, status, options, rusage);
lib/libulog/ulog_login_pseudo.c
49
pid_t pid, wpid;
lib/libulog/ulog_login_pseudo.c
57
switch (pid = fork()) {
lib/libulog/ulog_login_pseudo.c
70
wpid = waitpid(pid, &status, 0);
lib/libusb/libusb20.h
190
uint16_t pid; /* product ID */
lib/libusb/libusb20_ugen20.c
1038
q.pid = pq->pid;
lib/libusb/libusb20_ugen20.c
1062
q.pid = pq->pid;
lib/libusb/libusb20_ugen20.c
997
pq->pid = q.pid;
lib/libutil/kinfo_getfile.c
11
kinfo_getfile(pid_t pid, int *cntp)
lib/libutil/kinfo_getfile.c
25
mib[3] = pid;
lib/libutil/kinfo_getproc.c
38
kinfo_getproc(pid_t pid)
lib/libutil/kinfo_getproc.c
52
mib[3] = pid;
lib/libutil/kinfo_getproc.c
60
if (kipp->ki_pid != pid)
lib/libutil/kinfo_getvmmap.c
11
kinfo_getvmmap(pid_t pid, int *cntp)
lib/libutil/kinfo_getvmmap.c
25
mib[3] = pid;
lib/libutil/pidfile.c
345
pid_t pid;
lib/libutil/pidfile.c
362
errno = pidfile_read(AT_FDCWD, pathp, &pid);
lib/libutil/pidfile.c
369
if (pid <= 0)
lib/libutil/pidfile.c
371
kill(pid, sig);
lib/libutil/pidfile.c
373
*pidptr = pid;
lib/libutil/pty.c
112
return (pid);
lib/libutil/pty.c
90
int master, slave, pid;
lib/libutil/pty.c
94
switch (pid = fork()) {
lib/libutil/pw_util.c
246
pid_t pid;
lib/libutil/pw_util.c
249
switch ((pid = fork())) {
lib/libutil/pw_util.c
267
if (waitpid(pid, &pstat, 0) == -1)
lib/libutil/tests/flopen_test.c
153
pid_t pid;
lib/libutil/tests/flopen_test.c
161
pid = fork();
lib/libutil/tests/flopen_test.c
162
if (pid == -1) {
lib/libutil/tests/flopen_test.c
164
} else if (pid == 0) {
lib/libutil/tests/flopen_test.c
173
kill(pid, SIGINT);
lib/libutil/tests/forkpty_test.c
26
pid_t pid;
lib/libutil/tests/forkpty_test.c
38
pid = forkpty(&pty, NULL, NULL, NULL);
lib/libutil/tests/forkpty_test.c
39
if (pid == 0) {
lib/libutil/tests/forkpty_test.c
43
ATF_CHECK_ERRNO(EAGAIN, pid < 0);
lib/libutil/tests/forkpty_test.c
44
if (pid > 0) {
lib/libutil/tests/forkpty_test.c
46
(void)waitpid(pid, NULL, 0);
lib/libutil/tests/pidfile_test.c
128
pid_t other = 0, pid = 0;
lib/libutil/tests/pidfile_test.c
146
pid = fork();
lib/libutil/tests/pidfile_test.c
147
if (pid == -1)
lib/libutil/tests/pidfile_test.c
149
if (pid == 0) {
lib/libutil/tests/pidfile_test.c
194
kill(pid, SIGTERM);
lib/libutil/tests/pidfile_test.c
214
if (other != pid) {
lib/libutil/tests/pidfile_test.c
223
if (kill(pid, SIGINT) != 0)
lib/libutil/tests/pidfile_test.c
225
if (waitpid(pid, &status, 0) == -1)
lib/libutil/tests/pidfile_test.c
269
char path[PATH_MAX], pid[32], tmpdir[PATH_MAX];
lib/libutil/tests/pidfile_test.c
286
memset(pid, 0, sizeof(pid));
lib/libutil/tests/pidfile_test.c
287
if (read(fd, pid, sizeof(pid) - 1) < 0)
lib/libutil/tests/pidfile_test.c
289
if (atoi(pid) != getpid())
lib/libutil/uucplock.c
104
if (!put_pid (tmpfd, pid))
lib/libutil/uucplock.c
125
uu_lock_txfr(const char *tty_name, pid_t pid)
lib/libutil/uucplock.c
138
err = put_pid(fd, pid) ? 0 : UU_LOCK_WRITE_ERR;
lib/libutil/uucplock.c
196
put_pid(int fd, pid_t pid)
lib/libutil/uucplock.c
201
len = sprintf (buf, "%10d\n", (int)pid);
lib/libutil/uucplock.c
210
pid_t pid;
lib/libutil/uucplock.c
215
pid = (pid_t)strtol (buf, (char **) NULL, 10);
lib/libutil/uucplock.c
217
pid = -1;
lib/libutil/uucplock.c
220
return pid;
lib/libutil/uucplock.c
54
static int put_pid (int fd, pid_t pid);
lib/libutil/uucplock.c
65
pid_t pid, pid_old;
lib/libutil/uucplock.c
70
pid = getpid();
lib/libutil/uucplock.c
72
pid);
lib/libveriexec/gbl_check.c
116
pid = atoi(argv[optind]);
lib/libveriexec/gbl_check.c
117
gbl = gbl_check_pid(pid);
lib/libveriexec/gbl_check.c
75
gbl_check_pid(pid_t pid)
lib/libveriexec/gbl_check.c
81
gbl.u.pid = pid;
lib/libveriexec/gbl_check.c
99
pid_t pid;
lib/libveriexec/veriexec_get.c
137
veriexec_get_pid_label(pid_t pid, char *buf, size_t bufsz)
lib/libveriexec/veriexec_get.c
143
if (veriexec_get_pid_params(pid, ¶ms) == 0) {
lib/libveriexec/veriexec_get.c
199
veriexec_check_pid_label(pid_t pid, const char *want)
lib/libveriexec/veriexec_get.c
206
veriexec_get_pid_params(pid, ¶ms) == 0) {
lib/libveriexec/veriexec_get.c
272
pid_t pid;
lib/libveriexec/veriexec_get.c
299
pid = atoi(argv[optind]);
lib/libveriexec/veriexec_get.c
301
cp = veriexec_get_pid_label(pid, buf, sizeof(buf));
lib/libveriexec/veriexec_get.c
303
printf("pid=%d label='%s'\n", pid, cp);
lib/libveriexec/veriexec_get.c
307
error = veriexec_check_pid_label(pid, want);
lib/libveriexec/veriexec_get.c
309
pid, want, error);
lib/libveriexec/veriexec_get.c
312
error = veriexec_get_pid_params(pid, ¶ms);
lib/libveriexec/veriexec_get.c
46
veriexec_get_pid_params(pid_t pid,
lib/libveriexec/veriexec_get.c
54
args.u.pid = pid;
libexec/atrun/atrun.c
125
pid_t pid;
libexec/atrun/atrun.c
156
pid = fork();
libexec/atrun/atrun.c
157
if (pid == -1)
libexec/atrun/atrun.c
160
else if (pid != 0)
libexec/atrun/atrun.c
269
pid = fork();
libexec/atrun/atrun.c
270
if (pid < 0)
libexec/atrun/atrun.c
273
else if (pid == 0)
libexec/atrun/atrun.c
343
waitpid(pid, (int *) NULL, 0);
libexec/flua/lfbsd/lfbsd.c
141
if (0 != (r = posix_spawnp(&pid, argv[0], &action, NULL,
libexec/flua/lfbsd/lfbsd.c
161
proc->pid = pid;
libexec/flua/lfbsd/lfbsd.c
174
while (waitpid(proc->pid, &pstat, 0) == -1) {
libexec/flua/lfbsd/lfbsd.c
48
int pid;
libexec/flua/lfbsd/lfbsd.c
95
pid_t pid;
libexec/flua/modules/lposix.c
339
pid_t pid;
libexec/flua/modules/lposix.c
343
pid = fork();
libexec/flua/modules/lposix.c
344
if (pid < 0) {
libexec/flua/modules/lposix.c
351
lua_pushinteger(L, pid);
libexec/flua/modules/lposix.c
456
pid_t pid;
libexec/flua/modules/lposix.c
460
pid = luaL_optinteger(L, 1, -1);
libexec/flua/modules/lposix.c
464
pid = waitpid(pid, &status, options);
libexec/flua/modules/lposix.c
465
if (pid < 0) {
libexec/flua/modules/lposix.c
472
lua_pushinteger(L, pid);
libexec/flua/modules/lposix.c
473
if (pid == 0) {
libexec/talkd/process.c
91
mp->pid = ntohl(mp->pid);
libexec/talkd/table.c
139
request->pid == ptr->request.pid) {
libexec/tftpd/tests/functional.c
266
pid_t pid;
libexec/tftpd/tests/functional.c
271
ATF_REQUIRE_INTEQ(1, fscanf(f, "%d", &pid));
libexec/tftpd/tests/functional.c
275
ATF_REQUIRE_EQ(pid, waitpid(pid, &wstatus, 0));
libexec/tftpd/tests/functional.c
286
pid_t pid;
libexec/tftpd/tests/functional.c
292
if (fscanf(f, "%d", &pid) == 1) {
libexec/tftpd/tests/functional.c
293
kill(pid, SIGTERM);
libexec/tftpd/tests/functional.c
294
waitpid(pid, NULL, 0);
libexec/tftpd/tests/functional.c
324
int client_s, server_s, pid, argv_idx;
libexec/tftpd/tests/functional.c
370
pid = fork();
libexec/tftpd/tests/functional.c
371
switch (pid) {
libexec/tftpd/tftpd.c
125
pid_t pid;
libexec/tftpd/tftpd.c
254
pid = fork();
libexec/tftpd/tftpd.c
255
if (pid < 0) {
libexec/tftpd/tftpd.c
258
} else if (pid != 0) {
sbin/bectl/bectl_jail.c
220
pid_t pid;
sbin/bectl/bectl_jail.c
317
pid = fork();
sbin/bectl/bectl_jail.c
319
switch (pid) {
sbin/bectl/bectl_jail.c
328
waitpid(pid, NULL, 0);
sbin/bsdlabel/bsdlabel.c
653
int pid, xpid;
sbin/bsdlabel/bsdlabel.c
660
while ((pid = fork()) < 0) {
sbin/bsdlabel/bsdlabel.c
671
if (pid == 0) {
sbin/bsdlabel/bsdlabel.c
685
if (xpid == pid)
sbin/decryptcore/decryptcore.c
130
pid_t pid;
sbin/decryptcore/decryptcore.c
144
pid = fork();
sbin/decryptcore/decryptcore.c
145
if (pid == -1) {
sbin/decryptcore/decryptcore.c
151
if (pid > 0) {
sbin/decryptcore/decryptcore.c
153
return (wait_for_process(pid) == 0);
sbin/decryptcore/decryptcore.c
63
wait_for_process(pid_t pid)
sbin/decryptcore/decryptcore.c
67
if (waitpid(pid, &status, WUNTRACED | WEXITED) == -1) {
sbin/devd/devd.cc
229
pid_t pid, savedpid;
sbin/devd/devd.cc
249
switch (pid = ::fork()) {
sbin/devd/devd.cc
268
savedpid = pid;
sbin/devd/devd.cc
270
pid = ::wait4(savedpid, &pstat, 0, (struct rusage *)0);
sbin/devd/devd.cc
271
} while (pid == -1 && errno == EINTR);
sbin/devd/devd.cc
277
return (pid == -1 ? -1 : pstat);
sbin/dhclient/dhclient.c
2353
int pid, wpid, wstatus;
sbin/dhclient/dhclient.c
2371
pid = fork();
sbin/dhclient/dhclient.c
2372
if (pid < 0) {
sbin/dhclient/dhclient.c
2375
} else if (pid) {
sbin/dhclient/dhclient.c
2378
} while (wpid != pid && wpid > 0);
sbin/dump/tape.c
714
(workers[i].pid = fork()) < 0)
sbin/dump/tape.c
720
if (workers[i].pid == 0) { /* Worker starts up here */
sbin/dump/tape.c
731
(const void *) &workers[(i + 1) % WORKERS].pid,
sbin/dump/tape.c
732
sizeof workers[0].pid);
sbin/dump/tape.c
743
if (workers[i].pid > 0) {
sbin/dump/tape.c
744
(void) kill(workers[i].pid, SIGKILL);
sbin/dump/tape.c
99
int pid; /* PID for this worker */
sbin/dumpon/dumpon.c
323
pid_t pid;
sbin/dumpon/dumpon.c
329
pid = fork();
sbin/dumpon/dumpon.c
330
switch (pid) {
sbin/dumpon/dumpon.c
362
error = waitpid(pid, &status, WEXITED);
sbin/fsck/fsck.c
302
pid_t pid;
sbin/fsck/fsck.c
362
switch (pid = vfork()) {
sbin/fsck/fsck.c
390
*pidp = pid;
sbin/fsck/fsck.c
394
if (waitpid(pid, &status, 0) < 0) {
sbin/fsck/preen.c
157
while ((pid = wait(&status)) != -1) {
sbin/fsck/preen.c
159
if (d->d_pid == pid)
sbin/fsck/preen.c
163
warnx("Unknown pid %d\n", pid);
sbin/fsck/preen.c
85
int ret, pid, retcode, passno, sumstatus, status, nextpass;
sbin/ggate/ggated/ggated.c
601
int error, pid;
sbin/ggate/ggated/ggated.c
603
pid = fork();
sbin/ggate/ggated/ggated.c
604
if (pid > 0)
sbin/ggate/ggated/ggated.c
606
else if (pid == -1) {
sbin/hastctl/hastctl.c
294
pid_t pid;
sbin/hastctl/hastctl.c
333
pid = nv_get_int32(nv, "workerpid%u", ii);
sbin/hastctl/hastctl.c
334
if (pid != 0)
sbin/hastctl/hastctl.c
335
printf(" workerpid: %d\n", pid);
sbin/hastd/hastd.c
307
child_exit_log(unsigned int pid, int status)
sbin/hastd/hastd.c
312
pid);
sbin/hastd/hastd.c
315
pid, WTERMSIG(status));
sbin/hastd/hastd.c
318
pid, WIFEXITED(status) ? WEXITSTATUS(status) : -1);
sbin/hastd/hastd.c
327
pid_t pid;
sbin/hastd/hastd.c
329
while ((pid = wait3(&status, WNOHANG, NULL)) > 0) {
sbin/hastd/hastd.c
332
if (pid == res->hr_workerpid)
sbin/hastd/hastd.c
341
hook_check_one(pid, status);
sbin/hastd/hastd.c
346
child_exit_log(pid, status);
sbin/hastd/hastd.c
752
pid_t pid;
sbin/hastd/hastd.c
893
else if ((pid = waitpid(res->hr_workerpid,
sbin/hastd/hooks.c
198
hook_add(struct hookproc *hp, pid_t pid)
sbin/hastd/hooks.c
204
hp->hp_pid = pid;
sbin/hastd/hooks.c
235
hook_find(pid_t pid)
sbin/hastd/hooks.c
245
if (hp->hp_pid == pid)
sbin/hastd/hooks.c
253
hook_check_one(pid_t pid, int status)
sbin/hastd/hooks.c
258
hp = hook_find(pid);
sbin/hastd/hooks.c
261
pjdlog_debug(1, "Unknown process pid=%u", pid);
sbin/hastd/hooks.c
268
pid, hp->hp_comm);
sbin/hastd/hooks.c
271
pid, WTERMSIG(status), hp->hp_comm);
sbin/hastd/hooks.c
274
pid, WIFEXITED(status) ? WEXITSTATUS(status) : -1,
sbin/hastd/hooks.c
345
pid_t pid;
sbin/hastd/hooks.c
367
pid = fork();
sbin/hastd/hooks.c
368
switch (pid) {
sbin/hastd/hooks.c
386
hook_add(hp, pid);
sbin/hastd/hooks.h
43
void hook_check_one(pid_t pid, int status);
sbin/hastd/primary.c
1000
if (pid == -1) {
sbin/hastd/primary.c
1006
if (pid > 0) {
sbin/hastd/primary.c
1013
res->hr_workerpid = pid;
sbin/hastd/primary.c
966
pid_t pid;
sbin/hastd/primary.c
999
pid = fork();
sbin/hastd/secondary.c
415
pid_t pid;
sbin/hastd/secondary.c
435
pid = fork();
sbin/hastd/secondary.c
436
if (pid == -1) {
sbin/hastd/secondary.c
441
if (pid > 0) {
sbin/hastd/secondary.c
451
res->hr_workerpid = pid;
sbin/init/init.c
1114
pid_t pid, wpid;
sbin/init/init.c
1121
if ((pid = fork()) == 0) {
sbin/init/init.c
1134
if (pid == -1) {
sbin/init/init.c
1159
if (wpid == pid && WIFSTOPPED(status)) {
sbin/init/init.c
1162
kill(pid, SIGCONT);
sbin/init/init.c
1165
} while (wpid != pid);
sbin/init/init.c
1244
find_session(pid_t pid)
sbin/init/init.c
1250
key.data = &pid;
sbin/init/init.c
1251
key.size = sizeof pid;
sbin/init/init.c
1432
pid_t pid;
sbin/init/init.c
1437
if ((pid = fork()) == -1) {
sbin/init/init.c
1443
if (pid) {
sbin/init/init.c
1449
if ((pid = fork()) == -1) {
sbin/init/init.c
1454
if (pid)
sbin/init/init.c
1487
pid_t pid;
sbin/init/init.c
1505
if ((pid = fork()) == -1) {
sbin/init/init.c
1510
if (pid)
sbin/init/init.c
1511
return pid;
sbin/init/init.c
1573
collect_child(pid_t pid)
sbin/init/init.c
1580
if (! (sp = find_session(pid)))
sbin/init/init.c
1598
if ((pid = start_getty(sp)) == -1) {
sbin/init/init.c
1604
sp->se_process = pid;
sbin/init/init.c
1714
pid_t pid;
sbin/init/init.c
1733
if ((pid = start_getty(sp)) == -1) {
sbin/init/init.c
1738
sp->se_process = pid;
sbin/init/init.c
1749
if ((pid = waitpid(-1, (int *) 0, 0)) != -1)
sbin/init/init.c
1750
collect_child(pid);
sbin/init/init.c
1909
pid_t pid;
sbin/init/init.c
1922
if ((pid = waitpid(-1, (int *)0, 0)) != -1)
sbin/init/init.c
1923
collect_child(pid);
sbin/init/init.c
1959
pid_t pid, wpid;
sbin/init/init.c
1977
if ((pid = fork()) == 0) {
sbin/init/init.c
1990
if (pid == -1) {
sbin/init/init.c
2027
if (wpid == pid && WIFSTOPPED(status)) {
sbin/init/init.c
2030
kill(pid, SIGCONT);
sbin/init/init.c
2033
} while (wpid != pid && !clang);
sbin/init/init.c
2125
pid_t other_pid, pid;
sbin/init/init.c
2139
pid = fork();
sbin/init/init.c
2140
if (pid == 0) {
sbin/init/init.c
2160
while ((other_pid = waitpid(-1, NULL, 0)) != pid && other_pid > 0) {
sbin/init/init.c
848
pid_t pid, wpid;
sbin/init/init.c
882
if ((pid = fork()) == 0) {
sbin/init/init.c
966
if (pid == -1) {
sbin/init/init.c
986
if (wpid == pid && WIFSTOPPED(status)) {
sbin/init/init.c
988
kill(pid, SIGCONT);
sbin/init/init.c
991
} while (wpid != pid && !requested_transition);
sbin/ipf/ipmon/ipmon.c
1678
int pid;
sbin/ipf/ipsend/sock.c
129
pid_t pid = getpid();
sbin/ipf/ipsend/sock.c
136
mib[3] = pid;
sbin/mdmfs/mdmfs.c
721
int pid, status; /* Child info. */
sbin/mdmfs/mdmfs.c
774
pid = fork();
sbin/mdmfs/mdmfs.c
775
switch (pid) {
sbin/mdmfs/mdmfs.c
805
while (waitpid(pid, &status, 0) != pid)
sbin/mount/mount.c
140
pid_t pid;
sbin/mount/mount.c
143
switch (pid = fork()) {
sbin/mount/mount.c
158
if (waitpid(pid, &status, 0) < 0) {
sbin/mount_fusefs/mount_fusefs.c
143
int pid = 0;
sbin/mount_fusefs/mount_fusefs.c
410
if ((pid = fork()) < 0)
sbin/mount_fusefs/mount_fusefs.c
413
if (pid == 0) {
sbin/pfctl/tests/pfctl_test.c
107
pid_t pid;
sbin/pfctl/tests/pfctl_test.c
125
&pid, argv[0], &action, NULL, __DECONST(char **, argv), environ);
sbin/pfctl/tests/pfctl_test.c
133
ATF_REQUIRE_EQ(waitpid(pid, &status, 0), pid);
sbin/pfctl/tests/pfctl_test.c
143
pid_t pid;
sbin/pfctl/tests/pfctl_test.c
157
&pid, argv[0], &action, NULL, __DECONST(char **, argv), environ);
sbin/pfctl/tests/pfctl_test.c
159
waitpid(pid, &status, 0);
sbin/quotacheck/preen.c
138
while ((pid = wait(&status)) != -1) {
sbin/quotacheck/preen.c
140
if (d->d_pid == pid)
sbin/quotacheck/preen.c
144
warnx("Unknown pid %d\n", pid);
sbin/quotacheck/preen.c
86
int ret, pid, retcode, passno, sumstatus, status, nextpass;
sbin/route/route.c
1630
rtm.rtm_pid != pid));
sbin/route/route.c
234
pid = getpid();
sbin/route/route.c
89
static int pid, rtm_addrs;
sbin/swapon/swapon.c
634
int argc, pid, status, rv;
sbin/swapon/swapon.c
675
pid = fork();
sbin/swapon/swapon.c
676
switch (pid) {
sbin/swapon/swapon.c
699
while (waitpid(pid, &status, 0) != pid)
share/examples/libusb20/bulk.c
159
unsigned int vid = UINT_MAX, pid = UINT_MAX; /* impossible VID:PID */
share/examples/libusb20/bulk.c
174
pid = strtol(optarg, NULL, 0);
share/examples/libusb20/bulk.c
188
if (vid != UINT_MAX || pid != UINT_MAX)
share/examples/libusb20/bulk.c
238
if (ddp->idVendor == vid && ddp->idProduct == pid)
share/examples/libusb20/control.c
307
unsigned int vid = UINT_MAX, pid = UINT_MAX; /* impossible VID:PID */
share/examples/libusb20/control.c
340
pid = strtol(optarg, NULL, 0);
share/examples/libusb20/control.c
354
if (vid != UINT_MAX || pid != UINT_MAX)
share/examples/libusb20/control.c
410
if (ddp->idVendor == vid && ddp->idProduct == pid)
sys/amd64/linux/linux.h
248
int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
sys/amd64/linux/linux.h
250
int linux_ptrace_peekuser(struct thread *td, pid_t pid,
sys/amd64/linux/linux.h
252
int linux_ptrace_pokeuser(struct thread *td, pid_t pid,
sys/amd64/linux/linux_machdep.c
295
linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
sys/amd64/linux/linux_machdep.c
309
error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo));
sys/amd64/linux/linux_machdep.c
329
linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data)
sys/amd64/linux/linux_machdep.c
345
return (kern_ptrace(td, PT_GETFSBASE, pid, data, 0));
sys/amd64/linux/linux_machdep.c
347
return (kern_ptrace(td, PT_GETGSBASE, pid, data, 0));
sys/amd64/linux/linux_machdep.c
348
if ((error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0)) != 0)
sys/amd64/linux/linux_machdep.c
395
linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
sys/amd64/linux/linux_machdep.c
410
return (kern_ptrace(td, PT_SETFSBASE, pid, data, 0));
sys/amd64/linux/linux_machdep.c
412
return (kern_ptrace(td, PT_SETGSBASE, pid, data, 0));
sys/amd64/linux/linux_machdep.c
421
if ((error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0)) != 0)
sys/amd64/linux/linux_machdep.c
428
return (kern_ptrace(td, PT_SETREGS, pid, &b_reg, 0));
sys/amd64/linux/linux_proto.h
1025
char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
sys/amd64/linux/linux_proto.h
1157
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
1196
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
1204
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
1224
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
1229
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
306
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
312
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
439
char pid_l_[PADL_(l_long)]; l_long pid; char pid_r_[PADR_(l_long)];
sys/amd64/linux/linux_proto.h
472
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
493
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
539
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
543
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
547
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
552
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
561
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
725
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
730
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_proto.h
837
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux/linux_systrace_args.c
1019
iarg[a++] = p->pid; /* int */
sys/amd64/linux/linux_systrace_args.c
1040
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1081
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1180
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1188
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1196
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1205
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1226
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1578
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1587
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
1782
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
2106
iarg[a++] = p->pid; /* l_int */
sys/amd64/linux/linux_systrace_args.c
2334
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
2403
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
2415
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
2447
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
2456
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
548
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
558
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux/linux_systrace_args.c
876
iarg[a++] = p->pid; /* l_long */
sys/amd64/linux/linux_systrace_args.c
928
iarg[a++] = p->pid; /* int */
sys/amd64/linux32/linux.h
424
int linux_ptrace_peekuser(struct thread *td, pid_t pid,
sys/amd64/linux32/linux.h
426
int linux_ptrace_pokeuser(struct thread *td, pid_t pid,
sys/amd64/linux32/linux32_machdep.c
599
linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data)
sys/amd64/linux32/linux32_machdep.c
608
linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
sys/amd64/linux32/linux32_proto.h
1094
char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
sys/amd64/linux32/linux32_proto.h
1229
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
126
char pid_l_[PADL_(l_long)]; l_long pid; char pid_r_[PADR_(l_long)];
sys/amd64/linux32/linux32_proto.h
1262
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
1270
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
1290
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
1295
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
148
char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
sys/amd64/linux32/linux32_proto.h
1637
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
360
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
470
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
479
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
483
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
487
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
492
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
501
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
53
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
573
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
801
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
806
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/amd64/linux32/linux32_proto.h
898
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
sys/amd64/linux32/linux32_systrace_args.c
1039
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1047
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1055
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1064
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1090
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1218
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1707
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1716
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
1888
iarg[a++] = p->pid; /* int */
sys/amd64/linux32/linux32_systrace_args.c
203
iarg[a++] = p->pid; /* l_long */
sys/amd64/linux32/linux32_systrace_args.c
2224
iarg[a++] = p->pid; /* l_int */
sys/amd64/linux32/linux32_systrace_args.c
2455
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
2512
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
252
iarg[a++] = p->pid; /* l_int */
sys/amd64/linux32/linux32_systrace_args.c
2524
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
2556
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
2565
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
3153
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
374
iarg[a++] = p->pid; /* int */
sys/amd64/linux32/linux32_systrace_args.c
64
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
763
iarg[a++] = p->pid; /* l_pid_t */
sys/amd64/linux32/linux32_systrace_args.c
875
iarg[a++] = p->pid; /* int */
sys/amd64/linux32/linux32_systrace_args.c
990
iarg[a++] = p->pid; /* l_pid_t */
sys/arm/arm/pmap-v6.c
153
int pmap_pid_dump(int pid);
sys/arm/arm/pmap-v6.c
6647
pmap_pid_dump(int pid)
sys/arm/arm/pmap-v6.c
6656
if (p->p_pid != pid || p->p_vmspace == NULL)
sys/arm64/arm64/gicv3_its.c
189
uint32_t pid;
sys/arm64/arm64/gicv3_its.c
1921
cmd_format_pid(struct its_cmd *cmd, uint32_t pid)
sys/arm64/arm64/gicv3_its.c
1925
cmd->cmd_dword[1] |= htole64((uint64_t)pid << CMD_PID_SHIFT);
sys/arm64/arm64/gicv3_its.c
196
uint32_t pid;
sys/arm64/arm64/gicv3_its.c
207
uint32_t pid;
sys/arm64/arm64/gicv3_its.c
2129
cmd_format_pid(cmd, desc->cmd_desc_mapvi.pid);
sys/arm64/arm64/gicv3_its.c
2136
cmd_format_id(cmd, desc->cmd_desc_mapi.pid);
sys/arm64/arm64/gicv3_its.c
2143
cmd_format_id(cmd, desc->cmd_desc_inv.pid);
sys/arm64/arm64/gicv3_its.c
2253
desc.cmd_desc_mapvi.pid = girq->gi_lpi + GIC_FIRST_LPI;
sys/arm64/arm64/gicv3_its.c
2283
desc.cmd_desc_inv.pid = girq->gi_id;
sys/arm64/linux/linux.h
202
int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
sys/arm64/linux/linux.h
204
int linux_ptrace_peekuser(struct thread *td, pid_t pid,
sys/arm64/linux/linux.h
206
int linux_ptrace_pokeuser(struct thread *td, pid_t pid,
sys/arm64/linux/linux_machdep.c
108
linux_ptrace_getregs_machdep(struct thread *td __unused, pid_t pid __unused,
sys/arm64/linux/linux_machdep.c
116
linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data)
sys/arm64/linux/linux_machdep.c
125
linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data)
sys/arm64/linux/linux_proto.h
1010
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
1018
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
1038
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
1043
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
437
char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
sys/arm64/linux/linux_proto.h
509
char pid_l_[PADL_(l_long)]; l_long pid; char pid_r_[PADR_(l_long)];
sys/arm64/linux/linux_proto.h
514
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
518
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
523
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
526
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
530
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
535
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
546
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
550
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
559
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
593
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
620
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
964
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_proto.h
970
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/arm64/linux/linux_systrace_args.c
1021
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
1029
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
1046
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
1108
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
1236
iarg[a++] = p->pid; /* int */
sys/arm64/linux/linux_systrace_args.c
1244
iarg[a++] = p->pid; /* int */
sys/arm64/linux/linux_systrace_args.c
1251
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
1951
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
1961
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
2031
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
2043
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
2075
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
2084
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
809
iarg[a++] = p->pid; /* l_int */
sys/arm64/linux/linux_systrace_args.c
943
iarg[a++] = p->pid; /* l_long */
sys/arm64/linux/linux_systrace_args.c
952
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
960
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
969
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
976
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
984
iarg[a++] = p->pid; /* l_pid_t */
sys/arm64/linux/linux_systrace_args.c
993
iarg[a++] = p->pid; /* l_pid_t */
sys/bsm/audit_record.h
248
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
sys/bsm/audit_record.h
250
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
sys/bsm/audit_record.h
252
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
sys/bsm/audit_record.h
254
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
sys/bsm/audit_record.h
256
uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid,
sys/bsm/audit_record.h
259
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
sys/bsm/audit_record.h
272
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
sys/bsm/audit_record.h
274
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
sys/bsm/audit_record.h
276
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid);
sys/bsm/audit_record.h
278
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
sys/bsm/audit_record.h
280
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
sys/bsm/audit_record.h
282
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid);
sys/compat/freebsd32/freebsd32_misc.c
1048
AUDIT_ARG_PID(uap->pid);
sys/compat/freebsd32/freebsd32_misc.c
1171
error = kern_ptrace(td, uap->req, uap->pid, addr, data);
sys/compat/freebsd32/freebsd32_misc.c
236
error = kern_wait(td, uap->pid, &status, uap->options, rup);
sys/compat/freebsd32/freebsd32_misc.c
3334
pid_t pid;
sys/compat/freebsd32/freebsd32_misc.c
3355
return (kern_sigqueue(td, uap->pid, uap->signum, &sv));
sys/compat/freebsd32/freebsd32_misc.c
4053
error = kern_sched_rr_get_interval(td, uap->pid, &ts);
sys/compat/freebsd32/freebsd32_proto.h
289
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/compat/freebsd32/freebsd32_proto.h
371
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/compat/freebsd32/freebsd32_proto.h
40
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
sys/compat/freebsd32/freebsd32_proto.h
47
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/compat/freebsd32/freebsd32_systrace_args.c
1392
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
1473
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
1481
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
1489
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
1498
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
1524
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
176
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
2191
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
2418
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
271
iarg[a++] = p->pid; /* int */
sys/compat/freebsd32/freebsd32_systrace_args.c
309
iarg[a++] = p->pid; /* int */
sys/compat/freebsd32/freebsd32_systrace_args.c
468
iarg[a++] = p->pid; /* int */
sys/compat/freebsd32/freebsd32_systrace_args.c
72
iarg[a++] = p->pid; /* int */
sys/compat/freebsd32/freebsd32_systrace_args.c
806
iarg[a++] = p->pid; /* pid_t */
sys/compat/freebsd32/freebsd32_systrace_args.c
962
iarg[a++] = p->pid; /* pid_t */
sys/compat/linux/linux_futex.c
895
if (!args->pid) {
sys/compat/linux/linux_futex.c
900
td2 = linux_tdfind(td, args->pid, -1);
sys/compat/linux/linux_misc.c
1293
tdt = linux_tdfind(td, args->pid, -1);
sys/compat/linux/linux_misc.c
1309
tdt = linux_tdfind(td, args->pid, -1);
sys/compat/linux/linux_misc.c
1500
return (kern_getsid(td, args->pid));
sys/compat/linux/linux_misc.c
1557
l_int pid;
sys/compat/linux/linux_misc.c
1596
if (luch.pid)
sys/compat/linux/linux_misc.c
1643
if (luch.pid)
sys/compat/linux/linux_misc.c
1838
tdt = linux_tdfind(td, uap->pid, -1);
sys/compat/linux/linux_misc.c
1888
tdt = linux_tdfind(td, uap->pid, -1);
sys/compat/linux/linux_misc.c
1941
tdt = linux_tdfind(td, args->pid, -1);
sys/compat/linux/linux_misc.c
1974
tdt = linux_tdfind(td, args->pid, -1);
sys/compat/linux/linux_misc.c
2045
if (args->pid == 0) {
sys/compat/linux/linux_misc.c
2049
error = pget(args->pid, flags, &p);
sys/compat/linux/linux_misc.c
2319
linux_sched_rr_get_interval_common(struct thread *td, pid_t pid,
sys/compat/linux/linux_misc.c
2329
if (pid < 0)
sys/compat/linux/linux_misc.c
2332
tdt = linux_tdfind(td, pid, -1);
sys/compat/linux/linux_misc.c
2348
error = linux_sched_rr_get_interval_common(td, uap->pid, &ts);
sys/compat/linux/linux_misc.c
2362
error = linux_sched_rr_get_interval_common(td, uap->pid, &ts);
sys/compat/linux/linux_misc.c
2375
linux_tdfind(struct thread *td, lwpid_t tid, pid_t pid)
sys/compat/linux/linux_misc.c
2383
if (pid != -1 && td->td_proc->p_pid != pid)
sys/compat/linux/linux_misc.c
2388
return (tdfind(tid, pid));
sys/compat/linux/linux_misc.c
2396
(pid != -1 && tid != pid)) {
sys/compat/linux/linux_misc.c
766
.pid = args->pid,
sys/compat/linux/linux_misc.c
787
if (args->pid == INT_MIN)
sys/compat/linux/linux_misc.c
799
if (args->pid == WAIT_ANY) {
sys/compat/linux/linux_misc.c
802
} else if (args->pid < 0) {
sys/compat/linux/linux_misc.c
804
id = (id_t)-args->pid;
sys/compat/linux/linux_misc.c
805
} else if (args->pid == 0) {
sys/compat/linux/linux_misc.c
813
id = (id_t)args->pid;
sys/compat/linux/linux_misc.h
168
int linux_ptrace_status(struct thread *td, int pid, int status);
sys/compat/linux/linux_ptrace.c
122
linux_ptrace_status(struct thread *td, pid_t pid, int status)
sys/compat/linux/linux_ptrace.c
130
error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo));
sys/compat/linux/linux_ptrace.c
160
linux_ptrace_peek(struct thread *td, pid_t pid, void *addr, void *data)
sys/compat/linux/linux_ptrace.c
164
error = kern_ptrace(td, PT_READ_I, pid, addr, 0);
sys/compat/linux/linux_ptrace.c
175
linux_ptrace_setoptions(struct thread *td, pid_t pid, l_ulong data)
sys/compat/linux/linux_ptrace.c
225
return (kern_ptrace(td, PT_SET_EVENT_MASK, pid, &mask, sizeof(mask)));
sys/compat/linux/linux_ptrace.c
229
linux_ptrace_geteventmsg(struct thread *td, pid_t pid, l_ulong data)
sys/compat/linux/linux_ptrace.c
237
linux_ptrace_getsiginfo(struct thread *td, pid_t pid, l_ulong data)
sys/compat/linux/linux_ptrace.c
243
error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo));
sys/compat/linux/linux_ptrace.c
263
linux_ptrace_getregs(struct thread *td, pid_t pid, void *data)
sys/compat/linux/linux_ptrace.c
269
error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0);
sys/compat/linux/linux_ptrace.c
274
error = linux_ptrace_getregs_machdep(td, pid, &l_regset);
sys/compat/linux/linux_ptrace.c
283
linux_ptrace_setregs(struct thread *td, pid_t pid, void *data)
sys/compat/linux/linux_ptrace.c
293
error = kern_ptrace(td, PT_SETREGS, pid, &b_reg, 0);
sys/compat/linux/linux_ptrace.c
298
linux_ptrace_getregset_prstatus(struct thread *td, pid_t pid, l_ulong data)
sys/compat/linux/linux_ptrace.c
312
error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0);
sys/compat/linux/linux_ptrace.c
317
error = linux_ptrace_getregs_machdep(td, pid, &l_regset);
sys/compat/linux/linux_ptrace.c
339
linux_ptrace_getregset(struct thread *td, pid_t pid, l_ulong addr, l_ulong data)
sys/compat/linux/linux_ptrace.c
344
return (linux_ptrace_getregset_prstatus(td, pid, data));
sys/compat/linux/linux_ptrace.c
361
linux_ptrace_seize(struct thread *td, pid_t pid, l_ulong addr, l_ulong data)
sys/compat/linux/linux_ptrace.c
369
linux_ptrace_get_syscall_info(struct thread *td, pid_t pid,
sys/compat/linux/linux_ptrace.c
378
error = kern_ptrace(td, PT_LWPINFO, pid, &lwpinfo, sizeof(lwpinfo));
sys/compat/linux/linux_ptrace.c
389
error = kern_ptrace(td, PTLINUX_GET_SC_ARGS, pid,
sys/compat/linux/linux_ptrace.c
398
error = kern_ptrace(td, PT_GET_SC_RET, pid, &sr, sizeof(sr));
sys/compat/linux/linux_ptrace.c
429
error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0);
sys/compat/linux/linux_ptrace.c
447
pid_t pid;
sys/compat/linux/linux_ptrace.c
453
pid = (pid_t)uap->pid;
sys/compat/linux/linux_ptrace.c
462
error = linux_ptrace_peek(td, pid, addr, (void *)uap->data);
sys/compat/linux/linux_ptrace.c
468
error = linux_ptrace_peek(td, pid,
sys/compat/linux/linux_ptrace.c
472
error = linux_ptrace_peekuser(td, pid, addr, (void *)uap->data);
sys/compat/linux/linux_ptrace.c
476
error = kern_ptrace(td, PT_WRITE_D, pid, addr, uap->data);
sys/compat/linux/linux_ptrace.c
482
error = kern_ptrace(td, PT_WRITE_D, pid,
sys/compat/linux/linux_ptrace.c
486
error = linux_ptrace_pokeuser(td, pid, addr, (void *)uap->data);
sys/compat/linux/linux_ptrace.c
492
error = kern_ptrace(td, PT_CONTINUE, pid, (void *)1, sig);
sys/compat/linux/linux_ptrace.c
495
error = kern_ptrace(td, PT_KILL, pid, addr, uap->data);
sys/compat/linux/linux_ptrace.c
501
error = kern_ptrace(td, PT_STEP, pid, (void *)1, sig);
sys/compat/linux/linux_ptrace.c
504
error = linux_ptrace_getregs(td, pid, (void *)uap->data);
sys/compat/linux/linux_ptrace.c
507
error = linux_ptrace_setregs(td, pid, (void *)uap->data);
sys/compat/linux/linux_ptrace.c
510
error = kern_ptrace(td, PT_ATTACH, pid, addr, uap->data);
sys/compat/linux/linux_ptrace.c
516
error = kern_ptrace(td, PT_DETACH, pid, (void *)1, sig);
sys/compat/linux/linux_ptrace.c
522
error = kern_ptrace(td, PT_SYSCALL, pid, (void *)1, sig);
sys/compat/linux/linux_ptrace.c
525
error = linux_ptrace_setoptions(td, pid, uap->data);
sys/compat/linux/linux_ptrace.c
528
error = linux_ptrace_geteventmsg(td, pid, uap->data);
sys/compat/linux/linux_ptrace.c
531
error = linux_ptrace_getsiginfo(td, pid, uap->data);
sys/compat/linux/linux_ptrace.c
534
error = linux_ptrace_getregset(td, pid, uap->addr, uap->data);
sys/compat/linux/linux_ptrace.c
537
error = linux_ptrace_seize(td, pid, uap->addr, uap->data);
sys/compat/linux/linux_ptrace.c
540
error = linux_ptrace_get_syscall_info(td, pid, uap->addr, uap->data);
sys/compat/linux/linux_signal.c
552
if (args->pid > PID_MAX)
sys/compat/linux/linux_signal.c
553
return (linux_psignal(td, args->pid, sig));
sys/compat/linux/linux_signal.c
555
return (kern_kill(td, args->pid, sig));
sys/compat/linux/linux_signal.c
563
if (args->pid <= 0 || args->tgid <=0)
sys/compat/linux/linux_signal.c
577
return (linux_tdsignal(td, args->pid, args->tgid, sig));
sys/compat/linux/linux_signal.c
60
static int linux_pksignal(struct thread *td, int pid, int sig,
sys/compat/linux/linux_signal.c
62
static int linux_psignal(struct thread *td, int pid, int sig);
sys/compat/linux/linux_signal.c
833
return (linux_pksignal(td, args->pid, sig, &ksi));
sys/compat/linux/linux_signal.c
919
linux_pksignal(struct thread *td, int pid, int sig, ksiginfo_t *ksi)
sys/compat/linux/linux_signal.c
925
tdt = linux_tdfind(td, pid, -1);
sys/compat/linux/linux_signal.c
946
linux_psignal(struct thread *td, int pid, int sig)
sys/compat/linux/linux_signal.c
955
return (linux_pksignal(td, pid, sig, &ksi));
sys/compat/linux/linux_socket.c
1616
lu.pid = cmcred->cmcred_pid;
sys/compat/linux/linux_socket.c
1633
lu.pid = scred->sc_pid;
sys/compat/linux/linux_socket.c
2379
lxu.pid = xu.cr_pid;
sys/compat/linux/linux_socket.h
122
uint32_t pid;
sys/compat/linux/linux_time.c
345
pid_t pid;
sys/compat/linux/linux_time.c
361
pid = LINUX_CPUCLOCK_ID(which);
sys/compat/linux/linux_time.c
364
pid = 0;
sys/compat/linux/linux_time.c
366
if (pid == 0) {
sys/compat/linux/linux_time.c
370
error = pget(pid, PGET_CANSEE, &p);
sys/compat/linux/linux_time.c
557
pid_t pid;
sys/compat/linux/linux_time.c
585
pid = LINUX_CPUCLOCK_ID(which);
sys/compat/linux/linux_time.c
586
if (pid != 0) {
sys/compat/linux/linux_time.c
587
error = pget(pid, PGET_CANSEE, &p);
sys/compat/linux/linux_util.h
54
static pid_t pid; \
sys/compat/linux/linux_util.h
56
if (pid != td->td_proc->p_pid) { \
sys/compat/linux/linux_util.h
59
pid = td->td_proc->p_pid; \
sys/compat/linuxkpi/common/include/linux/pid.h
45
#define pid_task(pid, type) ({ \
sys/compat/linuxkpi/common/include/linux/pid.h
48
__ts = linux_pid_task(pid); \
sys/compat/linuxkpi/common/include/linux/pid.h
52
#define get_pid_task(pid, type) ({ \
sys/compat/linuxkpi/common/include/linux/pid.h
55
__ts = linux_get_pid_task(pid); \
sys/compat/linuxkpi/common/include/linux/sched.h
102
#define task_pid(task) ((task)->pid)
sys/compat/linuxkpi/common/include/linux/sched.h
103
#define task_pid_nr(task) ((task)->pid)
sys/compat/linuxkpi/common/include/linux/sched.h
104
#define task_pid_vnr(task) ((task)->pid)
sys/compat/linuxkpi/common/include/linux/sched.h
79
pid_t pid; /* BSD thread ID */
sys/compat/linuxkpi/common/src/linux_current.c
101
ts->pid = td->td_tid;
sys/compat/linuxkpi/common/src/linux_current.c
190
linux_get_pid_task_int(pid_t pid, const bool do_get)
sys/compat/linuxkpi/common/src/linux_current.c
196
if (pid > PID_MAX) {
sys/compat/linuxkpi/common/src/linux_current.c
198
td = tdfind(pid, -1);
sys/compat/linuxkpi/common/src/linux_current.c
208
p = pfind(pid);
sys/compat/linuxkpi/common/src/linux_current.c
226
linux_pid_task(pid_t pid)
sys/compat/linuxkpi/common/src/linux_current.c
228
return (linux_get_pid_task_int(pid, false));
sys/compat/linuxkpi/common/src/linux_current.c
232
linux_get_pid_task(pid_t pid)
sys/compat/linuxkpi/common/src/linux_current.c
234
return (linux_get_pid_task_int(pid, true));
sys/compat/linuxkpi/common/src/linux_current.c
247
td = tdfind(task->pid, -1);
sys/compat/linuxkpi/common/src/linux_current.c
252
p = pfind(task->pid);
sys/ddb/db_command.c
693
db_expr_t old_radix, pid, sig;
sys/ddb/db_command.c
708
if (!db_expression(&pid))
sys/ddb/db_command.c
720
if (p->p_pid == pid)
sys/ddb/db_command.c
724
DB_ERROR(("Can't find process with pid %ld\n", (long) pid));
sys/ddb/db_command.c
728
DB_ERROR(("Can't lock process with pid %ld\n", (long) pid));
sys/ddb/db_command.c
835
pid_t pid;
sys/ddb/db_command.c
870
pid = td->td_proc->p_pid;
sys/ddb/db_command.c
872
pid = -1;
sys/ddb/db_command.c
873
db_printf("Tracing pid %d tid %ld td %p\n", pid, (long)td->td_tid, td);
sys/ddb/db_thread.c
43
pid_t pid;
sys/ddb/db_thread.c
45
pid = -1;
sys/ddb/db_thread.c
47
pid = kdb_thread->td_proc->p_pid;
sys/ddb/db_thread.c
48
db_printf("[ thread pid %d tid %ld ]\n", pid, (long)kdb_thread->td_tid);
sys/dev/acpi_support/acpi_sony.c
128
acpi_GetInteger(acpi_get_handle(dev), ACPI_SONY_GET_PID, &sc->pid);
sys/dev/acpi_support/acpi_sony.c
129
device_printf(dev, "PID %x\n", sc->pid);
sys/dev/acpi_support/acpi_sony.c
61
int pid;
sys/dev/atopcase/atopcase.c
193
sc->sc_pid = le16toh(dev->pid);
sys/dev/atopcase/atopcase_reg.h
70
uint16_t pid;
sys/dev/cxgbe/common/t4_hw.c
13124
ldst_cmd.u.i2c.pid = (port < 0 ? 0xff : port);
sys/dev/cxgbe/cudbg/fastlz_api.c
312
int read_chunk_header(struct cudbg_buffer *pc_buff, int *pid, int *poptions,
sys/dev/cxgbe/cudbg/fastlz_api.c
322
*pid = readU16(buffer) & 0xffff;
sys/dev/cxgbe/firmware/t4fw_interface.h
5472
__u8 pid;
sys/dev/drm2/drm.h
231
unsigned long pid; /**< Process ID */
sys/dev/drm2/drmP.h
394
pid_t pid; /* pid of requester, no guarantee it's valid by the time
sys/dev/drm2/drmP.h
407
pid_t pid;
sys/dev/drm2/drm_fops.c
194
priv->pid = p->td_proc->p_pid;
sys/dev/drm2/drm_ioc32.c
223
u32 pid; /**< Process ID */
sys/dev/drm2/drm_ioc32.c
244
c32->pid = client.pid;
sys/dev/drm2/drm_ioctl.c
214
client->pid = pt->pid;
sys/dev/drm2/drm_irq.c
1123
e->base.pid = curproc->p_pid;
sys/dev/drm2/drm_irq.c
811
e->base.pid, e->pipe, e->event.sequence);
sys/dev/drm2/drm_sysctl.c
359
priv->pid,
sys/dev/drm2/ttm/ttm_page_alloc_dma.c
1034
p->pool->dev_name, p->pool->name, current->pid,
sys/dev/drm2/ttm/ttm_page_alloc_dma.c
1095
current->pid);
sys/dev/drm2/ttm/ttm_page_alloc_dma.c
429
pool->dev_name, pool->name, current->pid,
sys/dev/drm2/ttm/ttm_page_alloc_dma.c
728
pool->dev_name, pool->name, current->pid, count);
sys/dev/hid/hidquirk.c
230
if (hidquirks[x].pid != info->idProduct) {
sys/dev/hid/hidquirk.c
231
if (hidquirks[x].pid != 0)
sys/dev/hid/hidquirk.c
256
hidquirk_get_entry(uint16_t bus, uint16_t vid, uint16_t pid,
sys/dev/hid/hidquirk.c
263
if ((bus | vid | pid | lo_rev | hi_rev) == 0) {
sys/dev/hid/hidquirk.c
272
(hidquirks[x].pid != pid) ||
sys/dev/hid/hidquirk.c
289
hidquirks[x].pid |
sys/dev/hid/hidquirk.c
296
hidquirks[x].pid = pid;
sys/dev/hid/hidquirk.c
353
entry.pid = hidquirk_strtou16(&env, name, "Product ID");
sys/dev/hid/hidquirk.c
391
new = hidquirk_get_entry(entry.bus, entry.vid, entry.pid,
sys/dev/hid/hidquirk.c
68
uint16_t pid;
sys/dev/hid/hidquirk.c
77
{ .bus = (b), .vid = (v), .pid = (p), .lo_rev = (l), .hi_rev = (h), \
sys/dev/hwpmc/hwpmc_logging.c
1018
pmclog_process_pmcattach(struct pmc *pm, pid_t pid, char *path)
sys/dev/hwpmc/hwpmc_logging.c
1023
PMCDBG2(LOG,ATT,1,"pm=%p pid=%d", pm, pid);
sys/dev/hwpmc/hwpmc_logging.c
1032
PMCLOG_EMIT32(pid);
sys/dev/hwpmc/hwpmc_logging.c
1038
pmclog_process_pmcdetach(struct pmc *pm, pid_t pid)
sys/dev/hwpmc/hwpmc_logging.c
1042
PMCDBG2(LOG,ATT,1,"!pm=%p pid=%d", pm, pid);
sys/dev/hwpmc/hwpmc_logging.c
1049
PMCLOG_EMIT32(pid);
sys/dev/hwpmc/hwpmc_logging.c
1101
pmclog_process_procexec(struct pmc_owner *po, pmc_id_t pmid, pid_t pid,
sys/dev/hwpmc/hwpmc_logging.c
1106
PMCDBG3(LOG,EXC,1,"po=%p pid=%d path=\"%s\"", po, pid, path);
sys/dev/hwpmc/hwpmc_logging.c
1111
PMCLOG_EMIT32(pid);
sys/dev/hwpmc/hwpmc_logging.c
1162
pmclog_process_sysexit(struct pmc_owner *po, pid_t pid)
sys/dev/hwpmc/hwpmc_logging.c
1165
PMCLOG_EMIT32(pid);
sys/dev/hwpmc/hwpmc_logging.c
947
pmclog_process_map_in(struct pmc_owner *po, pid_t pid, uintfptr_t start,
sys/dev/hwpmc/hwpmc_logging.c
959
PMCLOG_EMIT32(pid);
sys/dev/hwpmc/hwpmc_logging.c
967
pmclog_process_map_out(struct pmc_owner *po, pid_t pid, uintfptr_t start,
sys/dev/hwpmc/hwpmc_logging.c
973
PMCLOG_EMIT32(pid);
sys/dev/hwpmc/hwpmc_mod.c
1836
pid_t pid;
sys/dev/hwpmc/hwpmc_mod.c
1844
pid = td->td_proc->p_pid;
sys/dev/hwpmc/hwpmc_mod.c
1850
pmclog_process_map_in(po, pid, pkm->pm_address,
sys/dev/hwpmc/hwpmc_mod.c
1864
pid, pkm->pm_address, fullpath);
sys/dev/hwpmc/hwpmc_mod.c
1883
pid_t pid;
sys/dev/hwpmc/hwpmc_mod.c
1886
pid = td->td_proc->p_pid;
sys/dev/hwpmc/hwpmc_mod.c
1891
pmclog_process_map_out(po, pid, pkm->pm_address,
sys/dev/hwpmc/hwpmc_mod.c
1902
pmclog_process_map_out(pm->pm_owner, pid,
sys/dev/hwt/hwt_context.h
55
pid_t pid; /* Target pid. */
sys/dev/hwt/hwt_ioctl.c
145
ctx = hwt_owner_lookup_ctx(ho, halloc->pid);
sys/dev/hwt/hwt_ioctl.c
154
ctx->pid = halloc->pid;
sys/dev/hwt/hwt_ioctl.c
168
p = pfind(halloc->pid);
sys/dev/hwt/hwt_ioctl.c
277
p = pfind(halloc->pid);
sys/dev/hwt/hwt_owner.c
64
hwt_owner_lookup_ctx(struct hwt_owner *ho, pid_t pid)
sys/dev/hwt/hwt_owner.c
70
if (ctx->pid == pid) {
sys/dev/hwt/hwt_owner.h
40
struct hwt_context * hwt_owner_lookup_ctx(struct hwt_owner *ho, pid_t pid);
sys/dev/ice/ice_flex_pipe.c
1684
struct ice_prof_id_section *pid;
sys/dev/ice/ice_flex_pipe.c
1738
pid = (struct ice_prof_id_section *)sect;
sys/dev/ice/ice_flex_pipe.c
1739
src = (u8 *)pid->entry;
sys/dev/ice/ice_flex_pipe.c
1740
sect_len = LE16_TO_CPU(pid->count) *
sys/dev/ichwd/ichwd.h
321
#define PCR_REG_OFF(pid, reg) (((pid) << PCR_PORTID_SHIFT) | (reg))
sys/dev/iwn/if_iwn.c
1009
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
1034
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
1056
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
1079
pid, sc->subdevice_id, sc->hw_type);
sys/dev/iwn/if_iwn.c
1101
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
1169
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
1209
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
1216
"rev 0x%08x not supported (device)\n", pid, sc->subdevice_id,
sys/dev/iwn/if_iwn.c
1224
iwn4965_attach(struct iwn_softc *sc, uint16_t pid)
sys/dev/iwn/if_iwn.c
1267
iwn5000_attach(struct iwn_softc *sc, uint16_t pid)
sys/dev/iwn/if_iwn.c
745
iwn_config_specific(struct iwn_softc *sc, uint16_t pid)
sys/dev/iwn/if_iwn.c
748
switch (pid) {
sys/dev/iwn/if_iwn.c
785
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
821
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
855
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
875
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
900
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
923
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
962
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/iwn/if_iwn.c
988
"0x%04x rev %d not supported (subdevice)\n", pid,
sys/dev/mlx5/cq.h
47
int pid;
sys/dev/mlx5/driver.h
851
int pid;
sys/dev/mlx5/mlx5_core/mlx5_cq.c
152
cq->pid = curthread->td_proc->p_pid;
sys/dev/mlx5/mlx5_core/mlx5_qp.c
100
qp->pid = curthread->td_proc->p_pid;
sys/dev/mlx5/mlx5_core/mlx5_qp.c
389
dct->pid = curthread->td_proc->p_pid;
sys/dev/mlx5/mlx5_fpga/core.h
86
__func__, __LINE__, current->pid, ##__VA_ARGS__)
sys/dev/mlx5/mlx5_fpga/core.h
90
__func__, __LINE__, current->pid, ##__VA_ARGS__)
sys/dev/mlx5/mlx5_fpga/core.h
94
__func__, __LINE__, current->pid, ##__VA_ARGS__)
sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c
214
u16 pid;
sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c
287
pid = MLX5_CAP_FPGA(fdev->mdev, sandbox_product_id);
sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c
291
if (client_context->client->add(fdev, vid, pid))
sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c
512
u16 pid;
sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c
532
pid = MLX5_CAP_FPGA(fdev->mdev, sandbox_product_id);
sys/dev/mlx5/mlx5_fpga/mlx5fpga_core.c
533
if (!client->add(fdev, vid, pid))
sys/dev/mlx5/mlx5_fpga/sdk.h
73
int (*add)(struct mlx5_fpga_device *fdev, u32 vid, u16 pid);
sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_main.c
102
static int mlx5_fpga_tools_add(struct mlx5_fpga_device *fdev, u32 vid, u16 pid)
sys/dev/mlx5/mlx5_fpga_tools/mlx5fpga_tools_main.c
43
static int mlx5_fpga_tools_add(struct mlx5_fpga_device *fdev, u32 vid, u16 pid);
sys/dev/mlx5/mlx5_ib/mlx5_ib.h
47
__LINE__, current->pid, ##arg)
sys/dev/mlx5/mlx5_ib/mlx5_ib.h
51
__LINE__, current->pid, ##arg)
sys/dev/mlx5/mlx5_ib/mlx5_ib.h
55
__LINE__, current->pid, ##arg)
sys/dev/mlx5/qp.h
482
int pid;
sys/dev/ocs_fc/ocs_ddump.c
712
ocs_ddump_value(textbuf, "pid", "%08x", l->pid.l);
sys/dev/pms/RefTisa/sat/src/smtypes.h
263
bit32 pid; /* port id; used to protect double completion */
sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c
8682
tdIORequestBody->pid = onePortContext->id;
sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c
8849
tdIORequestBody->pid = onePortContext->id;
sys/dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c
291
bit32 pid = 0xff;
sys/dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c
316
pid = tdIORequestBody->pid;
sys/dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c
351
if (pid != onePortContext->id)
sys/dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c
353
TI_DBG1(("tdsmIDCompletedCB: not matching pid; pid %d onePortContext->id %d!!!\n", pid, onePortContext->id));
sys/dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c
467
tdIORequestBody->pid = onePortContext->id;
sys/dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c
580
tdIORequestBody->pid = onePortContext->id;
sys/dev/pms/RefTisa/tisa/sassata/sas/common/tdtypes.h
578
bit32 pid; /* port id; used to protect double completion */
sys/dev/pms/RefTisa/tisa/sassata/sas/common/tdtypes.h
597
bit32 pid; /* port id for SATA completion */
sys/dev/pms/RefTisa/tisa/sassata/sata/host/ossasat.c
3890
satIOContext->pid = tdsaAllShared->Ports[oneDeviceData->phyID].portContext->id;
sys/dev/pms/RefTisa/tisa/sassata/sata/host/ossasat.c
4062
satIOContext->pid = tdsaAllShared->Ports[oneDeviceData->phyID].portContext->id;
sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
21718
TI_DBG2(("satAddSATAIDDevCB: satOrgIOContext->pid %d\n", satOrgIOContext->pid));
sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
21720
if (satOrgIOContext->pid != tdsaAllShared->Ports[PhyID].portContext->id)
sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
21723
TI_DBG2(("satAddSATAIDDevCB: satOrgIOContext->pid %d\n", satOrgIOContext->pid));
sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
22442
satIOContext->pid = oneDeviceData->tdPortContext->id;
sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
22776
TI_DBG3(("tdsaDiscoveryStartIDDevCB: satOrgIOContext->pid %d\n", satOrgIOContext->pid));
sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
22779
if (satOrgIOContext->pid != oneDeviceData->tdPortContext->id)
sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c
22782
TI_DBG3(("tdsaDiscoveryStartIDDevCB: satOrgIOContext->pid %d\n", satOrgIOContext->pid));
sys/dev/ral/rt2860.c
1086
uint8_t wcid, mcs, pid;
sys/dev/ral/rt2860.c
1111
pid = (stat >> RT2860_TXQ_PID_SHIFT) & 0xf;
sys/dev/ral/rt2860.c
1112
if (mcs + 1 != pid)
sys/dev/ral/rt2860.c
1468
uint8_t type, qsel, mcs, pid, qid;
sys/dev/ral/rt2860.c
1541
pid = (mcs + 1) & 0xf;
sys/dev/ral/rt2860.c
1542
txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT);
sys/dev/ral/rt2860.c
1739
uint8_t qsel, mcs, pid, qid;
sys/dev/ral/rt2860.c
1787
pid = (mcs + 1) & 0xf;
sys/dev/ral/rt2860.c
1788
txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT);
sys/dev/rtwn/rtl8188e/r88e_rom_image.h
49
uint16_t pid;
sys/dev/rtwn/rtl8188e/r88e_rom_image.h
58
uint16_t pid;
sys/dev/rtwn/rtl8192c/r92c_rom_image.h
34
uint16_t pid;
sys/dev/rtwn/rtl8192e/r92e_rom_image.h
74
uint16_t pid;
sys/dev/sound/pcm/channel.c
1199
c->pid = -1;
sys/dev/sound/pcm/channel.c
1359
c->pid = -1;
sys/dev/sound/pcm/channel.h
90
pid_t pid;
sys/dev/sound/pcm/dsp.c
173
pid_t pid;
sys/dev/sound/pcm/dsp.c
183
pid = td->td_proc->p_pid;
sys/dev/sound/pcm/dsp.c
2055
ai->pid = -1;
sys/dev/sound/pcm/dsp.c
2144
ai->pid = -1;
sys/dev/sound/pcm/dsp.c
229
(*ch)->pid = pid;
sys/dev/sound/pcm/dsp.c
2340
ai->pid = ch->pid;
sys/dev/sound/pcm/mixer.c
1055
pid_t pid;
sys/dev/sound/pcm/mixer.c
1076
pid = td->td_proc->p_pid;
sys/dev/sound/pcm/mixer.c
1095
if (c->pid != pid ||
sys/dev/sound/sndstat.c
1272
if (c->pid != -1) {
sys/dev/sound/sndstat.c
1274
c->pid, c->comm);
sys/dev/sound/sndstat.c
482
nvlist_add_number(cdi, SNDST_DSPS_SOUND4_CHAN_PID, c->pid);
sys/dev/syscons/syscons.c
1174
p1 = pfind(scp->pid);
sys/dev/syscons/syscons.c
1188
scp->pid = 0;
sys/dev/syscons/syscons.c
1210
scp->pid = scp->proc->p_pid;
sys/dev/syscons/syscons.c
2699
p = pfind(cur_scp->pid);
sys/dev/syscons/syscons.c
2710
cur_scp->pid));
sys/dev/syscons/syscons.c
2921
if ((p = pfind(scp->pid)) != NULL)
sys/dev/syscons/syscons.c
2927
DPRINTF(5, ("vt controlling process %d died\n", scp->pid));
sys/dev/syscons/syscons.c
2941
DPRINTF(5, ("sending relsig to %d\n", scp->pid));
sys/dev/syscons/syscons.c
2956
DPRINTF(5, ("sending acqsig to %d\n", scp->pid));
sys/dev/syscons/syscons.c
3679
scp->pid = 0;
sys/dev/syscons/syscons.c
781
scp->pid = 0;
sys/dev/syscons/syscons.c
792
scp->pid = 0;
sys/dev/syscons/syscons.h
331
pid_t pid; /* pid of controlling proc */
sys/dev/usb/quirk/usb_quirk.c
1017
new = usb_quirk_get_entry(entry.vid, entry.pid,
sys/dev/usb/quirk/usb_quirk.c
69
uint16_t pid;
sys/dev/usb/quirk/usb_quirk.c
720
if (usb_quirks[x].pid != info->idProduct) {
sys/dev/usb/quirk/usb_quirk.c
721
if (usb_quirks[x].pid != 0)
sys/dev/usb/quirk/usb_quirk.c
746
usb_quirk_get_entry(uint16_t vid, uint16_t pid,
sys/dev/usb/quirk/usb_quirk.c
753
if ((vid | pid | lo_rev | hi_rev) == 0) {
sys/dev/usb/quirk/usb_quirk.c
761
(usb_quirks[x].pid != pid) ||
sys/dev/usb/quirk/usb_quirk.c
777
usb_quirks[x].pid |
sys/dev/usb/quirk/usb_quirk.c
78
.vid = USB_VENDOR_##v, .pid = USB_PRODUCT_##v##_##p, .lo_rev = 0x0000, \
sys/dev/usb/quirk/usb_quirk.c
783
usb_quirks[x].pid = pid;
sys/dev/usb/quirk/usb_quirk.c
822
pgq->pid = usb_quirks[y].pid;
sys/dev/usb/quirk/usb_quirk.c
84
.vid = USB_VENDOR_##v, .pid = 0x0000, .lo_rev = 0x0000, .hi_rev = 0xffff, \
sys/dev/usb/quirk/usb_quirk.c
862
pqe = usb_quirk_get_entry(pgq->vid, pgq->pid,
sys/dev/usb/quirk/usb_quirk.c
90
.vid = USB_VENDOR_##v, .pid = USB_PRODUCT_##v##_##p, .lo_rev = (l), \
sys/dev/usb/quirk/usb_quirk.c
900
pqe = usb_quirk_get_entry(pgq->vid, pgq->pid,
sys/dev/usb/quirk/usb_quirk.c
979
entry.pid = usb_quirk_strtou16(&env, name, "Product ID");
sys/dev/usb/usb_ioctl.h
223
uint16_t pid; /* Product ID */
sys/dev/usb/wlan/if_mtw.c
2132
uint8_t wcid, mcs, pid;
sys/dev/usb/wlan/if_mtw.c
2174
pid = (stat >> MTW_TXQ_PID_SHIFT) & 0xf;
sys/dev/usb/wlan/if_mtw.c
2175
if ((retry = pid - 1 - mcs) > 0) {
sys/dev/usb/wlan/if_run.c
2632
uint8_t wcid, mcs, pid;
sys/dev/usb/wlan/if_run.c
2673
pid = (stat >> RT2860_TXQ_PID_SHIFT) & 0xf;
sys/dev/usb/wlan/if_run.c
2674
if ((retry = pid -1 - mcs) > 0) {
sys/dev/usb/wlan/if_run.c
3551
uint16_t pid = (rt2860_rates[ridx].mcs + 1) & 0xf;
sys/dev/usb/wlan/if_run.c
3552
txwi->len |= htole16(pid << RT2860_TX_PID_SHIFT);
sys/fs/cuse/cuse.c
148
pid_t pid;
sys/fs/cuse/cuse.c
1507
if (pcs->refs < 0 || pcs->pid == curproc->p_pid) {
sys/fs/cuse/cuse.c
795
pcs->pid = curproc->p_pid;
sys/fs/fuse/fuse_file.c
240
struct ucred *cred, pid_t pid)
sys/fs/fuse/fuse_file.c
254
(pid == 0 || fufh->pid == pid))
sys/fs/fuse/fuse_file.c
266
(pid == 0 || fufh->pid == pid))
sys/fs/fuse/fuse_file.c
275
struct fuse_filehandle **fufhp, struct ucred *cred, pid_t pid)
sys/fs/fuse/fuse_file.c
290
(pid == 0 || fufh->pid == pid))
sys/fs/fuse/fuse_file.c
313
struct fuse_filehandle **fufhp, struct ucred *cred, pid_t pid)
sys/fs/fuse/fuse_file.c
324
(pid == 0 || fufh->pid == pid))
sys/fs/fuse/fuse_file.c
343
struct fuse_filehandle **fufhp, struct ucred *cred, pid_t pid)
sys/fs/fuse/fuse_file.c
347
err = fuse_filehandle_get(vp, fflag, fufhp, cred, pid);
sys/fs/fuse/fuse_file.c
349
err = fuse_filehandle_get(vp, FREAD | FWRITE, fufhp, cred, pid);
sys/fs/fuse/fuse_file.c
368
fufh->pid = td->td_proc->p_pid;
sys/fs/fuse/fuse_file.h
157
pid_t pid;
sys/fs/fuse/fuse_file.h
199
struct ucred *cred, pid_t pid);
sys/fs/fuse/fuse_file.h
202
pid_t pid);
sys/fs/fuse/fuse_file.h
205
pid_t pid);
sys/fs/fuse/fuse_file.h
208
pid_t pid);
sys/fs/fuse/fuse_internal.c
1144
pid_t pid = td->td_proc->p_pid;
sys/fs/fuse/fuse_internal.c
1179
fuse_filehandle_getrw(vp, FWRITE, &fufh, cred, pid);
sys/fs/fuse/fuse_io.c
127
struct ucred *cred, struct fuse_filehandle *fufh, pid_t pid)
sys/fs/fuse/fuse_io.c
477
struct ucred *cred, struct fuse_filehandle *fufh, int ioflag, pid_t pid)
sys/fs/fuse/fuse_io.c
756
pid_t pid = 0;
sys/fs/fuse/fuse_io.c
765
error = fuse_filehandle_getrw(vp, fflag, &fufh, cred, pid);
sys/fs/fuse/fuse_io.c
771
error = fuse_filehandle_get(vp, FWRITE, &fufh, cred, pid);
sys/fs/fuse/fuse_io.h
72
struct ucred *cred, struct fuse_filehandle *fufh, pid_t pid);
sys/fs/fuse/fuse_io.h
77
struct ucred *cred, struct fuse_filehandle *fufh, int ioflag, pid_t pid);
sys/fs/fuse/fuse_ipc.c
242
ftick_hdr->pid, &reused_creds);
sys/fs/fuse/fuse_ipc.c
861
uint64_t nid, enum fuse_opcode op, size_t blen, pid_t pid,
sys/fs/fuse/fuse_ipc.c
869
ihead->pid = pid;
sys/fs/fuse/fuse_ipc.c
905
struct mount *mp, uint64_t nid, pid_t pid, struct ucred *cred)
sys/fs/fuse/fuse_ipc.c
915
fuse_setup_ihead(fdip->finh, fdip->tick, nid, op, fdip->iosize, pid,
sys/fs/fuse/fuse_ipc.c
922
struct fuse_data *data, uint64_t nid, pid_t pid, struct ucred *cred)
sys/fs/fuse/fuse_ipc.c
934
fuse_setup_ihead(fdip->finh, fdip->tick, nid, op, fdip->iosize, pid, cred);
sys/fs/fuse/fuse_ipc.c
99
struct fuse_data *data, uint64_t nid, pid_t pid, struct ucred *cred);
sys/fs/fuse/fuse_kernel.h
270
uint32_t pid; /* tgid */
sys/fs/fuse/fuse_kernel.h
872
uint32_t pid;
sys/fs/fuse/fuse_node.c
383
fuse_vnode_savesize(struct vnode *vp, struct ucred *cred, pid_t pid)
sys/fs/fuse/fuse_node.c
417
fuse_filehandle_getrw(vp, FWRITE, &fufh, cred, pid);
sys/fs/fuse/fuse_node.h
275
int fuse_vnode_savesize(struct vnode *vp, struct ucred *cred, pid_t pid);
sys/fs/fuse/fuse_vnops.c
1001
err = fuse_filehandle_getrw(invp, FREAD, &infufh, incred, pid);
sys/fs/fuse/fuse_vnops.c
1005
err = fuse_filehandle_getrw(outvp, FWRITE, &outfufh, outcred, pid);
sys/fs/fuse/fuse_vnops.c
1398
pid_t pid = td->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
1407
err = fuse_vnop_do_lseek(vp, td, cred, pid, offp,
sys/fs/fuse/fuse_vnops.c
1843
pid_t pid = td->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
1854
if (fuse_filehandle_validrw(vp, a_mode, cred, pid)) {
sys/fs/fuse/fuse_vnops.c
1961
pid_t pid = curthread->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
1981
err = fuse_filehandle_getrw(vp, FREAD, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
2013
err = fuse_read_biobackend(vp, uio, ioflag, cred, fufh, pid);
sys/fs/fuse/fuse_vnops.c
2046
pid_t pid = curthread->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
2058
err = fuse_filehandle_get_dir(vp, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
2615
pid_t pid = curthread->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
2634
err = fuse_filehandle_getrw(vp, FWRITE, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
2686
err = fuse_write_biobackend(vp, uio, cred, fufh, ioflag, pid);
sys/fs/fuse/fuse_vnops.c
272
struct ucred *cred, pid_t pid)
sys/fs/fuse/fuse_vnops.c
274
if (fuse_filehandle_get(vp, FREAD, fufhp, cred, pid) == 0)
sys/fs/fuse/fuse_vnops.c
276
return fuse_filehandle_get(vp, FEXEC, fufhp, cred, pid);
sys/fs/fuse/fuse_vnops.c
281
fuse_flush(struct vnode *vp, struct ucred *cred, pid_t pid, int fflag)
sys/fs/fuse/fuse_vnops.c
293
err = fuse_filehandle_getrw(vp, fflag, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
3174
pid_t pid = curthread->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
3192
err = fuse_filehandle_getrw(vp, FWRITE, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
462
pid_t pid, off_t *offp, int whence)
sys/fs/fuse/fuse_vnops.c
473
err = fuse_filehandle_getrw(vp, FREAD, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
563
pid_t pid = td->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
633
err = fuse_filehandle_get_anyflags(vp, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
649
fli->lk.pid = td->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
659
fl->l_pid = flo->lk.pid;
sys/fs/fuse/fuse_vnops.c
686
pid_t pid = curthread->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
720
err = fuse_filehandle_getrw(vp, FWRITE, &fufh, cred, pid);
sys/fs/fuse/fuse_vnops.c
884
pid_t pid;
sys/fs/fuse/fuse_vnops.c
889
pid = td->td_proc->p_pid;
sys/fs/fuse/fuse_vnops.c
901
err = fuse_flush(vp, cred, pid, fflag);
sys/fs/fuse/fuse_vnops.c
931
fuse_vnode_savesize(vp, cred, pid);
sys/fs/fuse/fuse_vnops.c
967
pid_t pid;
sys/fs/fuse/fuse_vnops.c
993
pid = td->td_proc->p_pid;
sys/fs/nfsclient/nfs_clport.c
1276
pid_t pid;
sys/fs/nfsclient/nfs_clport.c
1290
pid = tl.lval;
sys/fs/nfsclient/nfs_clport.c
1291
p = pfind_any_locked(pid);
sys/fs/nfsclient/nfs_clvnops.c
2820
short pid;
sys/fs/nfsclient/nfs_clvnops.c
2839
pid = curthread->td_proc->p_pid;
sys/fs/nfsclient/nfs_clvnops.c
2844
pid);
sys/fs/procfs/procfs_status.c
73
int pid, ppid, pgid, sid;
sys/fs/procfs/procfs_status.c
76
pid = p->p_pid;
sys/fs/procfs/procfs_status.c
95
sbuf_printf(sb, " %d %d %d %d ", pid, ppid, pgid, sid);
sys/fs/pseudofs/pseudofs_internal.h
55
struct pfs_node *, pid_t pid);
sys/fs/pseudofs/pseudofs_vncache.c
117
struct pfs_node *pn, pid_t pid)
sys/fs/pseudofs/pseudofs_vncache.c
128
hash = PFS_VNCACHE_HASH(pid);
sys/fs/pseudofs/pseudofs_vncache.c
134
if (pvd->pvd_pn == pn && pvd->pvd_pid == pid &&
sys/fs/pseudofs/pseudofs_vncache.c
167
pvd->pvd_pid = pid;
sys/fs/pseudofs/pseudofs_vncache.c
217
if (pvd2->pvd_pn == pn && pvd2->pvd_pid == pid &&
sys/fs/pseudofs/pseudofs_vncache.c
344
int pid;
sys/fs/pseudofs/pseudofs_vncache.c
346
pid = p->p_pid;
sys/fs/pseudofs/pseudofs_vncache.c
347
hash = PFS_VNCACHE_HASH(pid);
sys/fs/pseudofs/pseudofs_vncache.c
353
if (pvd->pvd_pid != pid)
sys/fs/pseudofs/pseudofs_vncache.c
82
#define PFS_VNCACHE_HASH(pid) (&pfs_vncache_hashtbl[(pid) & pfs_vncache_hash])
sys/fs/pseudofs/pseudofs_vnops.c
105
pfs_visible(struct thread *td, struct pfs_node *pn, pid_t pid,
sys/fs/pseudofs/pseudofs_vnops.c
111
pn->pn_name, pid, td->td_proc->p_pid));
sys/fs/pseudofs/pseudofs_vnops.c
115
if (pid == NO_PID)
sys/fs/pseudofs/pseudofs_vnops.c
117
proc = pfind(pid);
sys/fs/pseudofs/pseudofs_vnops.c
132
pfs_lookup_proc(pid_t pid, struct proc **p)
sys/fs/pseudofs/pseudofs_vnops.c
136
proc = pfind(pid);
sys/fs/pseudofs/pseudofs_vnops.c
378
pid_t pid = pvd->pvd_pid;
sys/fs/pseudofs/pseudofs_vnops.c
392
len = snprintf(pidbuf, sizeof(pidbuf), "%d", pid);
sys/fs/pseudofs/pseudofs_vnops.c
423
error = pfs_vncache_alloc(mp, dvp, pn, pid);
sys/fs/pseudofs/pseudofs_vnops.c
454
pid_t pid = pvd->pvd_pid;
sys/fs/pseudofs/pseudofs_vnops.c
525
pid = NO_PID;
sys/fs/pseudofs/pseudofs_vnops.c
546
pid = 0;
sys/fs/pseudofs/pseudofs_vnops.c
547
for (pid = 0, i = 0; i < namelen && isdigit(pname[i]); ++i)
sys/fs/pseudofs/pseudofs_vnops.c
548
if ((pid = pid * 10 + pname[i] - '0') > PID_MAX)
sys/fs/pseudofs/pseudofs_vnops.c
563
visible = pfs_visible(curthread, pn, pid, NULL);
sys/fs/pseudofs/pseudofs_vnops.c
569
error = pfs_vncache_alloc(mp, vpp, pn, pid);
sys/fs/pseudofs/pseudofs_vnops.c
75
pn_fileno(struct pfs_node *pn, pid_t pid)
sys/fs/pseudofs/pseudofs_vnops.c
80
if (pid != NO_PID)
sys/fs/pseudofs/pseudofs_vnops.c
81
return (pn->pn_fileno * NO_PID + pid);
sys/fs/pseudofs/pseudofs_vnops.c
847
pid_t pid = pvd->pvd_pid;
sys/fs/pseudofs/pseudofs_vnops.c
860
PFS_TRACE(("%s pid %lu", pd->pn_name, (unsigned long)pid));
sys/fs/pseudofs/pseudofs_vnops.c
881
if (pid != NO_PID && !pfs_lookup_proc(pid, &proc))
sys/fs/pseudofs/pseudofs_vnops.c
891
KASSERT(pid == NO_PID || proc != NULL,
sys/fs/pseudofs/pseudofs_vnops.c
892
("%s(): no process for pid %lu", __func__, (unsigned long)pid));
sys/fs/pseudofs/pseudofs_vnops.c
894
if (pid != NO_PID) {
sys/fs/pseudofs/pseudofs_vnops.c
922
pfsent->entry.d_fileno = pn_fileno(pn, pid);
sys/fs/smbfs/smbfs_smb.c
114
mb_put_uint16le(mbp, pid);
sys/fs/smbfs/smbfs_smb.c
86
smbfs_smb_lockandx(struct smbnode *np, int op, u_int32_t pid, off_t start, off_t end,
sys/fs/unionfs/union_subr.c
588
pid_t pid;
sys/fs/unionfs/union_subr.c
591
pid = td->td_proc->p_pid;
sys/fs/unionfs/union_subr.c
596
if (unsp->uns_pid == pid) {
sys/fs/unionfs/union_subr.c
614
pid_t pid;
sys/fs/unionfs/union_subr.c
617
pid = td->td_proc->p_pid;
sys/fs/unionfs/union_subr.c
626
unsp->uns_pid = pid;
sys/i386/linux/linux_proto.h
1092
char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
sys/i386/linux/linux_proto.h
1223
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
1256
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
126
char pid_l_[PADL_(l_long)]; l_long pid; char pid_r_[PADR_(l_long)];
sys/i386/linux/linux_proto.h
1264
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
1284
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
1289
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
148
char pid_l_[PADL_(l_int)]; l_int pid; char pid_r_[PADR_(l_int)];
sys/i386/linux/linux_proto.h
1631
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
359
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
469
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
478
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
482
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
486
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
491
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
500
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
53
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
575
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
799
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
804
char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
sys/i386/linux/linux_proto.h
898
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
sys/i386/linux/linux_ptrace_machdep.c
247
pid_t pid;
sys/i386/linux/linux_ptrace_machdep.c
254
pid = (pid_t)uap->pid;
sys/i386/linux/linux_ptrace_machdep.c
262
error = kern_ptrace(td, req, pid, addr, uap->data);
sys/i386/linux/linux_ptrace_machdep.c
268
error = kern_ptrace(td, req, pid, addr, 0);
sys/i386/linux/linux_ptrace_machdep.c
276
error = kern_ptrace(td, PT_DETACH, pid, (void *)1,
sys/i386/linux/linux_ptrace_machdep.c
281
error = kern_ptrace(td, req, pid, (void *)1,
sys/i386/linux/linux_ptrace_machdep.c
285
error = kern_ptrace(td, PT_ATTACH, pid, addr, uap->data);
sys/i386/linux/linux_ptrace_machdep.c
289
error = kern_ptrace(td, PT_GETREGS, pid, &u.bsd_reg, 0);
sys/i386/linux/linux_ptrace_machdep.c
301
error = kern_ptrace(td, PT_SETREGS, pid, &u.bsd_reg, 0);
sys/i386/linux/linux_ptrace_machdep.c
306
error = kern_ptrace(td, PT_GETFPREGS, pid, &u.bsd_fpreg, 0);
sys/i386/linux/linux_ptrace_machdep.c
318
error = kern_ptrace(td, PT_SETFPREGS, pid,
sys/i386/linux/linux_ptrace_machdep.c
341
if ((p = pfind(uap->pid)) == NULL) {
sys/i386/linux/linux_ptrace_machdep.c
416
error = kern_ptrace(td, PT_GETREGS, pid, &u.bsd_reg, 0);
sys/i386/linux/linux_ptrace_machdep.c
431
error = kern_ptrace(td, PT_SETREGS, pid, &u.bsd_reg, 0);
sys/i386/linux/linux_ptrace_machdep.c
439
error = kern_ptrace(td, PT_GETDBREGS, pid, &u.bsd_dbreg,
sys/i386/linux/linux_ptrace_machdep.c
454
error = kern_ptrace(td, PT_SETDBREGS, pid,
sys/i386/linux/linux_systrace_args.c
1020
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1069
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1077
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1085
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1094
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1120
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1253
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1738
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1747
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
1925
iarg[a++] = p->pid; /* int */
sys/i386/linux/linux_systrace_args.c
203
iarg[a++] = p->pid; /* l_long */
sys/i386/linux/linux_systrace_args.c
2259
iarg[a++] = p->pid; /* l_int */
sys/i386/linux/linux_systrace_args.c
2486
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
252
iarg[a++] = p->pid; /* l_int */
sys/i386/linux/linux_systrace_args.c
2543
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
2555
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
2587
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
2596
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
3184
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
374
iarg[a++] = p->pid; /* int */
sys/i386/linux/linux_systrace_args.c
64
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
784
iarg[a++] = p->pid; /* l_pid_t */
sys/i386/linux/linux_systrace_args.c
905
iarg[a++] = p->pid; /* int */
sys/kern/coredump_vnode.c
304
corefile_open(const char *comm, uid_t uid, pid_t pid, struct thread *td,
sys/kern/coredump_vnode.c
352
sbuf_printf(&sb, "%u", pid);
sys/kern/coredump_vnode.c
380
"long\n", (long)pid, comm, (u_long)uid);
sys/kern/coredump_vnode.c
395
pid, comm, uid, name, error);
sys/kern/kern_boottrace.c
195
(bte)->tdname, (bte)->name, (bte)->pid, \
sys/kern/kern_boottrace.c
201
(bte)->tdname, (bte)->name, (bte)->pid, \
sys/kern/kern_boottrace.c
355
btp->table[idx].pid = curthread->td_proc->p_pid;
sys/kern/kern_boottrace.c
64
pid_t pid; /* Current PID */
sys/kern/kern_cpuset.c
1243
cpuset_setproc(pid_t pid, struct cpuset *set, cpuset_t *mask,
sys/kern/kern_cpuset.c
1273
error = cpuset_which(CPU_WHICH_PID, pid, &p, &td, &nset);
sys/kern/kern_event.c
557
knote_fork(struct knlist *list, int pid)
sys/kern/kern_event.c
607
kev.ident = pid;
sys/kern/kern_event.c
622
kev.ident = pid;
sys/kern/kern_exit.c
1242
kern_wait(struct thread *td, pid_t pid, int *status, int options,
sys/kern/kern_exit.c
1255
if (pid == WAIT_ANY) {
sys/kern/kern_exit.c
1258
} else if (pid < 0) {
sys/kern/kern_exit.c
1260
id = (id_t)-pid;
sys/kern/kern_exit.c
1263
id = (id_t)pid;
sys/kern/kern_exit.c
1397
pid_t pid;
sys/kern/kern_exit.c
1426
pid = p->p_pid;
sys/kern/kern_exit.c
1432
td->td_retval[0] = pid;
sys/kern/kern_exit.c
1452
td->td_retval[0] = pid;
sys/kern/kern_exit.c
863
error = kern_wait(td, uap->pid, &status, uap->options, rup);
sys/kern/kern_fork.c
103
int error, pid;
sys/kern/kern_fork.c
107
fr.fr_pidp = &pid;
sys/kern/kern_fork.c
110
td->td_retval[0] = pid;
sys/kern/kern_fork.c
121
int error, fd, pid;
sys/kern/kern_fork.c
125
fr.fr_pidp = &pid;
sys/kern/kern_fork.c
136
td->td_retval[0] = pid;
sys/kern/kern_fork.c
148
int error, pid;
sys/kern/kern_fork.c
152
fr.fr_pidp = &pid;
sys/kern/kern_fork.c
155
td->td_retval[0] = pid;
sys/kern/kern_fork.c
165
int error, pid;
sys/kern/kern_fork.c
183
fr.fr_pidp = &pid;
sys/kern/kern_fork.c
186
td->td_retval[0] = pid;
sys/kern/kern_fork.c
196
int error, fd, pid;
sys/kern/kern_fork.c
225
fr.fr_pidp = &pid;
sys/kern/kern_fork.c
230
td->td_retval[0] = pid;
sys/kern/kern_fork.c
257
int error, pid;
sys/kern/kern_fork.c
263
pid = randompid;
sys/kern/kern_fork.c
264
error = sysctl_handle_int(oidp, &pid, 0, req);
sys/kern/kern_fork.c
266
if (pid == 0)
sys/kern/kern_fork.c
268
else if (pid == 1)
sys/kern/kern_fork.c
271
else if (pid < 0 || pid > pid_max - 100)
sys/kern/kern_fork.c
274
else if (pid < 100)
sys/kern/kern_fork.c
278
randompid = pid;
sys/kern/kern_ktrace.c
1094
int pid;
sys/kern/kern_ktrace.c
1172
if (uap->pid < 0) {
sys/kern/kern_ktrace.c
1176
pg = pgfind(-uap->pid);
sys/kern/kern_ktrace.c
1204
p = pfind(uap->pid);
sys/kern/kern_proc.c
2122
pid_t pid;
sys/kern/kern_proc.c
2128
pid = (pid_t)name[0];
sys/kern/kern_proc.c
2129
if (pid == -1) {
sys/kern/kern_proc.c
2130
pid = p->p_pid;
sys/kern/kern_proc.c
2137
if (pid == p->p_pid && p->p_numthreads == 1 && req->newptr == NULL &&
sys/kern/kern_proc.c
2144
error = pget(pid, flags, &p);
sys/kern/kern_proc.c
3066
pid_t pid;
sys/kern/kern_proc.c
3071
pid = (pid_t)name[0];
sys/kern/kern_proc.c
3073
if (pid == p->p_pid || pid == 0) {
sys/kern/kern_proc.c
3078
error = pget(pid, PGET_WANTREAD, &p);
sys/kern/kern_proc.c
3197
pid_t pid;
sys/kern/kern_proc.c
3209
pid = (pid_t)name[0];
sys/kern/kern_proc.c
3210
error = pget(pid, PGET_HOLD | PGET_NOTWEXIT | PGET_CANDEBUG, &p);
sys/kern/kern_proc.c
3223
if (pid <= PID_MAX) {
sys/kern/kern_proc.c
3227
if (td1->td_tid == pid)
sys/kern/kern_proc.c
3371
static SYSCTL_NODE(_kern_proc, KERN_PROC_PID, pid, CTLFLAG_RD | CTLFLAG_MPSAFE,
sys/kern/kern_proc.c
418
pfind_any_locked(pid_t pid)
sys/kern/kern_proc.c
422
sx_assert(PIDHASHLOCK(pid), SX_LOCKED);
sys/kern/kern_proc.c
423
LIST_FOREACH(p, PIDHASH(pid), p_hash) {
sys/kern/kern_proc.c
424
if (p->p_pid == pid) {
sys/kern/kern_proc.c
443
_pfind(pid_t pid, bool zombie)
sys/kern/kern_proc.c
448
if (p->p_pid == pid) {
sys/kern/kern_proc.c
452
sx_slock(PIDHASHLOCK(pid));
sys/kern/kern_proc.c
453
LIST_FOREACH(p, PIDHASH(pid), p_hash) {
sys/kern/kern_proc.c
454
if (p->p_pid == pid) {
sys/kern/kern_proc.c
464
sx_sunlock(PIDHASHLOCK(pid));
sys/kern/kern_proc.c
469
pfind(pid_t pid)
sys/kern/kern_proc.c
472
return (_pfind(pid, false));
sys/kern/kern_proc.c
479
pfind_any(pid_t pid)
sys/kern/kern_proc.c
482
return (_pfind(pid, true));
sys/kern/kern_proc.c
509
pget(pid_t pid, int flags, struct proc **pp)
sys/kern/kern_proc.c
516
if (p->p_pid == pid) {
sys/kern/kern_proc.c
520
if (pid <= PID_MAX) {
sys/kern/kern_proc.c
522
p = pfind_any(pid);
sys/kern/kern_proc.c
524
p = pfind(pid);
sys/kern/kern_proc.c
526
td1 = tdfind(pid, -1);
sys/kern/kern_procctl.c
476
int pid;
sys/kern/kern_procctl.c
494
while ((pid = next_iter_unr(ihandle)) != -1) {
sys/kern/kern_procctl.c
495
p2 = pfind(pid);
sys/kern/kern_prot.c
180
pid_t pid;
sys/kern/kern_prot.c
189
if (uap->pid == 0) {
sys/kern/kern_prot.c
193
p = pfind(uap->pid);
sys/kern/kern_prot.c
212
pid_t pid;
sys/kern/kern_prot.c
219
return (kern_getsid(td, uap->pid));
sys/kern/kern_prot.c
223
kern_getsid(struct thread *td, pid_t pid)
sys/kern/kern_prot.c
228
if (pid == 0) {
sys/kern/kern_prot.c
232
p = pfind(pid);
sys/kern/kern_prot.c
430
int pid; /* target process id */
sys/kern/kern_prot.c
453
if (uap->pid != 0 && uap->pid != curp->p_pid) {
sys/kern/kern_prot.c
454
if ((targp = pfind(uap->pid)) == NULL) {
sys/kern/kern_resource.c
374
pid_t pid;
sys/kern/kern_resource.c
392
if (uap->pid == 0) {
sys/kern/kern_resource.c
396
p = pfind(uap->pid);
sys/kern/kern_resource.c
413
if (uap->pid == 0) {
sys/kern/kern_resource.c
455
if (uap->pid == 0) {
sys/kern/kern_sig.c
1891
int pid;
sys/kern/kern_sig.c
1900
return (kern_kill(td, uap->pid, uap->signum));
sys/kern/kern_sig.c
1904
kern_kill(struct thread *td, pid_t pid, int signum)
sys/kern/kern_sig.c
1915
if (pid != td->td_proc->p_pid) {
sys/kern/kern_sig.c
1923
AUDIT_ARG_PID(pid);
sys/kern/kern_sig.c
1933
if (pid > 0) {
sys/kern/kern_sig.c
1935
if ((p = pfind_any(pid)) == NULL)
sys/kern/kern_sig.c
1944
switch (pid) {
sys/kern/kern_sig.c
1950
return (killpg1(td, signum, -pid, 0, &ksi));
sys/kern/kern_sig.c
2006
pid_t pid;
sys/kern/kern_sig.c
2018
return (kern_sigqueue(td, uap->pid, uap->signum, &sv));
sys/kern/kern_sig.c
2022
kern_sigqueue(struct thread *td, pid_t pid, int signumf, union sigval *value)
sys/kern/kern_sig.c
2038
if (pid <= 0)
sys/kern/kern_sig.c
2042
if ((p = pfind_any(pid)) == NULL)
sys/kern/kern_sig.c
2047
td2 = tdfind((lwpid_t)pid, p->p_pid);
sys/kern/kern_thr.c
480
if ((p = pfind(uap->pid)) == NULL)
sys/kern/kern_thr.c
503
ttd = tdfind((lwpid_t)uap->id, uap->pid);
sys/kern/kern_thread.c
1724
tdfind_hash(lwpid_t tid, pid_t pid, struct proc **pp, struct thread **tdp)
sys/kern/kern_thread.c
1741
if (pid != -1 && p->p_pid != pid) {
sys/kern/kern_thread.c
1767
tdfind(lwpid_t tid, pid_t pid)
sys/kern/kern_thread.c
1774
if (pid != -1 && td->td_proc->p_pid != pid)
sys/kern/kern_thread.c
1781
if (!tdfind_hash(tid, pid, &p, &td))
sys/kern/kern_time.c
197
pid_t pid;
sys/kern/kern_time.c
208
pid = id;
sys/kern/kern_time.c
210
pid = td->td_proc->p_pid;
sys/kern/kern_time.c
212
*clk_id = MAKE_PROCESS_CPUCLOCK(pid);
sys/kern/kern_time.c
295
pid_t pid;
sys/kern/kern_time.c
307
pid = clock_id & CPUCLOCK_ID_MASK;
sys/kern/kern_time.c
308
error = pget(pid, PGET_CANSEE, &p2);
sys/kern/kern_time.c
69
#define MAKE_PROCESS_CPUCLOCK(pid) \
sys/kern/kern_time.c
70
(CPUCLOCK_BIT|CPUCLOCK_PROCESS_BIT|(pid))
sys/kern/kern_tslog.c
150
tslog_user(pid_t pid, pid_t ppid, const char * execname, const char * namei)
sys/kern/kern_tslog.c
155
if (procs[pid].reused)
sys/kern/kern_tslog.c
161
if (procs[pid].ppid) {
sys/kern/kern_tslog.c
162
procs[pid].reused = 1;
sys/kern/kern_tslog.c
167
procs[pid].ppid = ppid;
sys/kern/kern_tslog.c
168
procs[pid].tsc_forked = tsc;
sys/kern/kern_tslog.c
174
if (procs[pid].execname != NULL)
sys/kern/kern_tslog.c
175
free(procs[pid].execname, M_TSLOGUSER);
sys/kern/kern_tslog.c
176
procs[pid].execname = strdup(execname, M_TSLOGUSER);
sys/kern/kern_tslog.c
182
if (procs[pid].namei == NULL)
sys/kern/kern_tslog.c
183
procs[pid].namei = strdup(namei, M_TSLOGUSER);
sys/kern/kern_tslog.c
188
procs[pid].tsc_exited = tsc;
sys/kern/kern_tslog.c
196
pid_t pid;
sys/kern/kern_tslog.c
201
for (pid = 0; pid <= PID_MAX; pid++) {
sys/kern/kern_tslog.c
202
sbuf_printf(sb, "%zu", (size_t)pid);
sys/kern/kern_tslog.c
203
sbuf_printf(sb, " %zu", (size_t)procs[pid].ppid);
sys/kern/kern_tslog.c
205
(unsigned long long)procs[pid].tsc_forked);
sys/kern/kern_tslog.c
207
(unsigned long long)procs[pid].tsc_exited);
sys/kern/kern_tslog.c
208
sbuf_printf(sb, " \"%s\"", procs[pid].execname ?
sys/kern/kern_tslog.c
209
procs[pid].execname : "");
sys/kern/kern_tslog.c
210
sbuf_printf(sb, " \"%s\"", procs[pid].namei ?
sys/kern/kern_tslog.c
211
procs[pid].namei : "");
sys/kern/p1003_1b.c
121
if (uap->pid == 0) {
sys/kern/p1003_1b.c
126
targetp = pfind(uap->pid);
sys/kern/p1003_1b.c
162
if (uap->pid == 0) {
sys/kern/p1003_1b.c
167
targetp = pfind(uap->pid);
sys/kern/p1003_1b.c
209
if (uap->pid == 0) {
sys/kern/p1003_1b.c
214
targetp = pfind(uap->pid);
sys/kern/p1003_1b.c
255
if (uap->pid == 0) {
sys/kern/p1003_1b.c
260
targetp = pfind(uap->pid);
sys/kern/p1003_1b.c
327
error = kern_sched_rr_get_interval(td, uap->pid, ×pec);
sys/kern/p1003_1b.c
334
kern_sched_rr_get_interval(struct thread *td, pid_t pid,
sys/kern/p1003_1b.c
341
if (pid == 0) {
sys/kern/p1003_1b.c
346
targetp = pfind(pid);
sys/kern/subr_kdb.c
678
kdb_thr_from_pid(pid_t pid)
sys/kern/subr_kdb.c
682
LIST_FOREACH(p, PIDHASH(pid), p_hash) {
sys/kern/subr_kdb.c
683
if (p->p_pid == pid)
sys/kern/sys_generic.c
2155
kcmp_pget(struct thread *td, pid_t pid, struct proc **pp)
sys/kern/sys_generic.c
2159
if (pid == td->td_proc->p_pid) {
sys/kern/sys_generic.c
2163
error = pget(pid, PGET_NOTID | PGET_CANDEBUG | PGET_NOTWEXIT |
sys/kern/sys_procdesc.c
194
pid_t pid;
sys/kern/sys_procdesc.c
198
error = kern_pdgetpid(td, uap->fd, &cap_pdgetpid_rights, &pid);
sys/kern/sys_procdesc.c
200
error = copyout(&pid, uap->pidp, sizeof(pid));
sys/kern/sys_process.c
590
pid_t pid;
sys/kern/sys_process.c
625
AUDIT_ARG_PID(uap->pid);
sys/kern/sys_process.c
703
error = kern_ptrace(td, uap->req, uap->pid, addr, uap->data);
sys/kern/sys_process.c
847
kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
sys/kern/sys_process.c
898
if (pid <= PID_MAX) {
sys/kern/sys_process.c
899
if ((p = pfind(pid)) == NULL) {
sys/kern/sys_process.c
905
td2 = tdfind(pid, -1);
sys/kern/sys_process.c
912
tid = pid;
sys/kern/sys_process.c
913
pid = p->p_pid;
sys/kern/systrace_args.c
1413
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
1494
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
1502
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
1510
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
1519
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
1545
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
173
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
2002
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
2333
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
2536
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
268
iarg[a++] = p->pid; /* int */
sys/kern/systrace_args.c
306
iarg[a++] = p->pid; /* int */
sys/kern/systrace_args.c
465
iarg[a++] = p->pid; /* int */
sys/kern/systrace_args.c
69
iarg[a++] = p->pid; /* int */
sys/kern/systrace_args.c
829
iarg[a++] = p->pid; /* pid_t */
sys/kern/systrace_args.c
985
iarg[a++] = p->pid; /* pid_t */
sys/kern/tty_info.c
294
pid_t pid;
sys/kern/tty_info.c
383
pid = p->p_pid;
sys/kern/tty_info.c
390
comm, pid, stateprefix, state,
sys/net/if_pflog.h
48
pid_t pid;
sys/netipsec/key.c
2758
u_int32_t pid)
sys/netipsec/key.c
2763
m = key_setsadbmsg(type, 0, SADB_SATYPE_UNSPEC, seq, pid, sp->refcnt);
sys/netipsec/key.c
3090
sav->pid = (pid_t)mhp->msg->sadb_msg_pid;
sys/netipsec/key.c
3726
uint32_t seq, uint32_t pid, struct rm_priotracker *sahtree_trackerp)
sys/netipsec/key.c
3754
m = key_setsadbmsg(type, 0, satype, seq, pid, sav->refcnt);
sys/netipsec/key.c
3980
pid_t pid, u_int16_t reserved)
sys/netipsec/key.c
4005
p->sadb_msg_pid = (u_int32_t)pid;
sys/netipsec/key.c
5651
if (sav->pid != mhp->msg->sadb_msg_pid) {
sys/netipsec/key.c
5654
ntohl(sav->spi), sav->pid, mhp->msg->sadb_msg_pid));
sys/netipsec/key_debug.c
860
sav->refcnt, ntohl(sav->spi), sav->seq, (uint32_t)sav->pid,
sys/netipsec/keydb.h
155
pid_t pid; /* message's pid */
sys/netpfil/pf/if_pflog.c
293
hdr.pid = NO_PID;
sys/netpfil/pf/pf_ioctl.c
3028
uid_t uid, pid_t pid)
sys/netpfil/pf/pf_ioctl.c
3067
rule->cpid = pid;
sys/nfs/nfs_lock.h
55
pid_t pid; /* The process ID. */
sys/ofed/drivers/infiniband/core/ib_umem.c
126
umem->pid = get_pid(task_pid(current));
sys/ofed/drivers/infiniband/core/ib_umem.c
218
put_pid(umem->pid);
sys/ofed/drivers/infiniband/core/ib_umem.c
263
task = get_pid_task(umem->pid, PIDTYPE_PID);
sys/ofed/drivers/infiniband/core/ib_umem.c
264
put_pid(umem->pid);
sys/ofed/drivers/infiniband/core/ib_uverbs_main.c
570
current->pid, current->comm);
sys/ofed/drivers/infiniband/ulp/sdp/sdp_dbg.h
35
int pid;
sys/ofed/drivers/infiniband/ulp/sdp/sdp_dbg.h
69
l->pid = current->pid; \
sys/ofed/drivers/infiniband/ulp/sdp/sdp_proc.c
373
l->msg, l->pid, l->cpu, l->sk_num, l->sk_dport,
sys/ofed/include/rdma/ib_umem.h
52
pid_t pid;
sys/ofed/include/rdma/rdmavt_qp.h
280
pid_t pid; /* pid for user mode QPs */
sys/powerpc/aim/mmu_radix.c
190
radix_tlbie(uint8_t ric, uint8_t prs, uint16_t is, uint32_t pid, uint32_t lpid,
sys/powerpc/aim/mmu_radix.c
197
rs = ((uint64_t)pid << 32) | lpid;
sys/powerpc/aim/mmu_radix.c
204
radix_tlbie_fixup(uint32_t pid, vm_offset_t va, int ap)
sys/powerpc/aim/mmu_radix.c
212
TLBIEL_INVAL_PAGE, pid, 0, va, ap);
sys/powerpc/aim/mmu_radix.c
216
radix_tlbie_invlpg_user_4k(uint32_t pid, vm_offset_t va)
sys/powerpc/aim/mmu_radix.c
220
TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_4K);
sys/powerpc/aim/mmu_radix.c
221
radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_4K);
sys/powerpc/aim/mmu_radix.c
225
radix_tlbie_invlpg_user_2m(uint32_t pid, vm_offset_t va)
sys/powerpc/aim/mmu_radix.c
229
TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_2M);
sys/powerpc/aim/mmu_radix.c
230
radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_2M);
sys/powerpc/aim/mmu_radix.c
234
radix_tlbie_invlpwc_user(uint32_t pid)
sys/powerpc/aim/mmu_radix.c
238
TLBIEL_INVAL_SET_PID, pid, 0, 0, 0);
sys/powerpc/aim/mmu_radix.c
242
radix_tlbie_flush_user(uint32_t pid)
sys/powerpc/aim/mmu_radix.c
246
TLBIEL_INVAL_SET_PID, pid, 0, 0, 0);
sys/powerpc/aim/mmu_radix.c
4240
mmu_radix_update_proctab(int pid, pml1_entry_t l1pa)
sys/powerpc/aim/mmu_radix.c
4242
isa3_proctab[pid].proctab0 = htobe64(RTS_SIZE | l1pa | RADIX_PGD_INDEX_SHIFT);
sys/powerpc/aim/mmu_radix.c
4248
vmem_addr_t pid;
sys/powerpc/aim/mmu_radix.c
4264
vmem_alloc(asid_arena, 1, M_FIRSTFIT|M_WAITOK, &pid);
sys/powerpc/aim/mmu_radix.c
4266
pmap->pm_pid = pid;
sys/powerpc/aim/mmu_radix.c
4268
mmu_radix_update_proctab(pid, l1pa);
sys/powerpc/aim/mmu_radix.c
736
uint32_t pid, uint32_t ric, uint32_t prs)
sys/powerpc/aim/mmu_radix.c
742
rs = PPC_BITLSHIFT_VAL((uint64_t)pid, 31);
sys/security/audit/audit.h
109
void audit_arg_pid(pid_t pid);
sys/security/audit/audit.h
252
#define AUDIT_ARG_PID(pid) do { \
sys/security/audit/audit.h
254
audit_arg_pid((pid)); \
sys/security/audit/audit.h
442
#define AUDIT_ARG_PID(pid)
sys/security/audit/audit_arg.c
382
audit_arg_pid(pid_t pid)
sys/security/audit/audit_arg.c
390
ar->k_ar.ar_arg_pid = pid;
sys/security/audit/bsm_token.c
1096
pid_t pid, au_asid_t sid, au_tid_t *tid)
sys/security/audit/bsm_token.c
1109
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
1119
pid_t pid, au_asid_t sid, au_tid_t *tid)
sys/security/audit/bsm_token.c
1133
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
1143
pid_t pid, au_asid_t sid, au_tid_t *tid)
sys/security/audit/bsm_token.c
1146
return (au_to_subject32(auid, euid, egid, ruid, rgid, pid, sid,
sys/security/audit/bsm_token.c
1166
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid)
sys/security/audit/bsm_token.c
1187
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
1201
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid)
sys/security/audit/bsm_token.c
1224
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
1238
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid)
sys/security/audit/bsm_token.c
1241
return (au_to_subject32_ex(auid, euid, egid, ruid, rgid, pid, sid,
sys/security/audit/bsm_token.c
667
pid_t pid, au_asid_t sid, au_tid_t *tid)
sys/security/audit/bsm_token.c
680
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
697
pid_t pid, au_asid_t sid, au_tid_t *tid)
sys/security/audit/bsm_token.c
711
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
728
pid_t pid, au_asid_t sid, au_tid_t *tid)
sys/security/audit/bsm_token.c
731
return (au_to_process32(auid, euid, egid, ruid, rgid, pid, sid,
sys/security/audit/bsm_token.c
751
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid)
sys/security/audit/bsm_token.c
771
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
787
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid)
sys/security/audit/bsm_token.c
810
ADD_U_INT32(dptr, pid);
sys/security/audit/bsm_token.c
826
gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid)
sys/security/audit/bsm_token.c
829
return (au_to_process32_ex(auid, euid, egid, ruid, rgid, pid, sid,
sys/security/mac/mac_syscalls.c
175
tproc = pfind(uap->pid);
sys/security/mac_grantbylabel/mac_grantbylabel.c
405
if (gbl_args.u.pid == 0
sys/security/mac_grantbylabel/mac_grantbylabel.c
406
|| gbl_args.u.pid == curproc->p_pid) {
sys/security/mac_grantbylabel/mac_grantbylabel.c
409
proc = pfind(gbl_args.u.pid);
sys/security/mac_grantbylabel/mac_grantbylabel.h
58
pid_t pid;
sys/security/mac_veriexec/mac_veriexec.c
817
pid_t pid;
sys/security/mac_veriexec/mac_veriexec.c
872
CP(pargs32, pargs, u.pid);
sys/security/mac_veriexec/mac_veriexec.c
947
if (pargs.u.pid == 0 || pargs.u.pid == curproc->p_pid) {
sys/security/mac_veriexec/mac_veriexec.c
950
proc = pfind(pargs.u.pid);
sys/security/mac_veriexec/mac_veriexec.h
88
pid_t pid;
sys/sys/agpio.h
124
pid_t pid; /* pid of process */
sys/sys/event.h
352
void knote_fork(struct knlist *list, int pid);
sys/sys/hwt.h
57
pid_t pid; /* thread mode */
sys/sys/pmclog.h
322
void pmclog_process_map_in(struct pmc_owner *po, pid_t pid,
sys/sys/pmclog.h
324
void pmclog_process_map_out(struct pmc_owner *po, pid_t pid,
sys/sys/proc.h
1069
#define PIDHASH(pid) (&pidhashtbl[(pid) & pidhash])
sys/sys/proc.h
1070
#define PIDHASHLOCK(pid) (&pidhashtbl_lock[((pid) & pidhashlock)])
sys/sys/proc.h
1106
struct proc *pfind_any_locked(pid_t pid); /* Find process by id, locked. */
sys/sys/proc.h
1138
int pget(pid_t pid, int flags, struct proc **pp);
sys/sys/soundcard.h
1881
int pid;
sys/sys/soundcard.h
1947
int pid;
sys/sys/syscallsubr.h
194
int kern_getsid(struct thread *td, pid_t pid);
sys/sys/syscallsubr.h
213
int kern_kill(struct thread *td, pid_t pid, int signum);
sys/sys/syscallsubr.h
297
int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr,
sys/sys/syscallsubr.h
317
int kern_sched_rr_get_interval(struct thread *td, pid_t pid,
sys/sys/syscallsubr.h
356
int kern_sigqueue(struct thread *td, pid_t pid, int signum,
sys/sys/syscallsubr.h
394
int kern_wait(struct thread *td, pid_t pid, int *status, int options,
sys/sys/sysproto.h
1069
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
115
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
1240
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
1359
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
168
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
sys/sys/sysproto.h
193
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
sys/sys/sysproto.h
280
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
sys/sys/sysproto.h
485
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
564
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
61
char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
sys/sys/sysproto.h
756
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
797
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
801
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
805
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
810
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/sysproto.h
822
char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)];
sys/sys/thr.h
79
int thr_kill2(pid_t pid, long id, int sig);
tests/sys/aio/aio_test.c
973
pid_t pid;
tests/sys/aio/aio_test.c
980
pid = getpid();
tests/sys/aio/aio_test.c
983
pid);
tests/sys/aio/aio_test.c
995
fprintf(pidfile, "%d", pid);
tests/sys/audit/administrative.c
1017
pid = getpid();
tests/sys/audit/administrative.c
1019
snprintf(adregex, sizeof(adregex), "GQCTRL command.*%d.*success", pid);
tests/sys/audit/administrative.c
1042
pid = getpid();
tests/sys/audit/administrative.c
1043
snprintf(adregex, sizeof(adregex), "GQCTRL command.*%d.*failure", pid);
tests/sys/audit/administrative.c
1066
pid = getpid();
tests/sys/audit/administrative.c
1068
snprintf(adregex, sizeof(adregex), "SQCTRL command.*%d.*success", pid);
tests/sys/audit/administrative.c
1094
pid = getpid();
tests/sys/audit/administrative.c
1095
snprintf(adregex, sizeof(adregex), "SQCTRL command.*%d.*failure", pid);
tests/sys/audit/administrative.c
1118
pid = getpid();
tests/sys/audit/administrative.c
1120
snprintf(adregex, sizeof(adregex), "get event class.*%d.*success", pid);
tests/sys/audit/administrative.c
1145
pid = getpid();
tests/sys/audit/administrative.c
1146
snprintf(adregex, sizeof(adregex), "get event class.*%d.*failure", pid);
tests/sys/audit/administrative.c
1169
pid = getpid();
tests/sys/audit/administrative.c
1171
snprintf(adregex, sizeof(adregex), "set event class.*%d.*success", pid);
tests/sys/audit/administrative.c
1198
pid = getpid();
tests/sys/audit/administrative.c
1199
snprintf(adregex, sizeof(adregex), "set event class.*%d.*failure", pid);
tests/sys/audit/administrative.c
1223
pid = getpid();
tests/sys/audit/administrative.c
1224
snprintf(adregex, sizeof(adregex), "get audit state.*%d.*success", pid);
tests/sys/audit/administrative.c
1246
pid = getpid();
tests/sys/audit/administrative.c
1247
snprintf(adregex, sizeof(adregex), "get audit state.*%d.*failure", pid);
tests/sys/audit/administrative.c
126
pid = getpid();
tests/sys/audit/administrative.c
127
snprintf(adregex, sizeof(adregex), "clock_settime.*%d.*success", pid);
tests/sys/audit/administrative.c
1271
pid = getpid();
tests/sys/audit/administrative.c
1272
snprintf(adregex, sizeof(adregex), "set audit state.*%d.*success", pid);
tests/sys/audit/administrative.c
1295
pid = getpid();
tests/sys/audit/administrative.c
1296
snprintf(adregex, sizeof(adregex), "set audit state.*%d.*failure", pid);
tests/sys/audit/administrative.c
1325
pid = getpid();
tests/sys/audit/administrative.c
1326
snprintf(adregex, sizeof(adregex), "get cwd.*%d.*failure", pid);
tests/sys/audit/administrative.c
1349
pid = getpid();
tests/sys/audit/administrative.c
1350
snprintf(adregex, sizeof(adregex), "get car.*%d.*failure", pid);
tests/sys/audit/administrative.c
1373
pid = getpid();
tests/sys/audit/administrative.c
1375
"get audit statistics.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
1398
pid = getpid();
tests/sys/audit/administrative.c
1400
"set audit statistics.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
1423
pid = getpid();
tests/sys/audit/administrative.c
1425
"set mask per uid.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
1448
pid = getpid();
tests/sys/audit/administrative.c
1450
"set mask per session.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
1479
pid = getpid();
tests/sys/audit/administrative.c
1480
snprintf(adregex, sizeof(adregex), "reboot.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
1508
pid = getpid();
tests/sys/audit/administrative.c
1509
snprintf(adregex, sizeof(adregex), "quotactl.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
153
pid = getpid();
tests/sys/audit/administrative.c
1531
pid = getpid();
tests/sys/audit/administrative.c
1532
snprintf(adregex, sizeof(adregex), "mount.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
154
snprintf(adregex, sizeof(adregex), "clock_settime.*%d.*failure", pid);
tests/sys/audit/administrative.c
1554
pid = getpid();
tests/sys/audit/administrative.c
1555
snprintf(adregex, sizeof(adregex), "nmount.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
1577
pid = getpid();
tests/sys/audit/administrative.c
1578
snprintf(adregex, sizeof(adregex), "swapon.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
1601
pid = getpid();
tests/sys/audit/administrative.c
1602
snprintf(adregex, sizeof(adregex), "swapoff.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
180
pid = getpid();
tests/sys/audit/administrative.c
181
snprintf(adregex, sizeof(adregex), "adjtime.*%d.*return,success", pid);
tests/sys/audit/administrative.c
204
pid = getpid();
tests/sys/audit/administrative.c
205
snprintf(adregex, sizeof(adregex), "adjtime.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
230
pid = getpid();
tests/sys/audit/administrative.c
231
snprintf(adregex, sizeof(adregex), "ntp_adjtime.*%d.*success", pid);
tests/sys/audit/administrative.c
253
pid = getpid();
tests/sys/audit/administrative.c
254
snprintf(adregex, sizeof(adregex), "ntp_adjtime.*%d.*failure", pid);
tests/sys/audit/administrative.c
277
pid = getpid();
tests/sys/audit/administrative.c
278
snprintf(adregex, sizeof(adregex), "nfs_getfh.*%d.*ret.*success", pid);
tests/sys/audit/administrative.c
303
pid = getpid();
tests/sys/audit/administrative.c
304
snprintf(adregex, sizeof(adregex), "nfs_getfh.*%d.*ret.*failure", pid);
tests/sys/audit/administrative.c
364
pid = getpid();
tests/sys/audit/administrative.c
365
snprintf(adregex, sizeof(adregex), "auditctl.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
407
pid = getpid();
tests/sys/audit/administrative.c
409
"acct.*%s.*%d.*return,success", path, pid);
tests/sys/audit/administrative.c
442
pid = getpid();
tests/sys/audit/administrative.c
443
snprintf(adregex, sizeof(adregex), "acct.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
467
pid = getpid();
tests/sys/audit/administrative.c
468
snprintf(adregex, sizeof(adregex), "getauid.*%d.*return,success", pid);
tests/sys/audit/administrative.c
48
static pid_t pid;
tests/sys/audit/administrative.c
490
pid = getpid();
tests/sys/audit/administrative.c
491
snprintf(adregex, sizeof(adregex), "getauid.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
515
pid = getpid();
tests/sys/audit/administrative.c
516
snprintf(adregex, sizeof(adregex), "setauid.*%d.*return,success", pid);
tests/sys/audit/administrative.c
539
pid = getpid();
tests/sys/audit/administrative.c
540
snprintf(adregex, sizeof(adregex), "setauid.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
563
pid = getpid();
tests/sys/audit/administrative.c
565
snprintf(adregex, sizeof(adregex), "getaudit.*%d.*return,success", pid);
tests/sys/audit/administrative.c
587
pid = getpid();
tests/sys/audit/administrative.c
588
snprintf(adregex, sizeof(adregex), "getaudit.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
611
pid = getpid();
tests/sys/audit/administrative.c
613
snprintf(adregex, sizeof(adregex), "setaudit.*%d.*return,success", pid);
tests/sys/audit/administrative.c
636
pid = getpid();
tests/sys/audit/administrative.c
637
snprintf(adregex, sizeof(adregex), "setaudit.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
660
pid = getpid();
tests/sys/audit/administrative.c
663
"getaudit_addr.*%d.*return,success", pid);
tests/sys/audit/administrative.c
685
pid = getpid();
tests/sys/audit/administrative.c
687
"getaudit_addr.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
69
pid = getpid();
tests/sys/audit/administrative.c
70
snprintf(adregex, sizeof(adregex), "settimeofday.*%d.*success", pid);
tests/sys/audit/administrative.c
710
pid = getpid();
tests/sys/audit/administrative.c
713
"setaudit_addr.*%d.*return,success", pid);
tests/sys/audit/administrative.c
736
pid = getpid();
tests/sys/audit/administrative.c
738
"setaudit_addr.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
771
pid = getpid();
tests/sys/audit/administrative.c
772
snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,success", pid);
tests/sys/audit/administrative.c
794
pid = getpid();
tests/sys/audit/administrative.c
795
snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,failure", pid);
tests/sys/audit/administrative.c
819
pid = getpid();
tests/sys/audit/administrative.c
820
snprintf(adregex, sizeof(adregex), "GPOLICY command.*%d.*success", pid);
tests/sys/audit/administrative.c
842
pid = getpid();
tests/sys/audit/administrative.c
843
snprintf(adregex, sizeof(adregex), "GPOLICY command.*%d.*failure", pid);
tests/sys/audit/administrative.c
867
pid = getpid();
tests/sys/audit/administrative.c
868
snprintf(adregex, sizeof(adregex), "SPOLICY command.*%d.*success", pid);
tests/sys/audit/administrative.c
892
pid = getpid();
tests/sys/audit/administrative.c
893
snprintf(adregex, sizeof(adregex), "SPOLICY command.*%d.*failure", pid);
tests/sys/audit/administrative.c
916
pid = getpid();
tests/sys/audit/administrative.c
918
snprintf(adregex, sizeof(adregex), "get kernel mask.*%d.*success", pid);
tests/sys/audit/administrative.c
941
pid = getpid();
tests/sys/audit/administrative.c
942
snprintf(adregex, sizeof(adregex), "get kernel mask.*%d.*failure", pid);
tests/sys/audit/administrative.c
965
pid = getpid();
tests/sys/audit/administrative.c
967
snprintf(adregex, sizeof(adregex), "set kernel mask.*%d.*success", pid);
tests/sys/audit/administrative.c
97
pid = getpid();
tests/sys/audit/administrative.c
98
snprintf(adregex, sizeof(adregex), "settimeofday.*%d.*failure", pid);
tests/sys/audit/administrative.c
993
pid = getpid();
tests/sys/audit/administrative.c
994
snprintf(adregex, sizeof(adregex), "set kernel mask.*%d.*failure", pid);
tests/sys/audit/file-attribute-access.c
341
pid = getpid();
tests/sys/audit/file-attribute-access.c
342
snprintf(extregex, sizeof(extregex), "getfsstat.*%d.*success", pid);
tests/sys/audit/file-attribute-access.c
43
static pid_t pid;
tests/sys/audit/file-attribute-access.c
431
pid = getpid();
tests/sys/audit/file-attribute-access.c
432
snprintf(extregex, sizeof(extregex), "fhopen.*%d.*return,success", pid);
tests/sys/audit/file-attribute-access.c
487
pid = getpid();
tests/sys/audit/file-attribute-access.c
488
snprintf(extregex, sizeof(extregex), "fhstat.*%d.*return,success", pid);
tests/sys/audit/file-attribute-access.c
538
pid = getpid();
tests/sys/audit/file-attribute-access.c
539
snprintf(extregex, sizeof(extregex), "fhstatfs.*%d.*success", pid);
tests/sys/audit/file-attribute-access.c
811
pid = getpid();
tests/sys/audit/file-attribute-access.c
812
snprintf(extregex, sizeof(extregex), "fpathconf.*%d.*success", pid);
tests/sys/audit/file-attribute-modify.c
162
pid = getpid();
tests/sys/audit/file-attribute-modify.c
163
snprintf(extregex, sizeof(extregex), "fsync.*%d.*return,success", pid);
tests/sys/audit/file-attribute-modify.c
254
pid = getpid();
tests/sys/audit/file-attribute-modify.c
255
snprintf(extregex, sizeof(extregex), "fchmod.*%d.*return,success", pid);
tests/sys/audit/file-attribute-modify.c
41
static pid_t pid;
tests/sys/audit/file-attribute-modify.c
433
pid = getpid();
tests/sys/audit/file-attribute-modify.c
434
snprintf(extregex, sizeof(extregex), "fchown.*%d.*return,success", pid);
tests/sys/audit/file-attribute-modify.c
613
pid = getpid();
tests/sys/audit/file-attribute-modify.c
614
snprintf(extregex, sizeof(extregex), "fchflags.*%d.*ret.*success", pid);
tests/sys/audit/file-attribute-modify.c
66
pid = getpid();
tests/sys/audit/file-attribute-modify.c
67
snprintf(extregex, sizeof(extregex), "flock.*%d.*return,success", pid);
tests/sys/audit/file-attribute-modify.c
793
pid = getpid();
tests/sys/audit/file-attribute-modify.c
794
snprintf(extregex, sizeof(extregex), "futimes.*%d.*ret.*success", pid);
tests/sys/audit/file-attribute-modify.c
928
pid = getpid();
tests/sys/audit/file-attribute-modify.c
929
snprintf(extregex, sizeof(extregex), "mprotect.*%d.*ret.*success", pid);
tests/sys/audit/file-attribute-modify.c
977
pid = getpid();
tests/sys/audit/file-attribute-modify.c
978
snprintf(extregex, sizeof(extregex), "undelete.*%d.*ret.*failure", pid);
tests/sys/audit/file-close.c
180
pid = getpid();
tests/sys/audit/file-close.c
181
snprintf(extregex, sizeof(extregex), "revoke.*%d.*return,success", pid);
tests/sys/audit/file-close.c
38
static pid_t pid;
tests/sys/audit/file-close.c
59
pid = getpid();
tests/sys/audit/file-close.c
60
snprintf(extregex, sizeof(extregex), "munmap.*%d.*return,success", pid);
tests/sys/audit/inter-process.c
1409
pid = getpid();
tests/sys/audit/inter-process.c
1410
snprintf(ipcregex, sizeof(ipcregex), "shm_open.*%d.*ret.*success", pid);
tests/sys/audit/inter-process.c
1503
pid = getpid();
tests/sys/audit/inter-process.c
1504
snprintf(ipcregex, sizeof(ipcregex), "pipe.*%d.*return,success", pid);
tests/sys/audit/inter-process.c
1528
pid = getpid();
tests/sys/audit/inter-process.c
1529
snprintf(ipcregex, sizeof(ipcregex), "pipe.*%d.*return.failure", pid);
tests/sys/audit/inter-process.c
49
static pid_t pid;
tests/sys/audit/inter-process.c
512
pid = getpid();
tests/sys/audit/inter-process.c
513
snprintf(ipcregex, sizeof(ipcregex), "shmdt.*%d.*return,success", pid);
tests/sys/audit/inter-process.c
774
pid = getpid();
tests/sys/audit/inter-process.c
775
snprintf(ipcregex, sizeof(ipcregex), "semget.*%d.*return,failure", pid);
tests/sys/audit/miscellaneous.c
144
pid = getpid();
tests/sys/audit/miscellaneous.c
145
snprintf(miscreg, sizeof(miscreg), "sysarch.*%d.*return,failure", pid);
tests/sys/audit/miscellaneous.c
176
pid = getpid();
tests/sys/audit/miscellaneous.c
177
snprintf(miscreg, sizeof(miscreg), "sysctl.*%d.*return,success", pid);
tests/sys/audit/miscellaneous.c
199
pid = getpid();
tests/sys/audit/miscellaneous.c
200
snprintf(miscreg, sizeof(miscreg), "sysctl.*%d.*return,failure", pid);
tests/sys/audit/miscellaneous.c
37
static pid_t pid;
tests/sys/audit/miscellaneous.c
58
pid = getpid();
tests/sys/audit/miscellaneous.c
59
snprintf(miscreg, sizeof(miscreg), "audit.*%d.*return,failure", pid);
tests/sys/audit/miscellaneous.c
82
pid = getpid();
tests/sys/audit/miscellaneous.c
83
snprintf(miscreg, sizeof(miscreg), "sysarch.*%d.*return,success", pid);
tests/sys/audit/network.c
1019
pid = getpid();
tests/sys/audit/network.c
1021
"shutdown.*%d.*return,failure", pid);
tests/sys/audit/network.c
1075
pid = getpid();
tests/sys/audit/network.c
1077
"sendfile.*%d.*return,failure", pid);
tests/sys/audit/network.c
1098
pid = getpid();
tests/sys/audit/network.c
1099
snprintf(extregex, sizeof(extregex), "setfib.*%d.*return,success", pid);
tests/sys/audit/network.c
1121
pid = getpid();
tests/sys/audit/network.c
1122
snprintf(extregex, sizeof(extregex), "setfib.*%d.*return,failure", pid);
tests/sys/audit/network.c
42
static pid_t pid;
tests/sys/audit/process-control.c
100
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/audit/process-control.c
101
if (pid) {
tests/sys/audit/process-control.c
1010
pid = getpid();
tests/sys/audit/process-control.c
1011
snprintf(pcregex, sizeof(pcregex), "setsid.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
102
snprintf(pcregex, sizeof(pcregex), "exit.*%d.*success", pid);
tests/sys/audit/process-control.c
1045
pid = getpid();
tests/sys/audit/process-control.c
1046
snprintf(pcregex, sizeof(pcregex), "setrlimit.*%d.*ret.*success", pid);
tests/sys/audit/process-control.c
1070
pid = getpid();
tests/sys/audit/process-control.c
1071
snprintf(pcregex, sizeof(pcregex), "setrlimit.*%d.*ret.*failure", pid);
tests/sys/audit/process-control.c
1093
pid = getpid();
tests/sys/audit/process-control.c
1094
snprintf(pcregex, sizeof(pcregex), "mlock.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1116
pid = getpid();
tests/sys/audit/process-control.c
1117
snprintf(pcregex, sizeof(pcregex), "mlock.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1139
pid = getpid();
tests/sys/audit/process-control.c
1140
snprintf(pcregex, sizeof(pcregex), "munlock.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1162
pid = getpid();
tests/sys/audit/process-control.c
1163
snprintf(pcregex, sizeof(pcregex), "munlock.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1185
pid = getpid();
tests/sys/audit/process-control.c
1186
snprintf(pcregex, sizeof(pcregex), "minherit.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1208
pid = getpid();
tests/sys/audit/process-control.c
1209
snprintf(pcregex, sizeof(pcregex), "minherit.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1232
pid = getpid();
tests/sys/audit/process-control.c
1233
snprintf(pcregex, sizeof(pcregex), "setlogin.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1257
pid = getpid();
tests/sys/audit/process-control.c
1258
snprintf(pcregex, sizeof(pcregex), "setlogin.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
128
pid = getpid();
tests/sys/audit/process-control.c
1281
pid = getpid();
tests/sys/audit/process-control.c
1282
snprintf(pcregex, sizeof(pcregex), "rtprio.*%d.*return,success", pid);
tests/sys/audit/process-control.c
129
snprintf(pcregex, sizeof(pcregex), "rfork.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1304
pid = getpid();
tests/sys/audit/process-control.c
1305
snprintf(pcregex, sizeof(pcregex), "rtprio.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
132
ATF_REQUIRE((pid = rfork(RFPROC)) != -1);
tests/sys/audit/process-control.c
1327
pid = getpid();
tests/sys/audit/process-control.c
1328
snprintf(pcregex, sizeof(pcregex), "profil.*%d.*return,success", pid);
tests/sys/audit/process-control.c
133
if (pid)
tests/sys/audit/process-control.c
1352
pid = getpid();
tests/sys/audit/process-control.c
1353
snprintf(pcregex, sizeof(pcregex), "profil.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1375
pid = getpid();
tests/sys/audit/process-control.c
1376
snprintf(pcregex, sizeof(pcregex), "ptrace.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1398
pid = getpid();
tests/sys/audit/process-control.c
1399
snprintf(pcregex, sizeof(pcregex), "ptrace.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1421
pid = getpid();
tests/sys/audit/process-control.c
1422
snprintf(pcregex, sizeof(pcregex), "ktrace.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1425
ATF_REQUIRE_EQ(0, ktrace(NULL, KTROP_CLEAR, KTRFAC_SYSCALL, pid));
tests/sys/audit/process-control.c
1444
pid = getpid();
tests/sys/audit/process-control.c
1445
snprintf(pcregex, sizeof(pcregex), "ktrace.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1467
pid = getpid();
tests/sys/audit/process-control.c
1468
snprintf(pcregex, sizeof(pcregex), "procctl.*%d.*return,success", pid);
tests/sys/audit/process-control.c
1473
ATF_REQUIRE_EQ(0, procctl(P_PID, pid, PROC_REAP_STATUS, &reapstat));
tests/sys/audit/process-control.c
1492
pid = getpid();
tests/sys/audit/process-control.c
1493
snprintf(pcregex, sizeof(pcregex), "procctl.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1518
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/audit/process-control.c
1519
if (pid) {
tests/sys/audit/process-control.c
1521
"cap_enter.*%d.*return,success", pid);
tests/sys/audit/process-control.c
154
pid = getpid();
tests/sys/audit/process-control.c
155
snprintf(pcregex, sizeof(pcregex), "rfork.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
1550
pid = getpid();
tests/sys/audit/process-control.c
1551
snprintf(pcregex, sizeof(pcregex), "cap_getmode.*%d.*success", pid);
tests/sys/audit/process-control.c
1573
pid = getpid();
tests/sys/audit/process-control.c
1574
snprintf(pcregex, sizeof(pcregex), "cap_getmode.*%d.*failure", pid);
tests/sys/audit/process-control.c
178
pid = getpid();
tests/sys/audit/process-control.c
179
snprintf(pcregex, sizeof(pcregex), "wait4.*%d.*return,success", pid);
tests/sys/audit/process-control.c
181
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/audit/process-control.c
182
if (pid) {
tests/sys/audit/process-control.c
207
pid = getpid();
tests/sys/audit/process-control.c
208
snprintf(pcregex, sizeof(pcregex), "wait4.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
231
pid = getpid();
tests/sys/audit/process-control.c
232
snprintf(pcregex, sizeof(pcregex), "wait6.*%d.*return,success", pid);
tests/sys/audit/process-control.c
234
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/audit/process-control.c
235
if (pid) {
tests/sys/audit/process-control.c
259
pid = getpid();
tests/sys/audit/process-control.c
260
snprintf(pcregex, sizeof(pcregex), "wait6.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
283
pid = getpid();
tests/sys/audit/process-control.c
284
snprintf(pcregex, sizeof(pcregex), "kill.*%d.*return,success", pid);
tests/sys/audit/process-control.c
307
pid = getpid();
tests/sys/audit/process-control.c
308
snprintf(pcregex, sizeof(pcregex), "kill.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
335
pid = getpid();
tests/sys/audit/process-control.c
336
snprintf(pcregex, sizeof(pcregex), "chdir.*/.*%d.*return,success", pid);
tests/sys/audit/process-control.c
358
pid = getpid();
tests/sys/audit/process-control.c
359
snprintf(pcregex, sizeof(pcregex), "chdir.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
388
pid = getpid();
tests/sys/audit/process-control.c
389
snprintf(pcregex, sizeof(pcregex), "fchdir.*%d.*return,success", pid);
tests/sys/audit/process-control.c
412
pid = getpid();
tests/sys/audit/process-control.c
413
snprintf(pcregex, sizeof(pcregex), "fchdir.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
436
pid = getpid();
tests/sys/audit/process-control.c
437
snprintf(pcregex, sizeof(pcregex), "chroot.*%d.*return,success", pid);
tests/sys/audit/process-control.c
460
pid = getpid();
tests/sys/audit/process-control.c
461
snprintf(pcregex, sizeof(pcregex), "chroot.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
483
pid = getpid();
tests/sys/audit/process-control.c
484
snprintf(pcregex, sizeof(pcregex), "umask.*%d.*return,success", pid);
tests/sys/audit/process-control.c
51
static pid_t pid;
tests/sys/audit/process-control.c
510
pid = getpid();
tests/sys/audit/process-control.c
511
snprintf(pcregex, sizeof(pcregex), "setuid.*%d.*return,success", pid);
tests/sys/audit/process-control.c
539
pid = getpid();
tests/sys/audit/process-control.c
540
snprintf(pcregex, sizeof(pcregex), "seteuid.*%d.*return,success", pid);
tests/sys/audit/process-control.c
568
pid = getpid();
tests/sys/audit/process-control.c
569
snprintf(pcregex, sizeof(pcregex), "setgid.*%d.*return,success", pid);
tests/sys/audit/process-control.c
596
pid = getpid();
tests/sys/audit/process-control.c
597
snprintf(pcregex, sizeof(pcregex), "setegid.*%d.*return,success", pid);
tests/sys/audit/process-control.c
624
pid = getpid();
tests/sys/audit/process-control.c
625
snprintf(pcregex, sizeof(pcregex), "setregid.*%d.*return,success", pid);
tests/sys/audit/process-control.c
653
pid = getpid();
tests/sys/audit/process-control.c
654
snprintf(pcregex, sizeof(pcregex), "setreuid.*%d.*return,success", pid);
tests/sys/audit/process-control.c
67
pid = getpid();
tests/sys/audit/process-control.c
68
snprintf(pcregex, sizeof(pcregex), "fork.*%d.*return,success", pid);
tests/sys/audit/process-control.c
682
pid = getpid();
tests/sys/audit/process-control.c
683
snprintf(pcregex, sizeof(pcregex), "setresuid.*%d.*return,success", pid);
tests/sys/audit/process-control.c
711
pid = getpid();
tests/sys/audit/process-control.c
712
snprintf(pcregex, sizeof(pcregex), "setresgid.*%d.*ret.*success", pid);
tests/sys/audit/process-control.c
72
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/audit/process-control.c
73
if (pid)
tests/sys/audit/process-control.c
740
pid = getpid();
tests/sys/audit/process-control.c
741
snprintf(pcregex, sizeof(pcregex), "getresuid.*%d.*ret.*success", pid);
tests/sys/audit/process-control.c
763
pid = getpid();
tests/sys/audit/process-control.c
764
snprintf(pcregex, sizeof(pcregex), "getresuid.*%d.*ret.*failure", pid);
tests/sys/audit/process-control.c
787
pid = getpid();
tests/sys/audit/process-control.c
788
snprintf(pcregex, sizeof(pcregex), "getresgid.*%d.*ret.*success", pid);
tests/sys/audit/process-control.c
810
pid = getpid();
tests/sys/audit/process-control.c
811
snprintf(pcregex, sizeof(pcregex), "getresgid.*%d.*ret.*failure", pid);
tests/sys/audit/process-control.c
834
pid = getpid();
tests/sys/audit/process-control.c
835
snprintf(pcregex, sizeof(pcregex), "setpriority.*%d.*success", pid);
tests/sys/audit/process-control.c
857
pid = getpid();
tests/sys/audit/process-control.c
858
snprintf(pcregex, sizeof(pcregex), "setpriority.*%d.*failure", pid);
tests/sys/audit/process-control.c
881
pid = getpid();
tests/sys/audit/process-control.c
882
snprintf(pcregex, sizeof(pcregex), "setgroups.*%d.*ret.*success", pid);
tests/sys/audit/process-control.c
906
pid = getpid();
tests/sys/audit/process-control.c
907
snprintf(pcregex, sizeof(pcregex), "setgroups.*%d.*ret.*failure", pid);
tests/sys/audit/process-control.c
930
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/audit/process-control.c
931
if (pid) {
tests/sys/audit/process-control.c
934
pid = getpid();
tests/sys/audit/process-control.c
935
snprintf(pcregex, sizeof(pcregex), "setpgrp.*%d.*success", pid);
tests/sys/audit/process-control.c
958
pid = getpid();
tests/sys/audit/process-control.c
959
snprintf(pcregex, sizeof(pcregex), "setpgrp.*%d.*return,failure", pid);
tests/sys/audit/process-control.c
982
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/audit/process-control.c
983
if (pid) {
tests/sys/audit/process-control.c
986
pid = getpid();
tests/sys/audit/process-control.c
987
snprintf(pcregex, sizeof(pcregex), "setsid.*%d.*success", pid);
tests/sys/capsicum/capmode.cc
543
pid_t pid = fork();
tests/sys/capsicum/capmode.cc
544
EXPECT_OK(pid);
tests/sys/capsicum/capmode.cc
545
if (pid == 0) {
tests/sys/capsicum/capmode.cc
551
} else if (pid > 0) {
tests/sys/capsicum/capmode.cc
555
EXPECT_CAPMODE(ptrace_(PTRACE_PEEKDATA_, pid, &pid, NULL));
tests/sys/capsicum/capsicum-test.cc
38
char ProcessState(int pid) {
tests/sys/capsicum/capsicum-test.cc
46
name[3] = pid;
tests/sys/capsicum/capsicum-test.cc
48
if (verbose) fprintf(stderr, "Process %d does not exist\n", pid);
tests/sys/capsicum/capsicum-test.cc
55
struct kinfo_proc *p = procstat_getprocs(prstat, KERN_PROC_PID, pid, &count);
tests/sys/capsicum/capsicum-test.cc
94
if (verbose) fprintf(stderr, "Process %d in state '%c'\n", pid, result);
tests/sys/capsicum/capsicum-test.h
231
char ProcessState(int pid);
tests/sys/capsicum/capsicum-test.h
235
#define EXPECT_PID_REACHES_STATES(pid, expected1, expected2) { \
tests/sys/capsicum/capsicum-test.h
239
state = ProcessState(pid); \
tests/sys/capsicum/capsicum-test.h
244
<< " pid " << pid << " in state " << state; \
tests/sys/capsicum/capsicum-test.h
247
#define EXPECT_PID_ALIVE(pid) EXPECT_PID_REACHES_STATES(pid, 'R', 'S')
tests/sys/capsicum/capsicum-test.h
248
#define EXPECT_PID_DEAD(pid) EXPECT_PID_REACHES_STATES(pid, 'Z', '\0')
tests/sys/capsicum/capsicum-test.h
249
#define EXPECT_PID_ZOMBIE(pid) EXPECT_PID_REACHES_STATES(pid, 'Z', 'Z');
tests/sys/capsicum/capsicum-test.h
250
#define EXPECT_PID_GONE(pid) EXPECT_PID_REACHES_STATES(pid, '\0', '\0');
tests/sys/capsicum/capsicum-test.h
71
pid_t pid = force_nofork ? 0 : fork(); \
tests/sys/capsicum/capsicum-test.h
72
if (pid == 0) { \
tests/sys/capsicum/capsicum-test.h
77
} else if (pid > 0) { \
tests/sys/capsicum/capsicum-test.h
82
rc = waitpid(pid, &status, WNOHANG); \
tests/sys/capsicum/capsicum-test.h
90
TESTCASENAME, TESTNAME, pid); \
tests/sys/capsicum/capsicum-test.h
91
kill(pid, SIGKILL); \
tests/sys/capsicum/ioctls_test.c
107
ATF_REQUIRE(pid > 0);
tests/sys/capsicum/ioctls_test.c
116
ATF_REQUIRE(wait(&status) == pid);
tests/sys/capsicum/ioctls_test.c
71
pid_t pid;
tests/sys/capsicum/ioctls_test.c
98
pid = fork();
tests/sys/capsicum/ioctls_test.c
99
if (pid == 0) {
tests/sys/capsicum/linux.cc
1020
hdr.pid = getpid_();
tests/sys/capsicum/linux.cc
487
EXPECT_EQ(child, ev.pid);
tests/sys/capsicum/linux.cc
738
pid_t pid;
tests/sys/capsicum/linux.cc
739
EXPECT_OK(pdgetpid(pd, &pid));
tests/sys/capsicum/linux.cc
740
EXPECT_EQ(child, pid);
tests/sys/capsicum/procdesc.cc
102
int pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
103
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
104
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
121
EXPECT_PID_ALIVE(pid);
tests/sys/capsicum/procdesc.cc
124
EXPECT_EQ(pid, pid_got);
tests/sys/capsicum/procdesc.cc
130
EXPECT_PID_ZOMBIE(pid);
tests/sys/capsicum/procdesc.cc
138
EXPECT_EQ(pid, waitrc);
tests/sys/capsicum/procdesc.cc
140
fprintf(stderr, "For pd %d pid %d:\n", pd, pid);
tests/sys/capsicum/procdesc.cc
143
EXPECT_PID_GONE(pid);
tests/sys/capsicum/procdesc.cc
155
int pid = pdfork(&pd, PD_DAEMON<<5);
tests/sys/capsicum/procdesc.cc
156
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
159
EXPECT_EQ(-1, pid);
tests/sys/capsicum/procdesc.cc
161
if (pid > 0) waitpid(pid, NULL, 0);
tests/sys/capsicum/procdesc.cc
170
pid_t pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
171
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
172
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
174
EXPECT_EQ(-1, pdgetpid(pd, &pid));
tests/sys/capsicum/procdesc.cc
194
EXPECT_EQ(pid, pd_pid);
tests/sys/capsicum/procdesc.cc
195
CheckChildFinished(pid);
tests/sys/capsicum/procdesc.cc
200
pid_t pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
201
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
202
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
206
CheckChildFinished(pid);
tests/sys/capsicum/procdesc.cc
216
pid_t pid;
tests/sys/capsicum/procdesc.cc
217
EXPECT_EQ(-1, pdgetpid(fd, &pid));
tests/sys/capsicum/procdesc.cc
281
pid_t pid;
tests/sys/capsicum/procdesc.cc
282
EXPECT_OK(pdgetpid(pd, &pid));
tests/sys/capsicum/procdesc.cc
285
EXPECT_EQ(pid, pdwait4_(pd, &status, 0, NULL));
tests/sys/capsicum/procdesc.cc
31
pid_t pid = -1;
tests/sys/capsicum/procdesc.cc
32
int rc = pdgetpid(pd, &pid);
tests/sys/capsicum/procdesc.cc
36
return wait4(pid, status, options, ru);
tests/sys/capsicum/procdesc.cc
541
pid_t pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
542
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
543
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
557
EXPECT_EQ(-1, kill(pid, SIGKILL));
tests/sys/capsicum/procdesc.cc
559
EXPECT_PID_ALIVE(pid);
tests/sys/capsicum/procdesc.cc
567
EXPECT_SYSCALL_FAIL(EBADF, pdkill(pid, SIGKILL));
tests/sys/capsicum/procdesc.cc
568
EXPECT_PID_ALIVE(pid);
tests/sys/capsicum/procdesc.cc
571
EXPECT_PID_GONE(pid);
tests/sys/capsicum/procdesc.cc
577
EXPECT_PID_ZOMBIE(pid);
tests/sys/capsicum/procdesc.cc
581
EXPECT_EQ(pid, rc);
tests/sys/capsicum/procdesc.cc
626
static void TestPdkill(pid_t pid, int pd) {
tests/sys/capsicum/procdesc.cc
627
EXPECT_PID_ALIVE(pid);
tests/sys/capsicum/procdesc.cc
630
EXPECT_PID_ALIVE(pid);
tests/sys/capsicum/procdesc.cc
634
EXPECT_PID_DEAD(pid);
tests/sys/capsicum/procdesc.cc
642
CheckChildFinished(pid, true);
tests/sys/capsicum/procdesc.cc
659
int pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
660
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
661
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
684
EXPECT_PID_ALIVE(pid);
tests/sys/capsicum/procdesc.cc
686
EXPECT_PID_DEAD(pid);
tests/sys/capsicum/procdesc.cc
69
void CheckChildFinished(pid_t pid, bool signaled=false) {
tests/sys/capsicum/procdesc.cc
690
int rc = waitpid(pid, &status, 0);
tests/sys/capsicum/procdesc.cc
692
EXPECT_EQ(pid, rc);
tests/sys/capsicum/procdesc.cc
74
rc = waitpid(pid, &status, 0);
tests/sys/capsicum/procdesc.cc
79
} else if (rc == pid) {
tests/sys/capsicum/procdesc.cc
83
EXPECT_EQ(pid, rc);
tests/sys/capsicum/procdesc.cc
84
if (rc == pid) {
tests/sys/capsicum/procdesc.cc
843
pid_t pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
844
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
846
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
868
EXPECT_EQ(pid, pd_pid);
tests/sys/capsicum/procdesc.cc
878
CheckChildFinished(pid);
tests/sys/capsicum/procdesc.cc
885
pid_t pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
886
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
888
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
908
CheckChildFinished(pid, true);
tests/sys/capsicum/procdesc.cc
940
pid_t pid = pdfork(&pd, 0);
tests/sys/capsicum/procdesc.cc
941
EXPECT_OK(pid);
tests/sys/capsicum/procdesc.cc
942
if (pid == 0) {
tests/sys/capsicum/procdesc.cc
966
EXPECT_EQ(pid, other_pid);
tests/sys/capsicum/procdesc.cc
970
EXPECT_EQ(pid, rc);
tests/sys/capsicum/syscalls.h
92
inline long ptrace_(int request, pid_t pid, void *addr, void *data) {
tests/sys/capsicum/syscalls.h
93
return ptrace(request, pid, (caddr_t)addr, static_cast<int>((long)data));
tests/sys/cddl/zfs/bin/dir_rd_update.c
103
} else if (pid == 0) {
tests/sys/cddl/zfs/bin/dir_rd_update.c
55
pid_t pid;
tests/sys/cddl/zfs/bin/dir_rd_update.c
88
pid = fork();
tests/sys/cddl/zfs/bin/dir_rd_update.c
89
if (pid > 0) {
tests/sys/fifo/fifo_open.c
103
pid_t pid;
tests/sys/fifo/fifo_open.c
105
pid = fork();
tests/sys/fifo/fifo_open.c
106
if (pid < 0) {
tests/sys/fifo/fifo_open.c
111
if (pid == 0)
tests/sys/fifo/fifo_open.c
115
*pidp = pid;
tests/sys/fifo/fifo_open.c
126
wait_and_timeout(pid_t pid, int timeout, int *status, const char *errstr)
tests/sys/fifo/fifo_open.c
136
wpid = waitpid(pid, status, WNOHANG);
tests/sys/fifo/fifo_open.c
138
warn("%s: wait_and_timeout: waitpid %d", errstr, pid);
tests/sys/fifo/fifo_open.c
142
if (wpid == pid)
tests/sys/fifo/fifo_open.c
148
wpid = waitpid(pid, status, WNOHANG);
tests/sys/fifo/fifo_open.c
150
warn("%s: wait_and_timeout: waitpid %d", errstr, pid);
tests/sys/fifo/fifo_open.c
154
if (wpid == pid)
tests/sys/fifo/fifo_open.c
157
if (kill(pid, SIGTERM) < 0) {
tests/sys/fifo/fifo_open.c
158
warn("%s: wait_and_timeout: kill %d", errstr, pid);
tests/sys/fifo/fifo_open.c
162
wpid = waitpid(pid, status, 0);
tests/sys/fifo/fifo_open.c
164
warn("%s: wait_and_timeout: waitpid %d", errstr, pid);
tests/sys/fifo/fifo_open.c
168
if (wpid != pid) {
tests/sys/fifo/fifo_open.c
169
warn("%s: waitpid: returned %d not %d", errstr, wpid, pid);
tests/sys/fifo/fifo_open.c
387
pid_t pid;
tests/sys/fifo/fifo_open.c
392
if (run_in_process(non_blocking_open_reader, &pid,
tests/sys/fifo/fifo_open.c
399
if (wait_and_timeout(pid, 5, &status,
tests/sys/fifo/fifo_open.c
420
pid_t pid;
tests/sys/fifo/fifo_open.c
425
if (run_in_process(non_blocking_open_writer, &pid,
tests/sys/fifo/fifo_open.c
432
if (wait_and_timeout(pid, 5, &status,
tests/sys/file/closefrom_test.c
184
pid_t pid;
tests/sys/file/closefrom_test.c
190
pid = child_fork();
tests/sys/file/closefrom_test.c
191
if (pid == 0) {
tests/sys/file/closefrom_test.c
199
child_wait(pid);
tests/sys/file/closefrom_test.c
205
pid_t pid;
tests/sys/file/closefrom_test.c
211
pid = child_fork();
tests/sys/file/closefrom_test.c
212
if (pid == 0) {
tests/sys/file/closefrom_test.c
220
child_wait(pid);
tests/sys/file/closefrom_test.c
278
pid_t pid;
tests/sys/file/closefrom_test.c
284
pid = child_fork();
tests/sys/file/closefrom_test.c
285
if (pid == 0) {
tests/sys/file/closefrom_test.c
296
child_wait(pid);
tests/sys/file/closefrom_test.c
91
child_wait(pid_t pid)
tests/sys/file/closefrom_test.c
93
atf_utils_wait(pid, 0, "", "");
tests/sys/file/flock_helper.c
1023
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
1024
safe_waitpid(pid);
tests/sys/file/flock_helper.c
1052
int pid;
tests/sys/file/flock_helper.c
1071
pid = fork();
tests/sys/file/flock_helper.c
1072
if (pid < 0)
tests/sys/file/flock_helper.c
1075
if (pid == 0) {
tests/sys/file/flock_helper.c
111
safe_waitpid(pid_t pid)
tests/sys/file/flock_helper.c
1111
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
1112
safe_waitpid(pid);
tests/sys/file/flock_helper.c
1138
int pids[CHILD_COUNT], pid;
tests/sys/file/flock_helper.c
1159
pid = fork();
tests/sys/file/flock_helper.c
1160
if (pid < 0)
tests/sys/file/flock_helper.c
1162
if (pid) {
tests/sys/file/flock_helper.c
1166
pids[i] = pid;
tests/sys/file/flock_helper.c
118
while (waitpid(pid, &status, 0) != pid) {
tests/sys/file/flock_helper.c
1339
int pid;
tests/sys/file/flock_helper.c
1348
pid = fork();
tests/sys/file/flock_helper.c
1349
if (pid < 0)
tests/sys/file/flock_helper.c
1352
if (pid == 0) {
tests/sys/file/flock_helper.c
1393
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
1394
safe_waitpid(pid);
tests/sys/file/flock_helper.c
1444
int pid;
tests/sys/file/flock_helper.c
1460
pid = fork();
tests/sys/file/flock_helper.c
1461
if (pid < 0)
tests/sys/file/flock_helper.c
1464
if (pid == 0) {
tests/sys/file/flock_helper.c
1503
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
1504
safe_waitpid(pid);
tests/sys/file/flock_helper.c
185
int pid;
tests/sys/file/flock_helper.c
199
pid = fork();
tests/sys/file/flock_helper.c
200
if (pid < 0)
tests/sys/file/flock_helper.c
203
if (pid == 0) {
tests/sys/file/flock_helper.c
230
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
231
safe_waitpid(pid);
tests/sys/file/flock_helper.c
256
int pid;
tests/sys/file/flock_helper.c
270
pid = fork();
tests/sys/file/flock_helper.c
271
if (pid < 0)
tests/sys/file/flock_helper.c
274
if (pid == 0) {
tests/sys/file/flock_helper.c
304
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
305
safe_waitpid(pid);
tests/sys/file/flock_helper.c
326
int pid;
tests/sys/file/flock_helper.c
339
pid = fork();
tests/sys/file/flock_helper.c
340
if (pid < 0)
tests/sys/file/flock_helper.c
343
if (pid == 0) {
tests/sys/file/flock_helper.c
375
FAIL(fl.l_pid != pid);
tests/sys/file/flock_helper.c
380
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
381
safe_waitpid(pid);
tests/sys/file/flock_helper.c
413
int pid;
tests/sys/file/flock_helper.c
427
pid = fork();
tests/sys/file/flock_helper.c
428
if (pid < 0)
tests/sys/file/flock_helper.c
431
if (pid == 0) {
tests/sys/file/flock_helper.c
461
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
462
safe_waitpid(pid);
tests/sys/file/flock_helper.c
600
int pid;
tests/sys/file/flock_helper.c
614
pid = fork();
tests/sys/file/flock_helper.c
615
if (pid < 0)
tests/sys/file/flock_helper.c
618
if (pid == 0) {
tests/sys/file/flock_helper.c
647
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
648
safe_waitpid(pid);
tests/sys/file/flock_helper.c
672
int pid;
tests/sys/file/flock_helper.c
686
pid = fork();
tests/sys/file/flock_helper.c
687
if (pid < 0)
tests/sys/file/flock_helper.c
690
if (pid == 0) {
tests/sys/file/flock_helper.c
720
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
721
safe_waitpid(pid);
tests/sys/file/flock_helper.c
749
int pid;
tests/sys/file/flock_helper.c
763
pid = fork();
tests/sys/file/flock_helper.c
764
if (pid < 0)
tests/sys/file/flock_helper.c
767
if (pid == 0) {
tests/sys/file/flock_helper.c
796
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
797
safe_waitpid(pid);
tests/sys/file/flock_helper.c
821
int pid;
tests/sys/file/flock_helper.c
838
pid = fork();
tests/sys/file/flock_helper.c
839
if (pid < 0)
tests/sys/file/flock_helper.c
842
if (pid == 0) {
tests/sys/file/flock_helper.c
868
kill(pid, SIGTERM);
tests/sys/file/flock_helper.c
869
safe_waitpid(pid);
tests/sys/file/flock_helper.c
873
FAIL(fl.l_pid != pid);
tests/sys/file/flock_helper.c
974
int pid;
tests/sys/file/flock_helper.c
988
pid = fork();
tests/sys/file/flock_helper.c
989
if (pid < 0)
tests/sys/file/flock_helper.c
992
if (pid == 0) {
tests/sys/file/newfileops_on_fork_test.c
73
int pid;
tests/sys/file/newfileops_on_fork_test.c
75
pid = fork();
tests/sys/file/newfileops_on_fork_test.c
76
if (pid < 0)
tests/sys/file/newfileops_on_fork_test.c
78
if (pid > 0) {
tests/sys/file/newfileops_on_fork_test.c
79
waitpid(pid, NULL, 0);
tests/sys/fs/fusefs/allow_other.cc
144
in.header.pid == (uint32_t)getpid() &&
tests/sys/fs/fusefs/allow_other.cc
159
in.header.pid != (uint32_t)getpid() &&
tests/sys/fs/fusefs/flush.cc
120
uint64_t pid = (uint64_t)getpid();
tests/sys/fs/fusefs/flush.cc
129
in.body.flush.lock_owner == pid &&
tests/sys/fs/fusefs/flush.cc
233
pid_t pid = getpid();
tests/sys/fs/fusefs/flush.cc
255
expect_flush(ino, 1, pid, ReturnErrno(0));
tests/sys/fs/fusefs/flush.cc
261
fl.l_pid = pid;
tests/sys/fs/fusefs/locks.cc
248
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
262
in.body.getlk.owner == (uint32_t)pid &&
tests/sys/fs/fusefs/locks.cc
263
in.body.getlk.lk.pid == (uint64_t)pid &&
tests/sys/fs/fusefs/locks.cc
308
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
323
in.body.getlk.owner == (uint32_t)pid &&
tests/sys/fs/fusefs/locks.cc
324
in.body.getlk.lk.pid == (uint64_t)pid &&
tests/sys/fs/fusefs/locks.cc
335
out.body.getlk.lk.pid = (uint32_t)pid2;;
tests/sys/fs/fusefs/locks.cc
366
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
380
in.body.getlk.owner == (uint32_t)pid &&
tests/sys/fs/fusefs/locks.cc
381
in.body.getlk.lk.pid == (uint64_t)pid &&
tests/sys/fs/fusefs/locks.cc
392
out.body.getlk.lk.pid = (uint32_t)pid + 1;
tests/sys/fs/fusefs/locks.cc
412
EXPECT_EQ(fl.l_pid, pid + 1);
tests/sys/fs/fusefs/locks.cc
431
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
445
in.body.getlk.owner == (uint32_t)pid &&
tests/sys/fs/fusefs/locks.cc
446
in.body.getlk.lk.pid == (uint64_t)pid &&
tests/sys/fs/fusefs/locks.cc
457
out.body.getlk.lk.pid = (uint32_t)pid + 1;
tests/sys/fs/fusefs/locks.cc
477
EXPECT_EQ(fl.l_pid, pid + 1);
tests/sys/fs/fusefs/locks.cc
521
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
525
expect_setlk(ino, pid, 10, 1009, F_UNLCK, 0);
tests/sys/fs/fusefs/locks.cc
547
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
551
expect_setlk(ino, pid, 10, 1009, F_RDLCK, 0);
tests/sys/fs/fusefs/locks.cc
573
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
577
expect_setlk(ino, pid, 10, OFFSET_MAX, F_RDLCK, 0);
tests/sys/fs/fusefs/locks.cc
599
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
603
expect_setlk(ino, pid, 500, 509, F_RDLCK, 0);
tests/sys/fs/fusefs/locks.cc
628
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
632
expect_setlk(ino, pid, 1000, 1009, F_RDLCK, 0);
tests/sys/fs/fusefs/locks.cc
65
void expect_setlk(uint64_t ino, pid_t pid, uint64_t start, uint64_t end,
tests/sys/fs/fusefs/locks.cc
656
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
660
expect_setlk(ino, pid, 10, 1009, F_RDLCK, EAGAIN);
tests/sys/fs/fusefs/locks.cc
714
pid_t pid = getpid();
tests/sys/fs/fusefs/locks.cc
718
expect_setlkw(ino, pid, 10, 1009, F_RDLCK, 0);
tests/sys/fs/fusefs/locks.cc
73
in.body.setlk.owner == (uint32_t)pid &&
tests/sys/fs/fusefs/locks.cc
77
in.body.setlk.lk.pid == (uint64_t)pid);
tests/sys/fs/fusefs/locks.cc
82
void expect_setlkw(uint64_t ino, pid_t pid, uint64_t start, uint64_t end,
tests/sys/fs/fusefs/locks.cc
90
in.body.setlkw.owner == (uint32_t)pid &&
tests/sys/fs/fusefs/locks.cc
94
in.body.setlkw.lk.pid == (uint64_t)pid);
tests/sys/fs/fusefs/mockfs.cc
170
in.header.uid, in.header.gid, in.header.pid,
tests/sys/fs/fusefs/mockfs.cc
234
in.body.getlk.lk.pid);
tests/sys/fs/fusefs/mockfs.cc
354
in.body.setlk.lk.pid);
tests/sys/fs/fusefs/mockfs.cc
833
if (pid_ok((pid_t)in->header.pid)) {
tests/sys/fs/fusefs/mockfs.cc
843
in->header.pid);
tests/sys/fs/fusefs/mockfs.cc
902
bool MockFS::pid_ok(pid_t pid) {
tests/sys/fs/fusefs/mockfs.cc
903
if (pid == m_pid) {
tests/sys/fs/fusefs/mockfs.cc
905
} else if (pid == m_child_pid) {
tests/sys/fs/fusefs/mockfs.cc
911
ki = kinfo_getproc(pid);
tests/sys/fs/fusefs/mockfs.hh
328
bool pid_ok(pid_t pid);
tests/sys/fs/fusefs/open.cc
172
in.header.pid == (uint32_t)getpid() &&
tests/sys/fs/fusefs/open.cc
186
in.header.pid != (uint32_t)getpid() &&
tests/sys/fs/fusefs/release.cc
253
pid_t pid = getpid();
tests/sys/fs/fusefs/release.cc
276
expect_release(ino, static_cast<uint64_t>(pid), O_RDWR, 0);
tests/sys/fs/fusefs/release.cc
282
fl.l_pid = pid;
tests/sys/fs/fusefs/utils.cc
502
pid_ok = (pid_t)in.header.pid == getpid();
tests/sys/fs/fusefs/utils.cc
530
bool pid_ok = (pid_t)in.header.pid == getpid();
tests/sys/fs/fusefs/xattr.cc
52
pid_t pid = *(pid_t*)target;
tests/sys/fs/fusefs/xattr.cc
55
printf("Killing! pid %d\n", pid);
tests/sys/fs/fusefs/xattr.cc
56
kill(pid, SIGINT);
tests/sys/fs/tarfs/mktar.c
171
pid_t pid;
tests/sys/fs/tarfs/mktar.c
199
if ((pid = fork()) < 0)
tests/sys/fs/tarfs/mktar.c
201
if (pid == 0) {
tests/sys/fs/tarfs/mktar.c
211
if (waitpid(pid, &wstatus, 0) < 0)
tests/sys/fs/tarfs/mktar.c
217
if ((pid = fork()) < 0)
tests/sys/fs/tarfs/mktar.c
219
if (pid == 0) {
tests/sys/fs/tarfs/mktar.c
240
if (waitpid(pid, &wstatus, 0) < 0)
tests/sys/fs/tarfs/mktar.c
246
if ((pid = fork()) < 0)
tests/sys/fs/tarfs/mktar.c
248
if (pid == 0) {
tests/sys/fs/tarfs/mktar.c
265
if (waitpid(pid, &wstatus, 0) < 0)
tests/sys/kern/kill_zombie.c
37
pid_t child, pid;
tests/sys/kern/kill_zombie.c
53
pid = waitpid(child, &status, 0);
tests/sys/kern/kill_zombie.c
54
ATF_REQUIRE(pid == child);
tests/sys/kern/ktrace_test.c
174
pid_t pid;
tests/sys/kern/ktrace_test.c
181
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
182
if (pid == 0) {
tests/sys/kern/ktrace_test.c
191
CHILD_REQUIRE(write(STDIN_FILENO, &pid, sizeof(pid)) == -1);
tests/sys/kern/ktrace_test.c
196
cap_trace_child(pid, &violation, 1);
tests/sys/kern/ktrace_test.c
211
pid_t pid;
tests/sys/kern/ktrace_test.c
218
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
219
if (pid == 0) {
tests/sys/kern/ktrace_test.c
234
cap_trace_child(pid, &violation, 1);
tests/sys/kern/ktrace_test.c
249
pid_t pid;
tests/sys/kern/ktrace_test.c
256
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
257
if (pid == 0) {
tests/sys/kern/ktrace_test.c
272
cap_trace_child(pid, violation, 2);
tests/sys/kern/ktrace_test.c
294
pid_t pid;
tests/sys/kern/ktrace_test.c
301
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
302
if (pid == 0) {
tests/sys/kern/ktrace_test.c
314
cap_trace_child(pid, &violation, 1);
tests/sys/kern/ktrace_test.c
335
pid_t pid;
tests/sys/kern/ktrace_test.c
342
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
343
if (pid == 0) {
tests/sys/kern/ktrace_test.c
356
cap_trace_child(pid, &violation, 1);
tests/sys/kern/ktrace_test.c
374
pid_t pid;
tests/sys/kern/ktrace_test.c
388
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
389
if (pid == 0) {
tests/sys/kern/ktrace_test.c
403
cap_trace_child(pid, &violation, 1);
tests/sys/kern/ktrace_test.c
424
pid_t pid;
tests/sys/kern/ktrace_test.c
431
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
432
if (pid == 0) {
tests/sys/kern/ktrace_test.c
449
cap_trace_child(pid, violation, 2);
tests/sys/kern/ktrace_test.c
473
pid_t pid;
tests/sys/kern/ktrace_test.c
480
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
481
if (pid == 0) {
tests/sys/kern/ktrace_test.c
496
cap_trace_child(pid, &violation, 1);
tests/sys/kern/ktrace_test.c
508
pid_t pid;
tests/sys/kern/ktrace_test.c
515
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
516
if (pid == 0) {
tests/sys/kern/ktrace_test.c
527
cap_trace_child(pid, &violation, 1);
tests/sys/kern/ktrace_test.c
550
pid_t pid;
tests/sys/kern/ktrace_test.c
557
ATF_REQUIRE((pid = fork()) != -1);
tests/sys/kern/ktrace_test.c
558
if (pid == 0) {
tests/sys/kern/ktrace_test.c
567
fd = trace_child(pid, KTRFAC_SYSCALL, 1);
tests/sys/kern/ktrace_test.c
572
ATF_REQUIRE_EQ(header.ktr_pid, pid);
tests/sys/kern/ktrace_test.c
586
ATF_REQUIRE_EQ(header.ktr_pid, pid);
tests/sys/kern/pdrfork.c
161
pid_t pid;
tests/sys/kern/pdrfork.c
170
pid = pdrfork_thread(&pd, 0, RFSPAWN, stack, rfspawn_fn, NULL);
tests/sys/kern/pdrfork.c
171
basic_usage_tail(pd, pid);
tests/sys/kern/pdrfork.c
40
basic_usage_tail(int pd, pid_t pid)
tests/sys/kern/pdrfork.c
48
ATF_CHECK_EQ(pd_pid, pid);
tests/sys/kern/pdrfork.c
51
waited_pid = waitpid(pid, &status, WEXITED);
tests/sys/kern/pdrfork.c
52
ATF_CHECK_EQ(waited_pid, pid);
tests/sys/kern/pdrfork.c
56
waited_pid = waitpid(pid, &status, WEXITED | WNOHANG);
tests/sys/kern/pdrfork.c
65
pid_t pid;
tests/sys/kern/pdrfork.c
67
pid = pdrfork(&pd, 0, rfflags);
tests/sys/kern/pdrfork.c
68
ATF_REQUIRE_MSG(pid >= 0, "rfork failed with %s", strerror(errno));
tests/sys/kern/pdrfork.c
69
if (pid == 0) {
tests/sys/kern/pdrfork.c
73
basic_usage_tail(pd, pid);
tests/sys/kern/pdrfork.c
81
pid_t pid, pd_pid, waited_pid;
tests/sys/kern/pdrfork.c
84
pid = pdrfork(&pd, 0, RFPROC | RFPROCDESC);
tests/sys/kern/pdrfork.c
85
ATF_REQUIRE_MSG(pid >= 0, "rfork failed with %s", strerror(errno));
tests/sys/kern/pdrfork.c
86
if (pid == 0) {
tests/sys/kern/pdrfork.c
97
waited_pid = waitpid(pid, &status, WEXITED);
tests/sys/kern/pdrfork.c
98
ATF_CHECK_EQ(waited_pid, pid);
tests/sys/kern/pdwait.c
114
pid_t pid;
tests/sys/kern/pdwait.c
116
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
117
if (pid == 0)
tests/sys/kern/pdwait.c
119
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
133
pid_t pid;
tests/sys/kern/pdwait.c
135
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
136
if (pid == 0)
tests/sys/kern/pdwait.c
138
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
153
pid_t pid;
tests/sys/kern/pdwait.c
155
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
156
if (pid == 0)
tests/sys/kern/pdwait.c
158
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
173
pid_t pid;
tests/sys/kern/pdwait.c
175
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
176
if (pid == 0)
tests/sys/kern/pdwait.c
178
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
195
pid_t pid;
tests/sys/kern/pdwait.c
202
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
203
if (pid == 0)
tests/sys/kern/pdwait.c
205
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
226
pid_t pid;
tests/sys/kern/pdwait.c
229
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
230
if (pid == 0)
tests/sys/kern/pdwait.c
232
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
252
pid_t pid, waited_pid;
tests/sys/kern/pdwait.c
255
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
256
if (pid == 0)
tests/sys/kern/pdwait.c
258
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
261
waited_pid = waitpid(pid, &status, WEXITED);
tests/sys/kern/pdwait.c
263
ATF_CHECK_EQ(pid, waited_pid);
tests/sys/kern/pdwait.c
276
pid_t pid;
tests/sys/kern/pdwait.c
279
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
280
if (pid == 0)
tests/sys/kern/pdwait.c
282
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
56
pid_t pid;
tests/sys/kern/pdwait.c
63
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
64
if (pid == 0)
tests/sys/kern/pdwait.c
66
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/pdwait.c
74
ATF_CHECK_EQ(si.si_pid, pid);
tests/sys/kern/pdwait.c
85
pid_t pid;
tests/sys/kern/pdwait.c
88
pid = pdfork(&fdp, 0);
tests/sys/kern/pdwait.c
89
if (pid == 0)
tests/sys/kern/pdwait.c
91
ATF_REQUIRE_MSG(pid >= 0, "pdfork failed: %s", strerror(errno));
tests/sys/kern/prace.c
108
if (kill(pid, SIGINT) != 0) {
tests/sys/kern/prace.c
117
(void)kill(pid, SIGKILL);
tests/sys/kern/prace.c
118
if (waitpid(pid, &status, 0) < 0)
tests/sys/kern/prace.c
87
pid_t pid;
tests/sys/kern/prace.c
92
if ((pid = fork()) < 0)
tests/sys/kern/prace.c
94
if (pid == 0) {
tests/sys/kern/procdesc.c
80
pid_t pid;
tests/sys/kern/procdesc.c
82
pid = vfork();
tests/sys/kern/procdesc.c
83
ATF_REQUIRE_MSG(pid >= 0, "vfork: %s", strerror(errno));
tests/sys/kern/procdesc.c
84
if (pid == 0)
tests/sys/kern/procdesc.c
86
ATF_REQUIRE_MSG(pid != dangle_pid,
tests/sys/kern/procdesc.c
88
ATF_REQUIRE_EQ(pid, waitpid(pid, NULL, WEXITED));
tests/sys/kern/ptrace_test.c
133
attach_child(pid_t pid)
tests/sys/kern/ptrace_test.c
138
REQUIRE_EQ(ptrace(PT_ATTACH, pid, NULL, 0), 0);
tests/sys/kern/ptrace_test.c
140
wpid = waitpid(pid, &status, 0);
tests/sys/kern/ptrace_test.c
141
REQUIRE_EQ(wpid, pid);
tests/sys/kern/ptrace_test.c
147
wait_for_zombie(pid_t pid)
tests/sys/kern/ptrace_test.c
166
mib[3] = pid;
tests/sys/kern/reaper.c
102
pid = waitpid(-1, NULL, WNOHANG);
tests/sys/kern/reaper.c
103
ATF_REQUIRE(pid == -1 && errno == ECHILD);
tests/sys/kern/reaper.c
125
pid = waitpid(child, &status, 0);
tests/sys/kern/reaper.c
126
ATF_REQUIRE_EQ(child, pid);
tests/sys/kern/reaper.c
130
pid = waitpid(-1, &status, 0);
tests/sys/kern/reaper.c
131
ATF_REQUIRE(pid > 0 && pid != child);
tests/sys/kern/reaper.c
146
pid_t parent, child, grandchild, pid;
tests/sys/kern/reaper.c
151
pid = waitpid(-1, NULL, WNOHANG);
tests/sys/kern/reaper.c
152
ATF_REQUIRE(pid == -1 && errno == ECHILD);
tests/sys/kern/reaper.c
200
pid = waitpid(child, NULL, 0);
tests/sys/kern/reaper.c
201
ATF_REQUIRE_EQ(child, pid);
tests/sys/kern/reaper.c
216
pid = waitpid(-1, NULL, 0);
tests/sys/kern/reaper.c
217
ATF_REQUIRE_EQ(grandchild, pid);
tests/sys/kern/reaper.c
233
pid_t parent, child, grandchild, pid;
tests/sys/kern/reaper.c
237
pid = waitpid(-1, NULL, WNOHANG);
tests/sys/kern/reaper.c
238
ATF_REQUIRE(pid == -1 && errno == ECHILD);
tests/sys/kern/reaper.c
274
pid = waitpid(child, NULL, 0);
tests/sys/kern/reaper.c
275
ATF_REQUIRE_EQ(child, pid);
tests/sys/kern/reaper.c
287
pid = waitpid(-1, NULL, 0);
tests/sys/kern/reaper.c
288
ATF_REQUIRE_EQ(grandchild, pid);
tests/sys/kern/reaper.c
296
pid_t parent, child, pid;
tests/sys/kern/reaper.c
361
pid = waitpid(child, &status, 0);
tests/sys/kern/reaper.c
362
ATF_REQUIRE_EQ(child, pid);
tests/sys/kern/reaper.c
380
pid_t parent, child, grandchild, pid;
tests/sys/kern/reaper.c
45
pid_t parent, child, grandchild, pid;
tests/sys/kern/reaper.c
473
pid = waitpid(child, &status, 0);
tests/sys/kern/reaper.c
474
ATF_REQUIRE_EQ(child, pid);
tests/sys/kern/reaper.c
50
pid = waitpid(-1, NULL, WNOHANG);
tests/sys/kern/reaper.c
51
ATF_REQUIRE(pid == -1 && errno == ECHILD);
tests/sys/kern/reaper.c
510
pid = waitpid(grandchild, &status, 0);
tests/sys/kern/reaper.c
511
ATF_REQUIRE_EQ(grandchild, pid);
tests/sys/kern/reaper.c
587
pid_t parent, child, grandchild, pid;
tests/sys/kern/reaper.c
627
pid = waitpid(child, &status, 0);
tests/sys/kern/reaper.c
628
ATF_REQUIRE_EQ(child, pid);
tests/sys/kern/reaper.c
631
pid = waitpid(-1, &status, 0);
tests/sys/kern/reaper.c
632
ATF_REQUIRE(pid > 0);
tests/sys/kern/reaper.c
633
ATF_CHECK(pid != parent);
tests/sys/kern/reaper.c
634
ATF_CHECK(pid != child);
tests/sys/kern/reaper.c
646
pid_t parent, child1, child2, grandchild1, grandchild2, pid;
tests/sys/kern/reaper.c
707
pid = waitpid(child1, &status, 0);
tests/sys/kern/reaper.c
708
ATF_REQUIRE_EQ(child1, pid);
tests/sys/kern/reaper.c
711
pid = waitpid(-1, &status, 0);
tests/sys/kern/reaper.c
712
ATF_REQUIRE(pid > 0);
tests/sys/kern/reaper.c
713
ATF_CHECK(pid != parent);
tests/sys/kern/reaper.c
714
ATF_CHECK(pid != child1);
tests/sys/kern/reaper.c
715
ATF_CHECK(pid != child2);
tests/sys/kern/reaper.c
727
pid = waitpid(child2, &status, 0);
tests/sys/kern/reaper.c
728
ATF_REQUIRE_EQ(child2, pid);
tests/sys/kern/reaper.c
731
pid = waitpid(-1, &status, 0);
tests/sys/kern/reaper.c
732
ATF_REQUIRE(pid > 0);
tests/sys/kern/reaper.c
733
ATF_CHECK(pid != parent);
tests/sys/kern/reaper.c
734
ATF_CHECK(pid != child1);
tests/sys/kern/reaper.c
735
ATF_CHECK(pid != child2);
tests/sys/kern/reaper.c
746
pid_t child, grandchild, parent, pid;
tests/sys/kern/reaper.c
763
pid = waitpid(child, &status, 0);
tests/sys/kern/reaper.c
764
ATF_REQUIRE_EQ(pid, child);
tests/sys/kern/reaper.c
78
pid = waitpid(child, &status, 0);
tests/sys/kern/reaper.c
79
ATF_REQUIRE_EQ(child, pid);
tests/sys/kern/reaper.c
86
pid = waitpid(-1, &status, 0);
tests/sys/kern/reaper.c
87
ATF_REQUIRE(pid > 0 && pid != child);
tests/sys/kern/reaper.c
98
pid_t parent, child, grandchild, pid;
tests/sys/kern/sigwait.c
101
pid = getpid();
tests/sys/kern/sigwait.c
102
ATF_REQUIRE(pid > 0);
tests/sys/kern/sigwait.c
109
if (kill(pid, sig) == -1)
tests/sys/kern/sigwait.c
292
int rv, sig, pid;
tests/sys/kern/sigwait.c
296
pid = support_create_sig_proc(SIGUSR1, 1, 400000);
tests/sys/kern/sigwait.c
306
ATF_REQUIRE(waitid(P_PID, pid, NULL, WEXITED) == 0);
tests/sys/kern/sigwait.c
344
pid_t pid;
tests/sys/kern/sigwait.c
358
pid = support_create_sig_proc(SIGUSR2, 1, 100000);
tests/sys/kern/sigwait.c
372
ATF_REQUIRE(waitid(P_PID, pid, NULL, WEXITED) == 0);
tests/sys/kern/sigwait.c
376
support_check_siginfo(int code, int status, pid_t pid,
tests/sys/kern/sigwait.c
386
ATF_REQUIRE_EQ_MSG(pid, si->si_pid,
tests/sys/kern/sigwait.c
387
"check_siginfo: si_pid %d != pid %d", si->si_pid, pid);
tests/sys/kern/sigwait.c
391
support_check_sigchld(sigset_t *set, int code, int status, pid_t pid,
tests/sys/kern/sigwait.c
410
support_check_siginfo(code, status, pid, &si, SIGCHLD);
tests/sys/kern/sigwait.c
433
pid_t pid;
tests/sys/kern/sigwait.c
451
pid = fork();
tests/sys/kern/sigwait.c
452
ATF_REQUIRE(pid >= 0);
tests/sys/kern/sigwait.c
453
if (pid == 0) {
tests/sys/kern/sigwait.c
459
ATF_REQUIRE(waitid(P_PID, pid, &si, WSTOPPED) == 0);
tests/sys/kern/sigwait.c
461
support_check_siginfo(CLD_STOPPED, SIGSTOP, pid, &si, SIGCHLD);
tests/sys/kern/sigwait.c
462
support_check_sigchld(&set, CLD_STOPPED, SIGSTOP, pid, dequeue);
tests/sys/kern/sigwait.c
464
ATF_REQUIRE(kill(pid, SIGCONT) == 0);
tests/sys/kern/sigwait.c
467
ATF_REQUIRE(waitid(P_PID, pid, &si, WCONTINUED) == 0);
tests/sys/kern/sigwait.c
469
support_check_siginfo(CLD_CONTINUED, SIGCONT, pid, &si, SIGCHLD);
tests/sys/kern/sigwait.c
470
support_check_sigchld(&set, CLD_CONTINUED, SIGCONT, pid, dequeue);
tests/sys/kern/sigwait.c
472
ATF_REQUIRE(kill(pid, SIGKILL) == 0);
tests/sys/kern/sigwait.c
475
ATF_REQUIRE(waitid(P_PID, pid, &si, WEXITED) == 0);
tests/sys/kern/sigwait.c
477
support_check_siginfo(CLD_KILLED, SIGKILL, pid, &si, SIGCHLD);
tests/sys/kern/sigwait.c
99
pid_t pid, cpid;
tests/sys/kern/tty/test_sti.c
105
return (pid);
tests/sys/kern/tty/test_sti.c
109
finalize_child(pid_t pid, int signo)
tests/sys/kern/tty/test_sti.c
113
while ((wpid = waitpid(pid, &status, 0)) != pid) {
tests/sys/kern/tty/test_sti.c
156
int pid, term;
tests/sys/kern/tty/test_sti.c
164
pid = init_pty(&term, false);
tests/sys/kern/tty/test_sti.c
165
if (pid == 0) {
tests/sys/kern/tty/test_sti.c
184
finalize_child(pid, -1);
tests/sys/kern/tty/test_sti.c
198
int pid, term;
tests/sys/kern/tty/test_sti.c
205
pid = init_pty(&term, true);
tests/sys/kern/tty/test_sti.c
206
if (pid == 0) {
tests/sys/kern/tty/test_sti.c
229
finalize_child(pid, -1);
tests/sys/kern/tty/test_sti.c
243
int pid, serrno, term;
tests/sys/kern/tty/test_sti.c
245
pid = init_pty(&term, false);
tests/sys/kern/tty/test_sti.c
246
if (pid == 0) {
tests/sys/kern/tty/test_sti.c
265
kill(pid, SIGINT);
tests/sys/kern/tty/test_sti.c
266
finalize_child(pid, SIGINT);
tests/sys/kern/tty/test_sti.c
282
int pid, term;
tests/sys/kern/tty/test_sti.c
288
pid = init_pty(&term, true);
tests/sys/kern/tty/test_sti.c
289
if (pid == 0) {
tests/sys/kern/tty/test_sti.c
326
finalize_child(pid, -1);
tests/sys/kern/tty/test_sti.c
84
int pid;
tests/sys/kern/tty/test_sti.c
86
pid = forkpty(termfd, NULL, NULL, NULL);
tests/sys/kern/tty/test_sti.c
87
ATF_REQUIRE(pid != -1);
tests/sys/kern/tty/test_sti.c
89
if (pid == 0) {
tests/sys/kern/waitpid_nohang.c
37
pid_t child, pid;
tests/sys/kern/waitpid_nohang.c
48
pid = waitpid(child, &status, WNOHANG);
tests/sys/kern/waitpid_nohang.c
49
ATF_REQUIRE(pid == 0);
tests/sys/kern/waitpid_nohang.c
58
pid = waitpid(child, &status, WNOHANG);
tests/sys/kern/waitpid_nohang.c
59
ATF_REQUIRE(pid == child);
tests/sys/kqueue/kqueue_fork.c
142
pid_t pid;
tests/sys/kqueue/kqueue_fork.c
188
pid = pdfork(&pdfd, 0);
tests/sys/kqueue/kqueue_fork.c
189
ATF_REQUIRE(pid != -1);
tests/sys/kqueue/kqueue_fork.c
190
if (pid == 0) {
tests/sys/kqueue/kqueue_fork.c
217
error = waitpid(pid, &status, 0);
tests/sys/kqueue/kqueue_fork.c
49
pid_t pid;
tests/sys/kqueue/kqueue_fork.c
58
pid = rfork(RFPROC);
tests/sys/kqueue/kqueue_fork.c
59
ATF_REQUIRE(pid != -1);
tests/sys/kqueue/kqueue_fork.c
60
if (pid == 0) {
tests/sys/kqueue/kqueue_fork.c
79
error = kill(pid, SIGINT);
tests/sys/kqueue/kqueue_fork.c
82
error = waitpid(pid, &status, 0);
tests/sys/kqueue/libkqueue/proc.c
128
} else if (pid == -1) { /* Error */
tests/sys/kqueue/libkqueue/proc.c
133
printf(" -- child created (pid %d)\n", (int) pid);
tests/sys/kqueue/libkqueue/proc.c
135
kevent_add(kqfd, &kev, pid, EVFILT_PROC, EV_ADD | EV_ENABLE,
tests/sys/kqueue/libkqueue/proc.c
139
printf(" -- tracking child (pid %d)\n", (int) pid);
tests/sys/kqueue/libkqueue/proc.c
192
if (kevp->data == pid) {
tests/sys/kqueue/libkqueue/proc.c
204
if ((kevp->ident == (uintptr_t)pid) && (!child_exit)) {
tests/sys/kqueue/libkqueue/proc.c
216
if ((kevp->ident == (uintptr_t)pid) && (!child_fork)) {
tests/sys/kqueue/libkqueue/proc.c
248
pid_t pid;
tests/sys/kqueue/libkqueue/proc.c
253
pid = fork();
tests/sys/kqueue/libkqueue/proc.c
254
if (pid == 0) {
tests/sys/kqueue/libkqueue/proc.c
259
printf(" -- child created (pid %d)\n", (int) pid);
tests/sys/kqueue/libkqueue/proc.c
262
kevent_add(kqfd, &kev, pid, EVFILT_PROC, EV_ADD, 0, 0, NULL);
tests/sys/kqueue/libkqueue/proc.c
265
printf(" -- killing process %d\n", (int) pid);
tests/sys/kqueue/libkqueue/proc.c
266
if (kill(pid, SIGUSR1) < 0)
tests/sys/kqueue/libkqueue/proc.c
37
pid_t pid;
tests/sys/kqueue/libkqueue/proc.c
40
pid = fork();
tests/sys/kqueue/libkqueue/proc.c
41
if (pid == 0) {
tests/sys/kqueue/libkqueue/proc.c
50
printf(" -- child created (pid %d)\n", (int) pid);
tests/sys/kqueue/libkqueue/proc.c
55
kevent_add(kqfd, &kev, pid, EVFILT_PROC, EV_ADD, 0, 0, NULL);
tests/sys/kqueue/libkqueue/proc.c
64
kevent_add(kqfd, &kev, pid, EVFILT_PROC, EV_DELETE, 0, 0, NULL);
tests/sys/kqueue/libkqueue/proc.c
65
if (kill(pid, SIGKILL) < 0)
tests/sys/kqueue/libkqueue/proc.c
79
pid_t pid;
tests/sys/kqueue/libkqueue/proc.c
94
pid = fork();
tests/sys/kqueue/libkqueue/proc.c
95
if (pid == 0) { /* Child */
tests/sys/kqueue/libkqueue/vnode.c
72
pid_t pid;
tests/sys/kqueue/libkqueue/vnode.c
79
pid = fork();
tests/sys/kqueue/libkqueue/vnode.c
80
if (pid == -1)
tests/sys/kqueue/libkqueue/vnode.c
83
if (pid == 0) {
tests/sys/kqueue/libkqueue/vnode.c
97
if (waitpid(pid, NULL, WNOHANG) == pid) {
tests/sys/mqueue/mqtest2.c
29
pid_t pid;
tests/sys/mqueue/mqtest2.c
41
pid = fork();
tests/sys/mqueue/mqtest2.c
42
if (pid == 0) { /* child */
tests/sys/mqueue/mqtest2.c
71
} else if (pid == -1) {
tests/sys/mqueue/mqtest3.c
100
kill(pid, SIGKILL);
tests/sys/mqueue/mqtest3.c
31
pid_t pid;
tests/sys/mqueue/mqtest3.c
44
pid = fork();
tests/sys/mqueue/mqtest3.c
45
if (pid == 0) { /* child */
tests/sys/mqueue/mqtest3.c
79
} else if (pid == -1) {
tests/sys/mqueue/mqtest4.c
32
pid_t pid;
tests/sys/mqueue/mqtest4.c
44
pid = fork();
tests/sys/mqueue/mqtest4.c
45
if (pid == 0) { /* child */
tests/sys/mqueue/mqtest4.c
79
} else if (pid == -1) {
tests/sys/mqueue/mqtest5.c
110
kill(pid, SIGKILL);
tests/sys/mqueue/mqtest5.c
34
pid_t pid;
tests/sys/mqueue/mqtest5.c
54
pid = fork();
tests/sys/mqueue/mqtest5.c
55
if (pid == 0) { /* child */
tests/sys/mqueue/mqtest5.c
95
} else if (pid == -1) {
tests/sys/netlink/netlink_socket.c
177
static pid_t pid = 0;
tests/sys/netlink/netlink_socket.c
186
if (pid == 0)
tests/sys/netlink/netlink_socket.c
187
pid = getpid();
tests/sys/netlink/netlink_socket.c
188
ATF_REQUIRE(nlc[0].val == pid);
tests/sys/posixshm/posixshm_test.c
746
pid_t pid;
tests/sys/posixshm/posixshm_test.c
815
pid = fork();
tests/sys/posixshm/posixshm_test.c
816
if (pid == -1)
tests/sys/posixshm/posixshm_test.c
819
if (pid == 0) {
tests/sys/vm/mlock_test.c
49
pid_t pid;
tests/sys/vm/mlock_test.c
51
pid = fork();
tests/sys/vm/mlock_test.c
52
if (pid == -1)
tests/sys/vm/mlock_test.c
54
if (pid == 0) {
tests/sys/vm/mlock_test.c
66
ATF_REQUIRE(waitpid(pid, &status, 0) == pid);
tests/sys/vm/mlock_test.c
73
val = ptrace(PT_READ_D, pid, addr, 0);
tests/sys/vm/mlock_test.c
75
ATF_REQUIRE(ptrace(PT_WRITE_D, pid, addr, val) == 0);
tests/sys/vm/mlock_test.c
76
ATF_REQUIRE(ptrace(PT_CONTINUE, pid, (caddr_t)1, 0) == 0);
tests/sys/vm/mlock_test.c
77
ATF_REQUIRE(waitpid(pid, &status, 0) == pid);
tests/sys/vm/shared_shadow_inval_test.c
131
pid_t pid = fork();
tests/sys/vm/shared_shadow_inval_test.c
132
if (pid == -1)
tests/sys/vm/shared_shadow_inval_test.c
134
else if (pid == 0)
tests/sys/vm/shared_shadow_inval_test.c
136
return pid;
tests/sys/vm/shared_shadow_inval_test.c
188
pid_t mypid, oldval, pid;
tests/sys/vm/shared_shadow_inval_test.c
255
pid = child_fork(ss, depth + 1);
tests/sys/vm/shared_shadow_inval_test.c
269
child_verify(ss, depth, pid, oldval);
tests/sys/vm/shared_shadow_inval_test.c
317
pid_t pid;
tests/sys/vm/shared_shadow_inval_test.c
320
pid = getpid();
tests/sys/vm/shared_shadow_inval_test.c
323
pid, __func__, (int)collapse, (int)block_xfer, (int)full_mod);
tests/sys/vm/shared_shadow_inval_test.c
325
ATF_REQUIRE(procctl(P_PID, pid, PROC_REAP_ACQUIRE, NULL) == 0);
tests/sys/vm/shared_shadow_inval_test.c
339
pid = fork();
tests/sys/vm/shared_shadow_inval_test.c
340
ATF_REQUIRE(pid != -1);
tests/sys/vm/shared_shadow_inval_test.c
341
if (pid == 0)
tests/sys/vm/shared_shadow_inval_test.c
346
pid = wait(&status);
tests/sys/vm/shared_shadow_inval_test.c
348
} while (pid != -1 || errno != ECHILD);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
410
pid_t pid;
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
428
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
429
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
434
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
441
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
442
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
449
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
455
CHECK((pid = pdfork(&pfd, 0)) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
456
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
471
CHECK((pid = pdfork(&pfd, 0)) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
472
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
488
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
489
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
493
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
500
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
501
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
507
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
513
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
514
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
522
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
528
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
529
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
537
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/capsicum/syscalls/cap_getmode.c
123
pid = fork();
tools/regression/capsicum/syscalls/cap_getmode.c
124
switch (pid) {
tools/regression/capsicum/syscalls/cap_getmode.c
144
pid = pdfork(&pfd, 0);
tools/regression/capsicum/syscalls/cap_getmode.c
145
switch (pid) {
tools/regression/capsicum/syscalls/cap_getmode.c
46
pid_t pid;
tools/regression/capsicum/syscalls/cap_getmode.c
67
pid = fork();
tools/regression/capsicum/syscalls/cap_getmode.c
68
switch (pid) {
tools/regression/capsicum/syscalls/cap_getmode.c
80
if (waitpid(pid, NULL, 0) == -1)
tools/regression/capsicum/syscalls/cap_getmode.c
85
pid = pdfork(&pfd, 0);
tools/regression/capsicum/syscalls/cap_getmode.c
86
switch (pid) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
316
pid_t pid;
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
334
pid = fork();
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
335
switch (pid) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
343
if (waitpid(pid, NULL, 0) == -1)
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
351
pid = fork();
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
352
switch (pid) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
362
if (waitpid(pid, NULL, 0) == -1)
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
369
pid = pdfork(&pfd, 0);
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
370
switch (pid) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
386
pid = pdfork(&pfd, 0);
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
387
switch (pid) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
404
pid = fork();
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
405
switch (pid) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
412
if (waitpid(pid, NULL, 0) == -1)
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
420
pid = fork();
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
421
switch (pid) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
430
if (waitpid(pid, NULL, 0) == -1)
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
437
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
438
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
446
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
452
CHECK((pid = fork()) >= 0);
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
453
if (pid == 0) {
tools/regression/capsicum/syscalls/cap_ioctls_limit.c
461
CHECK(waitpid(pid, NULL, 0) == pid);
tools/regression/p1003_1b/fifo.c
125
pid = getpid();
tools/regression/p1003_1b/fifo.c
133
pid = getpid();
tools/regression/p1003_1b/fifo.c
135
*p = pid;
tools/regression/p1003_1b/fifo.c
140
*p = pid;
tools/regression/p1003_1b/fifo.c
86
volatile long *p, pid;
tools/regression/posixsem/posixsem.c
104
if (waitpid(pid, NULL, 0) < 0) {
tools/regression/posixsem/posixsem.c
1123
pid_t pid;
tools/regression/posixsem/posixsem.c
1139
pid = fork();
tools/regression/posixsem/posixsem.c
1140
switch (pid) {
tools/regression/posixsem/posixsem.c
1158
kp = kvm_getprocs(kd, KERN_PROC_PID, pid, &count);
tools/regression/posixsem/posixsem.c
1177
waitpid(pid, NULL, 0);
tools/regression/posixsem/posixsem.c
75
pid_t pid;
tools/regression/posixsem/posixsem.c
83
pid = fork();
tools/regression/posixsem/posixsem.c
84
switch (pid) {
tools/regression/posixsem2/semtest.c
23
pid_t pid;
tools/regression/posixsem2/semtest.c
33
if ((pid = fork()) == 0) {
tools/regression/posixsem2/semtest.c
44
waitpid(pid, &status, 0);
tools/regression/posixsem2/semtest.c
57
pid_t pid;
tools/regression/posixsem2/semtest.c
73
if ((pid = fork()) == 0) {
tools/regression/posixsem2/semtest.c
84
waitpid(pid, &status, 0);
tools/regression/priv/main.c
481
pid_t childpid, pid;
tools/regression/priv/main.c
506
pid = waitpid(childpid, &status, 0);
tools/regression/priv/main.c
507
if (pid == -1) {
tools/regression/priv/main.c
511
if (pid == childpid) {
tools/regression/priv/priv_sched_rtprio.c
312
pid_t pid;
tools/regression/priv/priv_sched_rtprio.c
317
pid = waitpid(childproc, NULL, 0);
tools/regression/priv/priv_sched_rtprio.c
318
if (pid == -1)
tools/regression/priv/priv_sched_rtprio.c
321
if (pid == childproc)
tools/regression/priv/priv_sched_setpriority.c
156
pid_t pid;
tools/regression/priv/priv_sched_setpriority.c
161
pid = waitpid(childproc, NULL, 0);
tools/regression/priv/priv_sched_setpriority.c
162
if (pid == -1)
tools/regression/priv/priv_sched_setpriority.c
165
if (pid == childproc)
tools/regression/security/cap_test/cap_test.c
100
if (pid) {
tools/regression/security/cap_test/cap_test.c
103
while (waitpid(pid, &status, 0) != pid) {}
tools/regression/security/cap_test/cap_test.c
97
pid_t pid = fork();
tools/regression/security/cap_test/cap_test.c
98
if (pid < 0)
tools/regression/security/cap_test/cap_test_capmode.c
151
pid = fork();
tools/regression/security/cap_test/cap_test_capmode.c
152
if (pid >= 0) {
tools/regression/security/cap_test/cap_test_capmode.c
153
if (pid == 0) {
tools/regression/security/cap_test/cap_test_capmode.c
155
} else if (pid > 0) {
tools/regression/security/cap_test/cap_test_capmode.c
156
wpid = waitpid(pid, NULL, 0);
tools/regression/security/cap_test/cap_test_capmode.c
68
pid_t pid, wpid;
tools/regression/security/cap_test/cap_test_pdfork.c
101
while (waitpid(pid, &status, 0) != pid) {}
tools/regression/security/cap_test/cap_test_pdfork.c
59
pid_t pid;
tools/regression/security/cap_test/cap_test_pdfork.c
64
pid = pdfork(&pd, 0);
tools/regression/security/cap_test/cap_test_pdfork.c
65
if (pid < 0)
tools/regression/security/cap_test/cap_test_pdfork.c
68
else if (pid == 0) {
tools/regression/security/cap_test/cap_test_pdfork.c
74
error = pdgetpid(pd, &pid);
tools/regression/security/cap_test/cap_test_pdfork.c
96
error = pdgetpid(pd, &pid);
tools/regression/security/cap_test/cap_test_pdfork.c
98
CHECK(pid > 0);
tools/regression/security/cap_test/cap_test_pdkill.c
62
pid_t pid;
tools/regression/security/cap_test/cap_test_pdkill.c
77
error = pdgetpid(pd, &pid);
tools/regression/security/cap_test/cap_test_pdkill.c
89
while (waitpid(pid, &status, 0) != pid) {}
tools/regression/sigqueue/sigqtest2/sigqtest2.c
42
pid_t pid;
tools/regression/sigqueue/sigqtest2/sigqtest2.c
53
pid = fork();
tools/regression/sigqueue/sigqtest2/sigqtest2.c
54
if (pid == 0) {
tools/regression/sockets/listen_kqueue/listen_kqueue.c
52
int kq, sock, opt, pid, nev, fd;
tools/regression/sockets/listen_kqueue/listen_kqueue.c
88
pid = fork();
tools/regression/sockets/listen_kqueue/listen_kqueue.c
89
if (pid == -1)
tools/regression/sockets/listen_kqueue/listen_kqueue.c
91
if (pid == 0) {
tools/regression/sockets/pr_atomic/pr_atomic.c
56
pid_t pid;
tools/regression/sockets/pr_atomic/pr_atomic.c
70
pid = fork();
tools/regression/sockets/pr_atomic/pr_atomic.c
71
if (pid == -1)
tools/regression/sockets/pr_atomic/pr_atomic.c
73
if (pid == 0) {
tools/regression/sockets/sendfile/sendfile.c
379
int pid;
tools/regression/sockets/sendfile/sendfile.c
412
pid = fork();
tools/regression/sockets/sendfile/sendfile.c
413
if (pid == -1) {
tools/regression/sockets/sendfile/sendfile.c
418
if (pid == 0)
tools/regression/sockets/sendfile/sendfile.c
425
kill(pid, SIGALRM);
tools/regression/sockets/sendfile/sendfile.c
432
kill(pid, SIGALRM);
tools/regression/sockets/sendfile/sendfile.c
438
if (waitpid(pid, &status, 0) == pid) {
tools/regression/sockets/udp_pingpong/udp_pingpong.c
521
pid_t pid, cpid;
tools/regression/sockets/udp_pingpong/udp_pingpong.c
551
pid = waitpid(cpid, &status, 0);
tools/regression/sockets/udp_pingpong/udp_pingpong.c
552
if (pid == (pid_t)-1) {
tools/regression/sockets/unix_close_race/unix_close_race.c
111
(void)kill(pid, SIGTERM);
tools/regression/sockets/unix_close_race/unix_close_race.c
116
(void)kill(pid, SIGTERM);
tools/regression/sockets/unix_close_race/unix_close_race.c
120
(void)kill(pid, SIGTERM);
tools/regression/sockets/unix_close_race/unix_close_race.c
125
(void)kill(pid, SIGTERM);
tools/regression/sockets/unix_close_race/unix_close_race.c
64
int listenfd, connfd, pid;
tools/regression/sockets/unix_close_race/unix_close_race.c
96
pid = fork();
tools/regression/sockets/unix_close_race/unix_close_race.c
97
if (pid == -1)
tools/regression/sockets/unix_close_race/unix_close_race.c
99
if (pid != 0) {
tools/regression/sockets/unix_cmsg/uc_common.c
548
pid_t pid;
tools/regression/sockets/unix_cmsg/uc_common.c
558
pid = waitpid(uc_cfg.client_pid, &status, 0);
tools/regression/sockets/unix_cmsg/uc_common.c
559
if (pid == (pid_t)-1) {
tools/regression/sockets/unix_gc/unix_gc.c
757
pid_t pid;
tools/regression/sockets/unix_gc/unix_gc.c
766
pid = fork();
tools/regression/sockets/unix_gc/unix_gc.c
767
if (pid < 0) {
tools/regression/sockets/unix_gc/unix_gc.c
773
if (pid > 0) {
tools/regression/sockets/unix_gc/unix_gc.c
775
while (waitpid(pid, NULL, 0) != pid);
tools/test/gpioevents/gpioevents.c
440
int pid;
tools/test/gpioevents/gpioevents.c
451
pid = getpid();
tools/test/gpioevents/gpioevents.c
452
res = fcntl(handle, F_SETOWN, pid);
tools/test/pthread_vfork/pthread_vfork_test.c
44
pid_t pid, wpid;
tools/test/pthread_vfork/pthread_vfork_test.c
48
pid = vfork();
tools/test/pthread_vfork/pthread_vfork_test.c
49
if (pid == 0)
tools/test/pthread_vfork/pthread_vfork_test.c
51
else if (pid == -1)
tools/test/pthread_vfork/pthread_vfork_test.c
54
wpid = waitpid(pid, &status, 0);
tools/test/ptrace/scescx.c
150
get_pathname(pid_t pid)
tools/test/ptrace/scescx.c
159
name[3] = pid;
tools/test/ptrace/scescx.c
166
pid, strerror(errno));
tools/test/ptrace/scescx.c
169
fprintf(stderr, "pid %d exited\n", pid);
tools/test/ptrace/scescx.c
173
fprintf(stderr, "No cached pathname for process %d\n", pid);
tools/test/ptrace/scescx.c
176
printf(TRACE "pid %d path %s\n", pid, pathname);
tools/test/ptrace/scescx.c
180
wait_info(int pid, int status, struct ptrace_lwpinfo *lwpinfo)
tools/test/ptrace/scescx.c
185
printf(TRACE "pid %d wait %s", pid,
tools/test/ptrace/scescx.c
218
trace_sc(int pid)
tools/test/ptrace/scescx.c
224
if (ptrace(PT_TO_SCE, pid, (caddr_t)1, 0) < 0) {
tools/test/ptrace/scescx.c
226
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
230
if (waitpid(pid, &status, 0) == -1) {
tools/test/ptrace/scescx.c
235
wait_info(pid, status, NULL);
tools/test/ptrace/scescx.c
241
if (ptrace(PT_LWPINFO, pid, (caddr_t)&lwpinfo, sizeof(lwpinfo)) < 0) {
tools/test/ptrace/scescx.c
243
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
246
wait_info(pid, status, &lwpinfo);
tools/test/ptrace/scescx.c
249
if (ptrace(PT_TO_SCX, pid, (caddr_t)1, 0) < 0) {
tools/test/ptrace/scescx.c
251
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
255
if (waitpid(pid, &status, 0) == -1) {
tools/test/ptrace/scescx.c
260
wait_info(pid, status, NULL);
tools/test/ptrace/scescx.c
266
if (ptrace(PT_LWPINFO, pid, (caddr_t)&lwpinfo, sizeof(lwpinfo)) < 0) {
tools/test/ptrace/scescx.c
268
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
271
wait_info(pid, status, &lwpinfo);
tools/test/ptrace/scescx.c
278
if (ptrace(PT_SC_REMOTE, pid, (caddr_t)&pscr,
tools/test/ptrace/scescx.c
281
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
286
if (waitpid(pid, &status, 0) == -1) {
tools/test/ptrace/scescx.c
293
get_pathname(pid);
tools/test/ptrace/scescx.c
303
trace_cont(int pid)
tools/test/ptrace/scescx.c
308
if (ptrace(PT_CONTINUE, pid, (caddr_t)1, 0) < 0) {
tools/test/ptrace/scescx.c
310
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
314
if (waitpid(pid, &status, 0) == -1) {
tools/test/ptrace/scescx.c
319
wait_info(pid, status, NULL);
tools/test/ptrace/scescx.c
325
if (ptrace(PT_LWPINFO, pid, (caddr_t)&lwpinfo, sizeof(lwpinfo)) < 0) {
tools/test/ptrace/scescx.c
327
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
330
wait_info(pid, status, &lwpinfo);
tools/test/ptrace/scescx.c
334
get_pathname(pid);
tools/test/ptrace/scescx.c
346
trace(pid_t pid)
tools/test/ptrace/scescx.c
349
return (trace_syscalls ? trace_sc(pid) : trace_cont(pid));
tools/test/ptrace/scescx.c
358
pid_t pid, pid1;
tools/test/ptrace/scescx.c
385
if ((pid = fork()) < 0) {
tools/test/ptrace/scescx.c
389
else if (pid == 0) {
tools/test/ptrace/scescx.c
405
if (waitpid(pid, &status, 0) == -1) {
tools/test/ptrace/scescx.c
412
if (ptrace(PT_LWPINFO, pid, (caddr_t)&lwpinfo,
tools/test/ptrace/scescx.c
415
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
418
wait_info(pid, status, &lwpinfo);
tools/test/ptrace/scescx.c
420
if (ptrace(PT_FOLLOW_FORK, pid, 0, 1) < 0) {
tools/test/ptrace/scescx.c
422
ptrace(PT_KILL, pid, NULL, 0);
tools/test/ptrace/scescx.c
426
while ((pid1 = trace(pid)) >= 0) {
tools/test/ptrace/scescx.c
453
ptrace(PT_CONTINUE, pid, (caddr_t)1, 0);
tools/test/stress2/testcases/badcode/badcode.c
100
if ((pid = fork()) == 0) {
tools/test/stress2/testcases/badcode/badcode.c
124
} else if (pid > 0) {
tools/test/stress2/testcases/badcode/badcode.c
125
if (waitpid(pid, NULL, 0) == -1)
tools/test/stress2/testcases/badcode/badcode.c
126
warn("waitpid(%d)", pid);
tools/test/stress2/testcases/badcode/badcode.c
40
static pid_t pid;
tools/test/stress2/testcases/badcode/badcode.c
71
if (pid != 0) {
tools/test/stress2/testcases/badcode/badcode.c
72
kill(pid, SIGKILL);
tools/test/stress2/testcases/creat/creat.c
111
pid_t pid;
tools/test/stress2/testcases/creat/creat.c
114
pid = getpid();
tools/test/stress2/testcases/creat/creat.c
116
sprintf(file,"p%05d.%05d", pid, j);
tools/test/stress2/testcases/creat/creat.c
129
sprintf(file,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirnprename/dirnprename.c
122
pid_t pid;
tools/test/stress2/testcases/dirnprename/dirnprename.c
126
pid = getpid();
tools/test/stress2/testcases/dirnprename/dirnprename.c
128
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirnprename/dirnprename.c
134
sprintf(file1,"p%05d.%05d", pid, j);
tools/test/stress2/testcases/dirnprename/dirnprename.c
138
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirnprename/dirnprename.c
144
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirnprename/dirnprename.c
145
sprintf(file2,"%s/p%05d.%05d.togo", path, pid, i);
tools/test/stress2/testcases/dirnprename/dirnprename.c
151
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirnprename/dirnprename.c
152
sprintf(file2,"%s/p%05d.%05d.togo", path, pid, i);
tools/test/stress2/testcases/dirnprename/dirnprename.c
160
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
100
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
106
sprintf(file1,"p%05d.%05d", pid, j);
tools/test/stress2/testcases/dirrename/dirrename.c
110
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
116
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
117
sprintf(file2,"p%05d.%05d.togo", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
123
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
124
sprintf(file2,"p%05d.%05d.togo", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
132
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/dirrename/dirrename.c
94
pid_t pid;
tools/test/stress2/testcases/dirrename/dirrename.c
98
pid = getpid();
tools/test/stress2/testcases/link/link.c
107
pid_t pid;
tools/test/stress2/testcases/link/link.c
112
pid = getpid();
tools/test/stress2/testcases/link/link.c
114
sprintf(file,"p%05d.%05d", pid, j);
tools/test/stress2/testcases/link/link.c
137
sprintf(file,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/lockf/lockf.c
150
pid = fork();
tools/test/stress2/testcases/lockf/lockf.c
151
if (pid == -1) {
tools/test/stress2/testcases/lockf/lockf.c
156
if (pid == 0) { /* child */
tools/test/stress2/testcases/lockf/lockf.c
179
kill(pid, SIGHUP);
tools/test/stress2/testcases/lockf/lockf.c
180
waitpid(pid, &i, 0);
tools/test/stress2/testcases/lockf/lockf.c
43
static pid_t pid;
tools/test/stress2/testcases/mkfifo/mkfifo.c
130
pid_t pid;
tools/test/stress2/testcases/mkfifo/mkfifo.c
151
if ((pid = fork()) == 0) {
tools/test/stress2/testcases/mkfifo/mkfifo.c
155
} else if (pid > 0) {
tools/test/stress2/testcases/mkfifo/mkfifo.c
157
kill(pid, SIGINT);
tools/test/stress2/testcases/mkfifo/mkfifo.c
158
if (waitpid(pid, &status, 0) == -1)
tools/test/stress2/testcases/mkfifo/mkfifo.c
159
warn("waitpid(%d)", pid);
tools/test/stress2/testcases/mmap/mmap.c
105
pid = getpid();
tools/test/stress2/testcases/mmap/mmap.c
107
sprintf(file,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/mmap/mmap.c
99
pid_t pid;
tools/test/stress2/testcases/openat/openat.c
115
pid_t pid;
tools/test/stress2/testcases/openat/openat.c
121
pid = getpid();
tools/test/stress2/testcases/openat/openat.c
123
sprintf(file,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/openat/openat.c
137
pid_t pid;
tools/test/stress2/testcases/openat/openat.c
143
pid = getpid();
tools/test/stress2/testcases/openat/openat.c
145
sprintf(file,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/openat/openat.c
150
sprintf(file2,"p%05d.%05d.togo", pid, i);
tools/test/stress2/testcases/openat/openat.c
154
sprintf(file2,"tmp/p%05d.%05d.togo", pid, i);
tools/test/stress2/testcases/openat/openat.c
163
pid_t pid;
tools/test/stress2/testcases/openat/openat.c
168
pid = getpid();
tools/test/stress2/testcases/openat/openat.c
170
sprintf(file,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/rename/rename.c
106
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/rename/rename.c
107
sprintf(file2,"p%05d.%05d.togo", pid, i);
tools/test/stress2/testcases/rename/rename.c
113
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/rename/rename.c
114
sprintf(file2,"p%05d.%05d.togo", pid, i);
tools/test/stress2/testcases/rename/rename.c
122
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/rename/rename.c
92
pid_t pid;
tools/test/stress2/testcases/rename/rename.c
97
pid = getpid();
tools/test/stress2/testcases/rename/rename.c
99
sprintf(file1,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/shm/shm.c
134
pid = fork();
tools/test/stress2/testcases/shm/shm.c
135
if (pid == -1) {
tools/test/stress2/testcases/shm/shm.c
140
if (pid == 0) { /* child */
tools/test/stress2/testcases/shm/shm.c
178
kill(pid, SIGHUP);
tools/test/stress2/testcases/shm/shm.c
179
kill(pid, SIGKILL);
tools/test/stress2/testcases/shm/shm.c
53
static pid_t pid;
tools/test/stress2/testcases/socket/socket.c
101
pid_t pid;
tools/test/stress2/testcases/socket/socket.c
105
if ((pid = fork()) == 0) {
tools/test/stress2/testcases/socket/socket.c
109
} else if (pid > 0) {
tools/test/stress2/testcases/socket/socket.c
111
kill(pid, SIGINT);
tools/test/stress2/testcases/symlink/symlink.c
111
pid_t pid;
tools/test/stress2/testcases/symlink/symlink.c
115
pid = getpid();
tools/test/stress2/testcases/symlink/symlink.c
117
sprintf(file,"p%05d.%05d", pid, j);
tools/test/stress2/testcases/symlink/symlink.c
129
sprintf(file,"p%05d.%05d", pid, i);
tools/test/stress2/testcases/tcp/tcp.c
171
pid_t pid;
tools/test/stress2/testcases/tcp/tcp.c
173
if ((pid = fork()) == 0) {
tools/test/stress2/testcases/tcp/tcp.c
177
} else if (pid > 0) {
tools/test/stress2/testcases/tcp/tcp.c
179
kill(pid, SIGINT);
tools/test/stress2/testcases/tcp/tcp.c
180
if (waitpid(pid, NULL, 0) != pid)
tools/test/stress2/testcases/tcp/tcp.c
181
err(1, "waitpid(%d)", pid);
tools/test/stress2/tools/fstool.c
154
sprintf(path,"fstool.%06d.%d", pid, i);
tools/test/stress2/tools/fstool.c
223
pid = getpid();
tools/test/stress2/tools/fstool.c
42
static pid_t pid;
tools/test/stress2/tools/fstool.c
99
sprintf(path,"fstool.%06d.%d", pid, i);
tools/test/upsdl/upsdl.c
142
pid_t pid;
tools/test/upsdl/upsdl.c
154
pid = fork();
tools/test/upsdl/upsdl.c
156
if (pid == 0)
tools/test/upsdl/upsdl.c
162
if (pid == -1)
tools/tools/indent_wrapper/indent_wrapper.c
268
int pid;
tools/tools/indent_wrapper/indent_wrapper.c
283
switch ((pid = vfork())) {
tools/tools/netrate/http/http.c
246
pid_t pid;
tools/tools/netrate/http/http.c
313
pid = fork();
tools/tools/netrate/http/http.c
314
if (pid < 0) {
tools/tools/netrate/http/http.c
320
if (pid == 0) {
tools/tools/netrate/http/http.c
325
statep->hwd[i].hwd_pid = pid;
tools/tools/netrate/http/http.c
343
pid = waitpid(statep->hwd[i].hwd_pid, NULL, 0);
tools/tools/netrate/http/http.c
344
if (pid == statep->hwd[i].hwd_pid)
tools/tools/netrate/httpd/httpd.c
203
pid_t pid;
tools/tools/netrate/httpd/httpd.c
284
pid = fork();
tools/tools/netrate/httpd/httpd.c
285
if (pid < 0) {
tools/tools/netrate/httpd/httpd.c
291
if (pid == 0)
tools/tools/netrate/httpd/httpd.c
293
statep->hts[i].hts_pid = pid;
tools/tools/netrate/httpd/httpd.c
303
pid = waitpid(statep->hts[i].hts_pid, NULL, 0);
tools/tools/netrate/httpd/httpd.c
304
if (pid == statep->hts[i].hts_pid)
tools/tools/netrate/juggle/juggle.c
377
pid_t pid, ppid, wpid;
tools/tools/netrate/juggle/juggle.c
382
pid = fork();
tools/tools/netrate/juggle/juggle.c
383
if (pid < 0)
tools/tools/netrate/juggle/juggle.c
386
if (pid == 0) {
tools/tools/netrate/juggle/juggle.c
408
kill(pid, SIGTERM);
tools/tools/netrate/juggle/juggle.c
420
kill(pid, SIGTERM);
tools/tools/netrate/juggle/juggle.c
429
kill(pid, SIGTERM);
tools/tools/netrate/juggle/juggle.c
440
wpid = waitpid(pid, NULL, 0);
tools/tools/netrate/juggle/juggle.c
443
if (wpid != pid)
tools/tools/netrate/tcpp/tcpp_client.c
271
pid_t pid;
tools/tools/netrate/tcpp/tcpp_client.c
294
pid = fork();
tools/tools/netrate/tcpp/tcpp_client.c
295
if (pid < 0) {
tools/tools/netrate/tcpp/tcpp_client.c
303
if (pid == 0) {
tools/tools/netrate/tcpp/tcpp_client.c
307
pid_list[i] = pid;
tools/tools/netrate/tcpp/tcpp_server.c
282
pid_t pid;
tools/tools/netrate/tcpp/tcpp_server.c
294
pid = fork();
tools/tools/netrate/tcpp/tcpp_server.c
295
if (pid < 0) {
tools/tools/netrate/tcpp/tcpp_server.c
303
if (pid == 0) {
tools/tools/netrate/tcpp/tcpp_server.c
307
pid_list[i] = pid;
tools/tools/nvmf/nvmfd/nvmfd.c
154
pid_t pid;
tools/tools/nvmf/nvmfd/nvmfd.c
241
pfh = pidfile_open(NULL, 0600, &pid);
tools/tools/nvmf/nvmfd/nvmfd.c
245
(intmax_t)pid);
tools/tools/syscall_timing/syscall_timing.c
184
pid_t pid;
tools/tools/syscall_timing/syscall_timing.c
187
pid = fork();
tools/tools/syscall_timing/syscall_timing.c
188
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
190
if (pid == 0)
tools/tools/syscall_timing/syscall_timing.c
192
if (waitpid(pid, NULL, 0) < 0)
tools/tools/syscall_timing/syscall_timing.c
196
pid = fork();
tools/tools/syscall_timing/syscall_timing.c
197
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
199
if (pid == 0)
tools/tools/syscall_timing/syscall_timing.c
201
if (waitpid(pid, NULL, 0) < 0)
tools/tools/syscall_timing/syscall_timing.c
215
pid_t pid;
tools/tools/syscall_timing/syscall_timing.c
218
pid = fork();
tools/tools/syscall_timing/syscall_timing.c
219
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
221
if (pid == 0) {
tools/tools/syscall_timing/syscall_timing.c
225
if (waitpid(pid, NULL, 0) < 0)
tools/tools/syscall_timing/syscall_timing.c
229
pid = fork();
tools/tools/syscall_timing/syscall_timing.c
230
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
232
if (pid == 0) {
tools/tools/syscall_timing/syscall_timing.c
236
if (waitpid(pid, NULL, 0) < 0)
tools/tools/syscall_timing/syscall_timing.c
481
pid_t pid;
tools/tools/syscall_timing/syscall_timing.c
487
pid = pdfork(&procfd, 0);
tools/tools/syscall_timing/syscall_timing.c
488
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
491
if (pid == 0) {
tools/tools/syscall_timing/syscall_timing.c
619
pid_t pid;
tools/tools/syscall_timing/syscall_timing.c
633
pid = pdfork(&procfd, 0);
tools/tools/syscall_timing/syscall_timing.c
634
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
637
if (pid == 0) {
tools/tools/syscall_timing/syscall_timing.c
861
pid_t pid;
tools/tools/syscall_timing/syscall_timing.c
864
pid = vfork();
tools/tools/syscall_timing/syscall_timing.c
865
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
867
if (pid == 0)
tools/tools/syscall_timing/syscall_timing.c
869
if (waitpid(pid, NULL, 0) < 0)
tools/tools/syscall_timing/syscall_timing.c
873
pid = vfork();
tools/tools/syscall_timing/syscall_timing.c
874
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
876
if (pid == 0)
tools/tools/syscall_timing/syscall_timing.c
878
if (waitpid(pid, NULL, 0) < 0)
tools/tools/syscall_timing/syscall_timing.c
888
pid_t pid;
tools/tools/syscall_timing/syscall_timing.c
891
pid = vfork();
tools/tools/syscall_timing/syscall_timing.c
892
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
894
if (pid == 0) {
tools/tools/syscall_timing/syscall_timing.c
898
if (waitpid(pid, NULL, 0) < 0)
tools/tools/syscall_timing/syscall_timing.c
902
pid = vfork();
tools/tools/syscall_timing/syscall_timing.c
903
if (pid < 0)
tools/tools/syscall_timing/syscall_timing.c
905
if (pid == 0) {
tools/tools/syscall_timing/syscall_timing.c
909
if (waitpid(pid, NULL, 0) < 0)
tools/tools/usbtest/usb_control_ep_test.c
192
"VID=0x%04x PID=0x%04x\n", uaddr.vid, uaddr.pid);
tools/tools/usbtest/usb_control_ep_test.c
331
"VID=0x%04x PID=0x%04x\n", uaddr.vid, uaddr.pid);
tools/tools/usbtest/usb_control_ep_test.c
419
"test for VID=0x%04x PID=0x%04x\n", uaddr.vid, uaddr.pid);
tools/tools/usbtest/usb_control_ep_test.c
492
"for VID=0x%04x PID=0x%04x\n", uaddr.vid, uaddr.pid);
tools/tools/usbtest/usb_control_ep_test.c
623
"for VID=0x%04x PID=0x%04x\n", uaddr.vid, uaddr.pid);
tools/tools/usbtest/usb_modem_test.c
544
(int)uaddr.vid, (int)uaddr.pid);
tools/tools/usbtest/usb_msc_test.c
1250
uaddr.vid, uaddr.pid);
tools/tools/usbtest/usb_msc_test.c
889
uaddr[index].pid = ddesc->idProduct;
tools/tools/usbtest/usb_msc_test.c
931
(uaddr.pid == ddesc->idProduct) &&
tools/tools/usbtest/usbtest.c
719
uaddr.vid, uaddr.pid, uaddr.bus, uaddr.addr,
tools/tools/usbtest/usbtest.c
732
uaddr.pid = get_integer() & 0xFFFF;
tools/tools/usbtest/usbtest.h
41
uint16_t pid;
usr.bin/apply/apply.c
214
pid_t pid;
usr.bin/apply/apply.c
222
switch(pid = vfork()) {
usr.bin/apply/apply.c
233
pid = waitpid(pid, &pstat, 0);
usr.bin/apply/apply.c
237
return(pid == -1 ? -1 : pstat);
usr.bin/calendar/calendar.c
202
pid_t pid;
usr.bin/calendar/calendar.c
206
pid = fork();
usr.bin/calendar/calendar.c
207
if (pid < 0)
usr.bin/calendar/calendar.c
209
if (pid == 0) {
usr.bin/ctags/ctags.c
210
pid_t pid;
usr.bin/ctags/ctags.c
212
if ((pid = fork()) == -1)
usr.bin/ctags/ctags.c
214
else if (pid == 0) {
usr.bin/diff/pr.c
52
pid_t pid;
usr.bin/diff/pr.c
79
error = posix_spawn(&pid, _PATH_PR, &fa, &sa, argv, environ);
usr.bin/diff3/diff3.c
311
pid_t pid;
usr.bin/diff3/diff3.c
322
error = posix_spawn(&pid, diffargv[0], &fa, &sa, diffargv, environ);
usr.bin/find/function.c
614
pid_t pid;
usr.bin/find/function.c
656
switch (pid = fork()) {
usr.bin/find/function.c
677
pid = waitpid(pid, &status, 0);
usr.bin/find/function.c
678
if (pid != -1 && WIFEXITED(status) && !WEXITSTATUS(status))
usr.bin/fstat/fstat.c
218
int pid;
usr.bin/fstat/fstat.c
221
pid = kp->ki_pid;
usr.bin/fstat/fstat.c
228
print_file_info(procstat, fst, uname, cmd, pid);
usr.bin/fstat/fstat.c
235
const char *uname, const char *cmd, int pid)
usr.bin/fstat/fstat.c
267
printf("%-8.8s %-10s %5d", uname, cmd, pid);
usr.bin/fstat/fstat.c
326
fst->fs_type, fst->fs_fd, pid);
usr.bin/fstat/fstat.c
85
struct filestat *fst, const char *uname, const char *cmd, int pid);
usr.bin/fstat/fuser.c
252
fprintf(stdout, "%6d", consumer->pid);
usr.bin/fstat/fuser.c
259
kill(consumer->pid, sig);
usr.bin/fstat/fuser.c
315
if (cons->pid == kp->ki_pid) {
usr.bin/fstat/fuser.c
332
cons->pid = kp->ki_pid;
usr.bin/fstat/fuser.c
84
pid_t pid;
usr.bin/gcore/elfcore.c
128
elf_ident(int efd, pid_t pid __unused, char *binfile __unused)
usr.bin/gcore/elfcore.c
177
elf_coredump(int efd, int fd, pid_t pid)
usr.bin/gcore/elfcore.c
189
g_pid = pid;
usr.bin/gcore/elfcore.c
193
ptrace(PT_ATTACH, pid, NULL, 0);
usr.bin/gcore/elfcore.c
196
if (waitpid(pid, &g_status, 0) == -1)
usr.bin/gcore/elfcore.c
200
map = readmap(pid);
usr.bin/gcore/elfcore.c
221
elf_putnotes(pid, sb, ¬esz);
usr.bin/gcore/elfcore.c
229
elf_puthdr(efd, pid, map, hdr, hdrsize, notesz, segoff, seginfo.count);
usr.bin/gcore/elfcore.c
256
ptrace(PT_IO, pid, (caddr_t)&iorequest, 0);
usr.bin/gcore/elfcore.c
336
elf_putnotes(pid_t pid, struct sbuf *sb, size_t *sizep)
usr.bin/gcore/elfcore.c
344
threads = ptrace(PT_GETNUMLWPS, pid, NULL, 0);
usr.bin/gcore/elfcore.c
351
ptrace(PT_GETLWPLIST, pid, (void *)tids, threads);
usr.bin/gcore/elfcore.c
356
elf_putnote(NT_PRPSINFO, elf_note_prpsinfo, &pid, sb);
usr.bin/gcore/elfcore.c
380
elf_putnote(NT_PROCSTAT_PROC, elf_note_procstat_proc, &pid, sb);
usr.bin/gcore/elfcore.c
381
elf_putnote(NT_PROCSTAT_FILES, elf_note_procstat_files, &pid, sb);
usr.bin/gcore/elfcore.c
382
elf_putnote(NT_PROCSTAT_VMMAP, elf_note_procstat_vmmap, &pid, sb);
usr.bin/gcore/elfcore.c
383
elf_putnote(NT_PROCSTAT_GROUPS, elf_note_procstat_groups, &pid, sb);
usr.bin/gcore/elfcore.c
384
elf_putnote(NT_PROCSTAT_UMASK, elf_note_procstat_umask, &pid, sb);
usr.bin/gcore/elfcore.c
385
elf_putnote(NT_PROCSTAT_RLIMIT, elf_note_procstat_rlimit, &pid, sb);
usr.bin/gcore/elfcore.c
386
elf_putnote(NT_PROCSTAT_OSREL, elf_note_procstat_osrel, &pid, sb);
usr.bin/gcore/elfcore.c
387
elf_putnote(NT_PROCSTAT_PSSTRINGS, elf_note_procstat_psstrings, &pid,
usr.bin/gcore/elfcore.c
389
elf_putnote(NT_PROCSTAT_AUXV, elf_note_procstat_auxv, &pid, sb);
usr.bin/gcore/elfcore.c
390
elf_putnote(NT_PROCSTAT_KQUEUES, elf_note_procstat_kqueues, &pid, sb);
usr.bin/gcore/elfcore.c
466
elf_puthdr(int efd, pid_t pid, struct map_entry *map, void *hdr, size_t hdrsize,
usr.bin/gcore/elfcore.c
575
readmap(pid_t pid)
usr.bin/gcore/elfcore.c
581
vmentl = kinfo_getvmmap(pid, &nitems);
usr.bin/gcore/elfcore.c
583
err(1, "cannot retrieve mappings for %u process", pid);
usr.bin/gcore/elfcore.c
633
pid_t pid;
usr.bin/gcore/elfcore.c
639
pid = *(pid_t *)arg;
usr.bin/gcore/elfcore.c
649
name[3] = pid;
usr.bin/gcore/elfcore.c
652
err(1, "kern.proc.pid.%u", pid);
usr.bin/gcore/elfcore.c
653
if (kip.ki_pid != pid)
usr.bin/gcore/elfcore.c
654
err(1, "kern.proc.pid.%u", pid);
usr.bin/gcore/elfcore.c
670
psinfo->pr_pid = pid;
usr.bin/gcore/elfcore.c
758
pid_t pid;
usr.bin/gcore/elfcore.c
762
pid = *(pid_t *)arg;
usr.bin/gcore/elfcore.c
767
name[3] = pid;
usr.bin/gcore/elfcore.c
770
err(1, "kern.proc.%d.%u", what, pid);
usr.bin/gcore/elfcore.c
777
err(1, "kern.proc.%d.%u", what, pid);
usr.bin/gcore/elfcore.c
855
pid_t pid;
usr.bin/gcore/elfcore.c
860
pid = *(pid_t *)arg;
usr.bin/gcore/elfcore.c
870
name[3] = pid;
usr.bin/gcore/elfcore.c
875
err(1, "kern.proc.rlimit.%u", pid);
usr.bin/gcore/elfcore.c
877
errx(1, "kern.proc.rlimit.%u: short read", pid);
usr.bin/gcore/extern.h
35
int (*ident)(int efd, pid_t pid, char *binfile);
usr.bin/gcore/extern.h
36
void (*dump)(int efd, int fd, pid_t pid);
usr.bin/gcore/gcore.c
105
error = ptrace(PT_COREDUMP, pid, (void *)&pc, sizeof(pc));
usr.bin/gcore/gcore.c
111
waited = waitpid(pid, &res, WNOHANG);
usr.bin/gcore/gcore.c
117
error = ptrace(PT_DETACH, pid, NULL, 0);
usr.bin/gcore/gcore.c
159
pid = atoi(argv[0]);
usr.bin/gcore/gcore.c
163
pid = atoi(argv[1]);
usr.bin/gcore/gcore.c
171
kcoredump(fd, pid);
usr.bin/gcore/gcore.c
178
name[3] = pid;
usr.bin/gcore/gcore.c
190
if (((*d)->ident)(efd, pid, binfile)) {
usr.bin/gcore/gcore.c
200
dumper->dump(efd, fd, pid);
usr.bin/gcore/gcore.c
66
static pid_t pid;
usr.bin/gcore/gcore.c
78
(void)snprintf(fname, sizeof(fname), "core.%d", pid);
usr.bin/gcore/gcore.c
88
kcoredump(int fd, pid_t pid)
usr.bin/gcore/gcore.c
93
error = ptrace(PT_ATTACH, pid, NULL, 0);
usr.bin/gcore/gcore.c
97
waited = waitpid(pid, &res, 0);
usr.bin/kdump/kdump.c
148
pid_t pid;
usr.bin/kdump/kdump.c
340
pid_t pid = 0;
usr.bin/kdump/kdump.c
371
pid = atoi(optarg);
usr.bin/kdump/kdump.c
476
if (pid && ktr_header.ktr_pid != pid &&
usr.bin/kdump/kdump.c
477
ktr_header.ktr_tid != pid)
usr.bin/kdump/kdump.c
562
if (pi->pid == kth->ktr_pid) {
usr.bin/kdump/kdump.c
571
pi->pid = kth->ktr_pid;
usr.bin/kdump/kdump.c
577
if (pi->pid == kth->ktr_pid) {
usr.bin/kdump/kdump.c
595
if (pi->pid == kth->ktr_pid) {
usr.bin/ktrace/ktrace.c
110
if (clear == NOTSET && pid == 0 && argc == 0)
usr.bin/ktrace/ktrace.c
114
if (pid != 0 && argc > 0) {
usr.bin/ktrace/ktrace.c
127
ops |= pid ? KTROP_CLEAR : KTROP_CLEARFILE;
usr.bin/ktrace/ktrace.c
129
if (ktrace(tracefile, ops, trpoints, pid) < 0)
usr.bin/ktrace/ktrace.c
162
if (ktrace(tracefile, ops, trpoints, pid) < 0)
usr.bin/ktrace/ktrace.c
178
if ((clear == CLEARALL && p != NULL) || (cl == CLEARALL && pid != 0)) {
usr.bin/ktrace/ktrace.c
183
if (p != NULL && pid != 0) {
usr.bin/ktrace/ktrace.c
202
pid = n;
usr.bin/ktrace/ktrace.c
206
pid = 1;
usr.bin/ktrace/ktrace.c
51
static int pid;
usr.bin/ktrace/ktrace.c
87
pid = -pid;
usr.bin/leave/leave.c
136
int pid;
usr.bin/leave/leave.c
138
if ((pid = fork())) {
usr.bin/leave/leave.c
142
printf("Alarm set for %s. (pid %d)\n", tb, pid);
usr.bin/limits/limits.c
270
static void getrlimit_proc(pid_t pid, int resource, struct rlimit *rlp);
usr.bin/limits/limits.c
271
static void setrlimit_proc(pid_t pid, int resource, const struct rlimit *rlp);
usr.bin/limits/limits.c
290
pid_t pid;
usr.bin/limits/limits.c
298
pid = -1;
usr.bin/limits/limits.c
335
if (!isdigit(*optarg) || (pid = atoi(optarg)) < 0) {
usr.bin/limits/limits.c
363
if (pid != -1) {
usr.bin/limits/limits.c
377
if (pid == -1) {
usr.bin/limits/limits.c
380
getrlimit_proc(pid, i, &limits[i]);
usr.bin/limits/limits.c
382
getrlimit_proc(pid, i, &limits[i]);
usr.bin/limits/limits.c
466
if (pid != -1) {
usr.bin/limits/limits.c
499
setrlimit_proc(pid, rcswhich, &limits[rcswhich]);
usr.bin/limits/limits.c
753
getrlimit_proc(pid_t pid, int resource, struct rlimit *rlp)
usr.bin/limits/limits.c
762
name[3] = pid;
usr.bin/limits/limits.c
767
err(EXIT_FAILURE, "sysctl: kern.proc.rlimit: %d", pid);
usr.bin/limits/limits.c
773
setrlimit_proc(pid_t pid, int resource, const struct rlimit *rlp)
usr.bin/limits/limits.c
781
name[3] = pid;
usr.bin/limits/limits.c
785
err(EXIT_FAILURE, "sysctl: kern.proc.rlimit: %d", pid);
usr.bin/login/login.c
171
pid_t pid;
usr.bin/login/login.c
548
pid = fork();
usr.bin/login/login.c
549
if (pid < 0) {
usr.bin/login/login.c
551
} else if (pid != 0) {
usr.bin/login/login.c
564
waitpid(pid, &status, 0);
usr.bin/login/login_audit.c
120
pid_t pid = getpid();
usr.bin/login/login_audit.c
140
pid, -1, &tid)) == NULL)
usr.bin/login/login_audit.c
147
gid, pid, pid, &tid)) == NULL)
usr.bin/login/login_audit.c
176
pid_t pid = getpid();
usr.bin/login/login_audit.c
192
if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid,
usr.bin/login/login_audit.c
193
pid, &tid)) == NULL)
usr.bin/login/login_audit.c
68
pid_t pid = getpid();
usr.bin/login/login_audit.c
86
auinfo.ai_asid = pid;
usr.bin/login/login_audit.c
95
if ((tok = au_to_subject32(uid, geteuid(), getegid(), uid, gid, pid,
usr.bin/login/login_audit.c
96
pid, &tid)) == NULL)
usr.bin/mail/cmd2.c
357
int pid;
usr.bin/mail/cmd2.c
359
switch (pid = fork()) {
usr.bin/mail/cmd2.c
369
wait_child(pid);
usr.bin/mail/fio.c
325
int pid, l;
usr.bin/mail/fio.c
372
pid = start_command(sh, 0, -1, pivec[1], "-c", cmdbuf, NULL);
usr.bin/mail/fio.c
373
if (pid < 0) {
usr.bin/mail/fio.c
381
if (wait_child(pid) < 0 && WIFSIGNALED(wait_status) &&
usr.bin/mail/names.c
348
int pid;
usr.bin/mail/names.c
365
pid = start_command(sh, &nset, image, -1, "-c", fname,
usr.bin/mail/names.c
367
if (pid < 0) {
usr.bin/mail/names.c
371
free_child(pid);
usr.bin/mail/popen.c
100
pid_t pid;
usr.bin/mail/popen.c
117
pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL);
usr.bin/mail/popen.c
118
if (pid < 0) {
usr.bin/mail/popen.c
125
register_file(fp, 1, pid);
usr.bin/mail/popen.c
159
register_file(FILE *fp, int pipe, pid_t pid)
usr.bin/mail/popen.c
167
fpp->pid = pid;
usr.bin/mail/popen.c
194
return (p->pid);
usr.bin/mail/popen.c
210
pid_t pid;
usr.bin/mail/popen.c
212
if ((pid = fork()) < 0) {
usr.bin/mail/popen.c
216
if (pid == 0) {
usr.bin/mail/popen.c
228
return (pid);
usr.bin/mail/popen.c
234
pid_t pid;
usr.bin/mail/popen.c
238
pid = start_commandv(cmd, nset, infd, outfd, args);
usr.bin/mail/popen.c
240
if (pid < 0)
usr.bin/mail/popen.c
242
return wait_command(pid);
usr.bin/mail/popen.c
281
wait_command(pid_t pid)
usr.bin/mail/popen.c
284
if (wait_child(pid) < 0) {
usr.bin/mail/popen.c
292
findchild(pid_t pid, int dont_alloc)
usr.bin/mail/popen.c
296
for (cpp = &child; *cpp != NULL && (*cpp)->pid != pid;
usr.bin/mail/popen.c
310
(*cpp)->pid = pid;
usr.bin/mail/popen.c
333
pid_t pid;
usr.bin/mail/popen.c
339
while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
usr.bin/mail/popen.c
340
cp = findchild(pid, 1);
usr.bin/mail/popen.c
359
wait_child(pid_t pid)
usr.bin/mail/popen.c
373
cp = findchild(pid, 1);
usr.bin/mail/popen.c
375
rv = waitpid(pid, &wait_status, 0);
usr.bin/mail/popen.c
391
free_child(pid_t pid)
usr.bin/mail/popen.c
399
if ((cp = findchild(pid, 0)) != NULL) {
usr.bin/mail/popen.c
45
pid_t pid;
usr.bin/mail/popen.c
51
pid_t pid;
usr.bin/mail/send.c
287
int pid;
usr.bin/mail/send.c
385
pid = fork();
usr.bin/mail/send.c
386
if (pid == -1) {
usr.bin/mail/send.c
391
if (pid == 0) {
usr.bin/mail/send.c
410
(void)wait_child(pid);
usr.bin/mail/send.c
412
free_child(pid);
usr.bin/mail/tests/mailx_signal_test.c
119
ATF_CHECK_INTEQ(0, kill(pid, signo));
usr.bin/mail/tests/mailx_signal_test.c
123
(void)kill(pid, SIGKILL);
usr.bin/mail/tests/mailx_signal_test.c
126
if (waitpid(pid, &status, WNOHANG) == pid)
usr.bin/mail/tests/mailx_signal_test.c
41
pid_t pid;
usr.bin/mail/tests/mailx_signal_test.c
49
if ((pid = fork()) < 0)
usr.bin/mail/tests/mailx_signal_test.c
51
if (pid == 0) {
usr.bin/mail/tests/mailx_signal_test.c
97
ATF_CHECK_INTEQ(0, kill(pid, signo));
usr.bin/netstat/bpf.c
56
bpf_pidname(pid_t pid)
usr.bin/netstat/bpf.c
65
mib[3] = pid;
usr.bin/proccontrol/proccontrol.c
110
pid_t pid;
usr.bin/proccontrol/proccontrol.c
115
pid = -1;
usr.bin/proccontrol/proccontrol.c
140
pid = str2pid(optarg);
usr.bin/proccontrol/proccontrol.c
155
if (pid != -1 || query)
usr.bin/proccontrol/proccontrol.c
157
pid = getpid();
usr.bin/proccontrol/proccontrol.c
158
} else if (pid == -1) {
usr.bin/proccontrol/proccontrol.c
161
pid = getpid();
usr.bin/proccontrol/proccontrol.c
167
error = procctl(P_PID, pid, PROC_ASLR_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
170
error = procctl(P_PID, pid, PROC_TRACE_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
173
error = procctl(P_PID, pid, PROC_TRAPCAP_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
176
error = procctl(P_PID, pid, PROC_PROTMAX_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
179
error = procctl(P_PID, pid, PROC_STACKGAP_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
182
error = procctl(P_PID, pid, PROC_NO_NEW_PRIVS_STATUS,
usr.bin/proccontrol/proccontrol.c
186
error = procctl(P_PID, pid, PROC_WXMAP_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
190
error = procctl(P_PID, pid, PROC_KPTI_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
196
error = procctl(P_PID, pid, PROC_LA_STATUS, &arg);
usr.bin/proccontrol/proccontrol.c
200
error = procctl(P_PID, pid, PROC_LOGSIGEXIT_STATUS,
usr.bin/proccontrol/proccontrol.c
359
error = procctl(P_PID, pid, PROC_ASLR_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
364
error = procctl(P_PID, pid, PROC_TRACE_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
369
error = procctl(P_PID, pid, PROC_TRAPCAP_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
374
error = procctl(P_PID, pid, PROC_PROTMAX_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
380
error = procctl(P_PID, pid, PROC_STACKGAP_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
385
error = procctl(P_PID, pid, PROC_NO_NEW_PRIVS_CTL,
usr.bin/proccontrol/proccontrol.c
391
error = procctl(P_PID, pid, PROC_WXMAP_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
397
error = procctl(P_PID, pid, PROC_KPTI_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
404
error = procctl(P_PID, pid, PROC_LA_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
409
error = procctl(P_PID, pid, PROC_LA_CTL, &arg);
usr.bin/proccontrol/proccontrol.c
415
error = procctl(P_PID, pid, PROC_LOGSIGEXIT_CTL, &arg);
usr.bin/procstat/procstat.c
298
pid_t pid;
usr.bin/procstat/procstat.c
497
pid = l;
usr.bin/procstat/procstat.c
500
pid, &cnt);
usr.bin/procstat/procstat_advlock.c
89
xo_emit("{:pid/%5d} ", a->pid);
usr.bin/script/script.c
268
int pid;
usr.bin/script/script.c
270
pid = getpid();
usr.bin/script/script.c
271
if (ioctl(fm_fd, FILEMON_SET_PID, &pid) < 0)
usr.bin/sdiff/edit.c
42
pid_t pid;
usr.bin/sdiff/edit.c
56
if ((pid = fork()) == -1)
usr.bin/sdiff/edit.c
58
if (pid == 0) {
usr.bin/sdiff/edit.c
62
while (waitpid(pid, &st, 0) == -1)
usr.bin/sdiff/sdiff.c
213
pid_t pid;
usr.bin/sdiff/sdiff.c
382
if ((pid = fork()) < 0)
usr.bin/sdiff/sdiff.c
384
if (pid == 0) {
usr.bin/sdiff/sdiff.c
413
if (waitpid(pid, &status, 0) == -1 || !WIFEXITED(status) ||
usr.bin/sockstat/main.c
1001
getprocjid(pid_t pid)
usr.bin/sockstat/main.c
1010
mib[3] = (int)pid;
usr.bin/sockstat/main.c
1216
int pid;
usr.bin/sockstat/main.c
1387
cw->pid = MAX(cw->pid, len);
usr.bin/sockstat/main.c
1617
cw->command, "??", cw->pid, "??", cw->fd, "??",
usr.bin/sockstat/main.c
1660
.pid = strlen(__HDR_PID),
usr.bin/sockstat/main.c
1686
__HDR_COMMAND, cw.pid, __HDR_PID, cw.fd, __HDR_FD, cw.proto,
usr.bin/sockstat/main.c
1738
xo_emit(" {:pid/%*lu}", cw.pid, (u_long)xf->xf_pid);
usr.bin/sockstat/main.c
1753
cw.pid, "??", cw.fd, "??");
usr.bin/sockstat/main.c
1766
cw.pid, "??", cw.fd, "??");
usr.bin/sockstat/main.c
979
getprocname(pid_t pid)
usr.bin/sockstat/main.c
988
mib[3] = (int)pid;
usr.bin/su/su.c
148
pid_t child_pid, child_pgrp, pid;
usr.bin/su/su.c
443
while ((pid = waitpid(child_pid, &statusp, WUNTRACED)) != -1) {
usr.bin/su/su.c
460
if (pid == -1)
usr.bin/systat/proc.c
153
swobj[nswobj].pid = 0;
usr.bin/systat/proc.c
199
if (vm != NULL && vm->pid != kipp->ki_pid) {
usr.bin/systat/proc.c
202
vm->pid = kipp->ki_pid;
usr.bin/systat/proc.c
267
pu[nproc]->pid = kipp[i].ki_pid;
usr.bin/systat/proc.c
50
pid_t pid; /* to avoid double counting */
usr.bin/systat/proc.c
61
pid_t pid;
usr.bin/systat/proc.c
86
snprintf(buf, sizeof(buf), "%6d %-10s %-10.10s", pu[idx]->pid, uname,
usr.bin/talk/get_addrs.c
48
msg.pid = htonl(getpid());
usr.bin/time/time.c
114
switch(pid = fork()) {
usr.bin/time/time.c
129
while (wait4(pid, &status, 0, &ru) != pid) {
usr.bin/time/time.c
69
pid_t pid;
usr.bin/tip/libacu/v831.c
103
while ((pid = wait(&status)) != child && pid != -1)
usr.bin/tip/libacu/v831.c
53
pid_t pid;
usr.bin/tip/tip/cmds.c
920
pid_t pid;
usr.bin/tip/tip/cmds.c
931
if ((pid = vfork()) == 0) {
usr.bin/tip/tip/cmds.c
944
if (pid == -1) {
usr.bin/tip/tip/cmds.c
953
while (wait(&s) != pid);
usr.bin/tip/tip/uucplock.c
102
pid = getpid();
usr.bin/tip/tip/uucplock.c
103
(void)snprintf(text_pid, sizeof text_pid, "%10ld\n", (long)pid);
usr.bin/tip/tip/uucplock.c
59
pid_t pid;
usr.bin/tip/tip/uucplock.c
82
pid = atol(text_pid);
usr.bin/tip/tip/uucplock.c
84
if (kill(pid, 0) == 0 || errno != ESRCH) {
usr.bin/tip/tip/uucplock.c
93
ttyname, (long)pid);
usr.bin/top/machine.c
908
if (!sel->self && pp->ki_pid == mypid && sel->pid == -1)
usr.bin/top/machine.c
912
if (!sel->system && (pp->ki_flag & P_SYSTEM) && sel->pid == -1)
usr.bin/top/machine.c
928
if (!sel->kidle && pp->ki_tdflags & TDF_IDLETD && sel->pid == -1)
usr.bin/top/machine.c
953
if (sel->pid != -1 && pp->ki_pid != sel->pid)
usr.bin/top/machine.h
76
int pid; /* only this pid (unless pid == -1) */
usr.bin/top/top.c
1141
ps.pid = (pid_t)-1;
usr.bin/top/top.c
1154
ps.pid = (pid_t)num;
usr.bin/top/top.c
287
ps.pid = -1;
usr.bin/top/top.c
374
ps.pid = (pid_t)num;
usr.bin/top/utils.c
283
find_pid(pid_t pid)
usr.bin/top/utils.c
296
pbase = kvm_getprocs(kd, KERN_PROC_PID, pid, &nproc);
usr.bin/top/utils.c
301
if ((nproc == 1) && (pbase->ki_pid == pid)) {
usr.bin/top/utils.h
22
int find_pid(pid_t pid);
usr.bin/truss/main.c
136
if ((pid == 0 && ac == 0) ||
usr.bin/truss/main.c
137
(pid != 0 && ac != 0))
usr.bin/truss/main.c
155
if (pid == 0) {
usr.bin/truss/main.c
169
start_tracing(trussinfo, pid);
usr.bin/truss/main.c
183
if (pid == 0)
usr.bin/truss/main.c
184
kill(LIST_FIRST(&trussinfo->proclist)->pid, SIGKILL);
usr.bin/truss/main.c
185
ptrace(PT_DETACH, LIST_FIRST(&trussinfo->proclist)->pid, NULL,
usr.bin/truss/main.c
189
ptrace(PT_SYSCALL, LIST_FIRST(&trussinfo->proclist)->pid, (caddr_t)1,
usr.bin/truss/main.c
73
pid_t pid;
usr.bin/truss/main.c
83
pid = 0;
usr.bin/truss/main.c
91
pid = atoi(optarg);
usr.bin/truss/main.c
93
if (pid == getpid()) {
usr.bin/truss/setup.c
150
pid_t pid;
usr.bin/truss/setup.c
152
pid = vfork();
usr.bin/truss/setup.c
153
if (pid == -1)
usr.bin/truss/setup.c
155
if (pid == 0) { /* Child */
usr.bin/truss/setup.c
162
if (waitpid(pid, NULL, 0) < 0)
usr.bin/truss/setup.c
165
new_proc(info, pid, 0);
usr.bin/truss/setup.c
172
start_tracing(struct trussinfo *info, pid_t pid)
usr.bin/truss/setup.c
178
ret = ptrace(PT_ATTACH, pid, NULL, 0);
usr.bin/truss/setup.c
184
if (waitpid(pid, NULL, 0) < 0)
usr.bin/truss/setup.c
187
new_proc(info, pid, 0);
usr.bin/truss/setup.c
204
detach_proc(pid_t pid)
usr.bin/truss/setup.c
212
kill(pid, SIGSTOP);
usr.bin/truss/setup.c
214
if (waitpid(pid, &status, 0) < 0)
usr.bin/truss/setup.c
221
if (ptrace(PT_CONTINUE, pid, (caddr_t)1, sig) < 0)
usr.bin/truss/setup.c
225
if (ptrace(PT_DETACH, pid, (caddr_t)1, 0) < 0)
usr.bin/truss/setup.c
228
kill(pid, SIGCONT);
usr.bin/truss/setup.c
236
find_abi(pid_t pid)
usr.bin/truss/setup.c
248
mib[3] = pid;
usr.bin/truss/setup.c
257
warnx("ABI %s for pid %ld is not supported", progt, (long)pid);
usr.bin/truss/setup.c
300
nlwps = ptrace(PT_GETNUMLWPS, p->pid, NULL, 0);
usr.bin/truss/setup.c
305
nlwps = ptrace(PT_GETLWPLIST, p->pid, (caddr_t)lwps, nlwps);
usr.bin/truss/setup.c
321
new_proc(struct trussinfo *info, pid_t pid, lwpid_t lwpid)
usr.bin/truss/setup.c
330
if (np->pid == pid)
usr.bin/truss/setup.c
331
errx(1, "Duplicate process for pid %ld", (long)pid);
usr.bin/truss/setup.c
335
if (ptrace(PT_FOLLOW_FORK, pid, NULL, 1) == -1)
usr.bin/truss/setup.c
336
err(1, "Unable to follow forks for pid %ld", (long)pid);
usr.bin/truss/setup.c
337
if (ptrace(PT_LWP_EVENTS, pid, NULL, 1) == -1)
usr.bin/truss/setup.c
338
err(1, "Unable to enable LWP events for pid %ld", (long)pid);
usr.bin/truss/setup.c
340
np->pid = pid;
usr.bin/truss/setup.c
341
np->abi = find_abi(pid);
usr.bin/truss/setup.c
369
detach_proc(p->pid);
usr.bin/truss/setup.c
375
find_proc(struct trussinfo *info, pid_t pid)
usr.bin/truss/setup.c
380
if (np->pid == pid)
usr.bin/truss/setup.c
391
find_thread(struct trussinfo *info, pid_t pid, lwpid_t lwpid)
usr.bin/truss/setup.c
396
np = find_proc(info, pid);
usr.bin/truss/setup.c
413
find_exit_thread(struct trussinfo *info, pid_t pid)
usr.bin/truss/setup.c
417
p = find_proc(info, pid);
usr.bin/truss/setup.c
580
p->abi = find_abi(p->pid);
usr.bin/truss/setup.c
582
if (ptrace(PT_DETACH, p->pid, (caddr_t)1, 0) < 0)
usr.bin/truss/setup.c
600
len += fprintf(info->outfile, "%5d", t->proc->pid);
usr.bin/truss/syscalls.c
1099
pid_t pid = trussinfo->curthread->proc->pid;
usr.bin/truss/syscalls.c
1112
if (get_struct(pid, arg, sa, len) == -1) {
usr.bin/truss/syscalls.c
1166
pid_t pid = trussinfo->curthread->proc->pid;
usr.bin/truss/syscalls.c
1180
if (get_struct(pid, arg, &iov, iovcnt * sizeof(struct iovec)) == -1) {
usr.bin/truss/syscalls.c
1195
if (len && get_struct(pid, (uintptr_t)iov[i].iov_base, &tmp2, len) != -1) {
usr.bin/truss/syscalls.c
1467
print_cmsgs(FILE *fp, pid_t pid, bool receive, struct msghdr *msghdr)
usr.bin/truss/syscalls.c
1482
if (get_struct(pid, (uintptr_t)msghdr->msg_control, cmsgbuf, len) == -1) {
usr.bin/truss/syscalls.c
1585
pid_t pid = trussinfo->curthread->proc->pid;
usr.bin/truss/syscalls.c
1593
if (get_struct(pid, (uintptr_t)msg->msg_name, &ss,
usr.bin/truss/syscalls.c
1600
if (get_struct(pid, (uintptr_t)msg->msg_iov, &iov, sizeof(iov)) == -1)
usr.bin/truss/syscalls.c
1618
if (ptrace(PT_IO, pid, (caddr_t)&piod, 0) == -1) {
usr.bin/truss/syscalls.c
1645
pid_t pid;
usr.bin/truss/syscalls.c
1648
pid = trussinfo->curthread->proc->pid;
usr.bin/truss/syscalls.c
1665
if (get_struct(pid, args[sc->offset], &val,
usr.bin/truss/syscalls.c
1692
tmp2 = get_string(pid, args[sc->offset], 0);
usr.bin/truss/syscalls.c
1722
if (len && get_struct(pid, args[sc->offset], &tmp2, len)
usr.bin/truss/syscalls.c
1779
if (get_struct(pid, addr, u.buf, len) == -1) {
usr.bin/truss/syscalls.c
1802
string = get_string(pid, straddr, 0);
usr.bin/truss/syscalls.c
1811
if (get_struct(pid, addr, u.buf, len) == -1) {
usr.bin/truss/syscalls.c
1847
if (get_struct(pid, args[sc->offset], &val,
usr.bin/truss/syscalls.c
1862
tmp2 = get_string(pid, args[sc->offset], retval[0]);
usr.bin/truss/syscalls.c
1887
if (get_struct(pid, args[sc->offset], &ts, sizeof(ts)) != -1)
usr.bin/truss/syscalls.c
1899
if (get_struct(pid, args[sc->offset], &ts, sizeof(ts)) != -1) {
usr.bin/truss/syscalls.c
1927
if (get_struct(pid, args[sc->offset], &tv, sizeof(tv)) != -1)
usr.bin/truss/syscalls.c
1937
if (get_struct(pid, args[sc->offset], &tv, sizeof(tv)) != -1)
usr.bin/truss/syscalls.c
1948
if (get_struct(pid, args[sc->offset], &itv, sizeof(itv)) != -1)
usr.bin/truss/syscalls.c
1962
if (get_struct(pid, args[sc->offset], (void *)&largs,
usr.bin/truss/syscalls.c
1985
if (get_struct(pid, args[sc->offset], pfd, bytes) != -1) {
usr.bin/truss/syscalls.c
2012
if (get_struct(pid, args[sc->offset], fds, bytes) != -1) {
usr.bin/truss/syscalls.c
2031
if (get_struct(pid, args[sc->offset], (void *)&ss,
usr.bin/truss/syscalls.c
2117
if (get_struct(pid, args[sc->offset + 1], &len,
usr.bin/truss/syscalls.c
2131
if (get_struct(pid, args[sc->offset], &sa, sizeof(sa)) != -1) {
usr.bin/truss/syscalls.c
2148
if (get_struct(pid, args[sc->offset], &se, sizeof(se)) != -1)
usr.bin/truss/syscalls.c
2180
if (numevents >= 0 && get_struct(pid, args[sc->offset],
usr.bin/truss/syscalls.c
2215
if (numevents >= 0 && get_struct(pid, args[sc->offset],
usr.bin/truss/syscalls.c
2238
if (get_struct(pid, args[sc->offset], &st, sizeof(st))
usr.bin/truss/syscalls.c
2255
if (get_struct(pid, args[sc->offset], &st, sizeof(st))
usr.bin/truss/syscalls.c
2273
if (get_struct(pid, args[sc->offset], &buf,
usr.bin/truss/syscalls.c
2296
if (get_struct(pid, args[sc->offset], &ru, sizeof(ru))
usr.bin/truss/syscalls.c
2310
if (get_struct(pid, args[sc->offset], &rl, sizeof(rl))
usr.bin/truss/syscalls.c
2321
if (get_struct(pid, args[sc->offset], &status,
usr.bin/truss/syscalls.c
2379
if (get_struct(pid, args[sc->offset], oid,
usr.bin/truss/syscalls.c
2397
get_string(pid,
usr.bin/truss/syscalls.c
2447
if (get_struct(pid, args[sc->offset],
usr.bin/truss/syscalls.c
2466
if (get_struct(pid, args[sc->offset],
usr.bin/truss/syscalls.c
2484
if (get_struct(pid, args[sc->offset], &rights,
usr.bin/truss/syscalls.c
2580
if (get_struct(pid, args[sc->offset], &rights,
usr.bin/truss/syscalls.c
2622
if (get_struct(pid, args[sc->offset], &hdtr, sizeof(hdtr)) !=
usr.bin/truss/syscalls.c
2652
if (get_struct(pid, args[sc->offset], &sp, sizeof(sp)) != -1)
usr.bin/truss/syscalls.c
2661
if (get_struct(pid, args[sc->offset], &sig, sizeof(sig)) == 0)
usr.bin/truss/syscalls.c
2670
if (get_struct(pid, args[sc->offset], &si, sizeof(si)) != -1) {
usr.bin/truss/syscalls.c
2690
if (get_struct(pid, args[sc->offset], &cb, sizeof(cb)) != -1)
usr.bin/truss/syscalls.c
2712
if (get_struct(pid, args[sc->offset], cbs, sizeof(uintptr_t) * nent) != -1) {
usr.bin/truss/syscalls.c
2719
if (get_struct(pid, cbs[i], &cb, sizeof(cb)) != -1)
usr.bin/truss/syscalls.c
2739
if (get_struct(pid, args[sc->offset], &cbp, sizeof(cbp)) != -1) {
usr.bin/truss/syscalls.c
2740
if (get_struct(pid, cbp, &cb, sizeof(cb)) != -1)
usr.bin/truss/syscalls.c
2751
if (get_struct(pid, args[sc->offset],
usr.bin/truss/syscalls.c
2762
if (get_struct(pid, args[sc->offset],
usr.bin/truss/syscalls.c
2776
print_cmsgs(fp, pid, sc->type & OUT, &msghdr);
usr.bin/truss/syscalls.c
951
get_struct(pid_t pid, psaddr_t offset, void *buf, size_t len)
usr.bin/truss/syscalls.c
959
if (ptrace(PT_IO, pid, (caddr_t)&iorequest, 0) < 0)
usr.bin/truss/syscalls.c
972
get_string(pid_t pid, psaddr_t addr, int max)
usr.bin/truss/syscalls.c
996
if (ptrace(PT_IO, pid, (caddr_t)&iorequest, 0) < 0) {
usr.bin/truss/truss.h
99
pid_t pid;
usr.bin/xargs/xargs.c
558
pid_t pid;
usr.bin/xargs/xargs.c
594
switch (pid = vfork()) {
usr.bin/xargs/xargs.c
614
pids_add(pid);
usr.bin/xargs/xargs.c
628
pid_t pid;
usr.bin/xargs/xargs.c
635
while ((pid = waitpid(-1, status, block ? 0 : WNOHANG)) > 0)
usr.bin/xargs/xargs.c
636
if (pids_remove(pid))
usr.bin/xargs/xargs.c
639
return (pid);
usr.bin/xargs/xargs.c
651
pid_t pid;
usr.bin/xargs/xargs.c
655
while ((pid = xwait(waitall || pids_full(), &status)) > 0) {
usr.bin/xargs/xargs.c
683
if (pid == -1 && errno != ECHILD)
usr.bin/xargs/xargs.c
70
static void pids_add(pid_t pid);
usr.bin/xargs/xargs.c
71
static int pids_remove(pid_t pid);
usr.bin/xargs/xargs.c
716
pids_add(pid_t pid)
usr.bin/xargs/xargs.c
72
static int findslot(pid_t pid);
usr.bin/xargs/xargs.c
721
childpids[slot] = pid;
usr.bin/xargs/xargs.c
726
pids_remove(pid_t pid)
usr.bin/xargs/xargs.c
730
if ((slot = findslot(pid)) < 0)
usr.bin/xargs/xargs.c
749
findslot(pid_t pid)
usr.bin/xargs/xargs.c
754
if (childpids[slot] == pid)
usr.bin/xinstall/xinstall.c
1279
pid_t pid;
usr.bin/xinstall/xinstall.c
1304
error = posix_spawnp(&pid, stripbin, NULL, NULL,
usr.bin/xinstall/xinstall.c
1312
if (waitpid(pid, &status, 0) == -1) {
usr.sbin/acpi/acpidump/acpi.c
2913
pid_t pid;
usr.sbin/acpi/acpidump/acpi.c
2942
if ((pid = fork()) == 0) {
usr.sbin/acpi/acpidump/acpi.c
2949
if (pid > 0)
usr.sbin/acpi/acpidump/acpi.c
2955
if (pid < 0) {
usr.sbin/apmd/apmd.c
110
pid_t pid;
usr.sbin/apmd/apmd.c
112
switch ((pid = fork())) {
usr.sbin/apmd/apmd.c
126
pid = waitpid(pid, &status, 0);
usr.sbin/apmd/apmd.c
127
} while (pid == -1 && errno == EINTR);
usr.sbin/arp/arp.c
747
static pid_t pid;
usr.sbin/arp/arp.c
761
pid = getpid();
usr.sbin/arp/arp.c
817
rtm->rtm_pid != pid));
usr.sbin/autofs/automountd.c
393
pid_t pid;
usr.sbin/autofs/automountd.c
402
pid = wait4(-1, &status, 0, NULL);
usr.sbin/autofs/automountd.c
404
pid = wait4(-1, &status, WNOHANG, NULL);
usr.sbin/autofs/automountd.c
405
if (pid <= 0)
usr.sbin/autofs/automountd.c
409
pid, WTERMSIG(status));
usr.sbin/autofs/automountd.c
412
pid, WEXITSTATUS(status));
usr.sbin/autofs/automountd.c
414
log_debugx("child process %d terminated gracefully", pid);
usr.sbin/autofs/automountd.c
435
pid_t pid, otherpid;
usr.sbin/autofs/automountd.c
551
pid = fork();
usr.sbin/autofs/automountd.c
552
if (pid < 0)
usr.sbin/autofs/automountd.c
554
if (pid > 0)
usr.sbin/autofs/popen.c
112
switch (pid = fork()) {
usr.sbin/autofs/popen.c
131
log_debugx("executing \"%s\" as pid %d", command, pid);
usr.sbin/autofs/popen.c
139
cur->pid = pid;
usr.sbin/autofs/popen.c
148
struct pid *cur, *last = NULL;
usr.sbin/autofs/popen.c
150
pid_t pid;
usr.sbin/autofs/popen.c
171
pid = wait4(cur->pid, &status, 0, NULL);
usr.sbin/autofs/popen.c
172
} while (pid == -1 && errno == EINTR);
usr.sbin/autofs/popen.c
176
cur->command, pid, WTERMSIG(status));
usr.sbin/autofs/popen.c
182
cur->command, pid, WEXITSTATUS(status));
usr.sbin/autofs/popen.c
186
log_debugx("\"%s\", pid %d, terminated gracefully", cur->command, pid);
usr.sbin/autofs/popen.c
191
return (pid == -1 ? -1 : status);
usr.sbin/autofs/popen.c
59
SLIST_ENTRY(pid) next;
usr.sbin/autofs/popen.c
61
pid_t pid;
usr.sbin/autofs/popen.c
64
static SLIST_HEAD(, pid) pidlist = SLIST_HEAD_INITIALIZER(pidlist);
usr.sbin/autofs/popen.c
77
struct pid *cur, *p;
usr.sbin/autofs/popen.c
78
pid_t pid;
usr.sbin/autofs/popen.c
90
cur = malloc(sizeof(struct pid));
usr.sbin/bluetooth/bthidd/bthidd.c
190
FILE *pid;
usr.sbin/bluetooth/bthidd/bthidd.c
194
if ((pid = fopen(file, "w")) == NULL) {
usr.sbin/bluetooth/bthidd/bthidd.c
200
fprintf(pid, "%d", getpid());
usr.sbin/bluetooth/bthidd/bthidd.c
201
fclose(pid);
usr.sbin/bluetooth/hcsecd/hcsecd.c
142
FILE *pid = NULL;
usr.sbin/bluetooth/hcsecd/hcsecd.c
144
if ((pid = fopen(HCSECD_PIDFILE, "w")) == NULL) {
usr.sbin/bluetooth/hcsecd/hcsecd.c
150
fprintf(pid, "%d", getpid());
usr.sbin/bluetooth/hcsecd/hcsecd.c
151
fclose(pid);
usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
336
pid = fork();
usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
337
if (pid == (pid_t) -1) {
usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
343
if (pid == 0) {
usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
70
pid_t pid;
usr.sbin/bluetooth/sdpd/sar.c
285
if (((sdp_pdu_p)(srv->req))->pid == SDP_PDU_SERVICE_ATTRIBUTE_REQUEST)
usr.sbin/bluetooth/sdpd/sar.c
286
pdu.pid = SDP_PDU_SERVICE_ATTRIBUTE_RESPONSE;
usr.sbin/bluetooth/sdpd/sar.c
288
pdu.pid = SDP_PDU_SERVICE_SEARCH_ATTRIBUTE_RESPONSE;
usr.sbin/bluetooth/sdpd/server.c
437
switch (pdu->pid) {
usr.sbin/bluetooth/sdpd/server.c
470
switch (pdu->pid) {
usr.sbin/bluetooth/sdpd/server.c
504
pdu->pid, ntohs(pdu->tid), error);
usr.sbin/bluetooth/sdpd/server.c
510
pdu->pid, ntohs(pdu->tid), pdu->len, len, error);
usr.sbin/bluetooth/sdpd/server.c
517
pdu->pid, ntohs(pdu->tid), error);
usr.sbin/bluetooth/sdpd/server.c
545
rsp.pdu.pid = SDP_PDU_ERROR_RESPONSE;
usr.sbin/bluetooth/sdpd/srr.c
122
pdu.pid = SDP_PDU_ERROR_RESPONSE;
usr.sbin/bluetooth/sdpd/ssr.c
253
pdu.pid = SDP_PDU_SERVICE_SEARCH_RESPONSE;
usr.sbin/boottrace/boottrace.c
50
pid_t pid;
usr.sbin/boottrace/boottrace.c
58
pid = fork();
usr.sbin/boottrace/boottrace.c
59
if (pid == -1) {
usr.sbin/boottrace/boottrace.c
61
} else if (pid == 0) {
usr.sbin/boottrace/boottrace.c
65
waitpid(pid, &status, 0);
usr.sbin/bsdinstall/runconsoles/child.c
106
pid_t pid;
usr.sbin/bsdinstall/runconsoles/child.c
110
while ((void)(pid = waitpid(-1, &status, WNOHANG)),
usr.sbin/bsdinstall/runconsoles/child.c
111
pid != -1 && pid != 0) {
usr.sbin/bsdinstall/runconsoles/child.c
113
if (pid == grandchild_pid) {
usr.sbin/bsdinstall/runconsoles/child.c
125
if (pid == -1 && errno == ECHILD && grandchild_pid == 0)
usr.sbin/bsdinstall/runconsoles/child.c
225
pid_t pid, sid, pgid;
usr.sbin/bsdinstall/runconsoles/child.c
345
pid = fork();
usr.sbin/bsdinstall/runconsoles/child.c
346
if (pid == -1)
usr.sbin/bsdinstall/runconsoles/child.c
349
if (pid == 0) {
usr.sbin/bsdinstall/runconsoles/child.c
364
grandchild_pid = pid;
usr.sbin/bsdinstall/runconsoles/runconsoles.c
115
if (consinfo->pid != -1 && consinfo->pid != 0)
usr.sbin/bsdinstall/runconsoles/runconsoles.c
116
kill(consinfo->pid, sig);
usr.sbin/bsdinstall/runconsoles/runconsoles.c
183
if (consinfo->pid != -1) {
usr.sbin/bsdinstall/runconsoles/runconsoles.c
201
sigchld_handler_reaped_one(pid_t pid, int status)
usr.sbin/bsdinstall/runconsoles/runconsoles.c
213
if (consinfo->pid == pid)
usr.sbin/bsdinstall/runconsoles/runconsoles.c
215
else if (consinfo->pid != -1 && consinfo->pid != 0)
usr.sbin/bsdinstall/runconsoles/runconsoles.c
222
child_consinfo->pid = 0;
usr.sbin/bsdinstall/runconsoles/runconsoles.c
240
pid_t pid;
usr.sbin/bsdinstall/runconsoles/runconsoles.c
243
while ((void)(pid = waitpid(-1, &status, WNOHANG)),
usr.sbin/bsdinstall/runconsoles/runconsoles.c
244
pid != -1 && pid != 0)
usr.sbin/bsdinstall/runconsoles/runconsoles.c
245
sigchld_handler_reaped_one(pid, status);
usr.sbin/bsdinstall/runconsoles/runconsoles.c
364
consinfo->pid = -1;
usr.sbin/bsdinstall/runconsoles/runconsoles.c
391
pid_t pid;
usr.sbin/bsdinstall/runconsoles/runconsoles.c
401
pid = fork();
usr.sbin/bsdinstall/runconsoles/runconsoles.c
402
if (pid == -1)
usr.sbin/bsdinstall/runconsoles/runconsoles.c
405
if (pid == 0) {
usr.sbin/bsdinstall/runconsoles/runconsoles.c
422
consinfo->pid = pid;
usr.sbin/bsdinstall/runconsoles/runconsoles.c
82
volatile pid_t pid;
usr.sbin/cron/cron/cron.c
468
PID_T pid;
usr.sbin/cron/cron/cron.c
471
pid = waitpid(-1, &waiter, WNOHANG);
usr.sbin/cron/cron/cron.c
472
switch (pid) {
usr.sbin/cron/cron/cron.c
482
find_interval_entry(pid);
usr.sbin/cron/cron/cron.c
485
getpid(), pid, WEXITSTATUS(waiter)))
usr.sbin/cron/cron/cron.c
554
find_interval_entry(pid_t pid)
usr.sbin/cron/cron/cron.c
561
if ((e->flags & INTERVAL) && e->child == pid) {
usr.sbin/cron/cron/do_command.c
100
log_it(usernm, pid, "CRED-DELETE",
usr.sbin/cron/cron/do_command.c
44
pid_t pid;
usr.sbin/cron/cron/do_command.c
53
switch ((pid = fork())) {
usr.sbin/cron/cron/do_command.c
69
"returning to work\n", getpid(), pid))
usr.sbin/cron/cron/do_command.c
72
e->child = pid;
usr.sbin/cron/cron/do_command.c
783
PID_T pid;
usr.sbin/cron/cron/do_command.c
789
while ((pid = waitpid(childpid, &waiter, 0)) < 0 && errno == EINTR)
usr.sbin/cron/cron/do_command.c
791
while ((pid = wait4(childpid, &waiter, 0, NULL)) < 0 && errno == EINTR)
usr.sbin/cron/cron/do_command.c
795
if (pid < OK)
usr.sbin/cron/cron/do_command.c
799
getpid(), name, pid, WEXITSTATUS(waiter)))
usr.sbin/cron/cron/do_command.c
82
char ***pam_envp, const char *usernm, pid_t pid, int log_errors,
usr.sbin/cron/cron/do_command.c
92
log_it(usernm, pid, "SESSION-CLOSE",
usr.sbin/cron/cron/popen.c
104
switch(pid = fork()) {
usr.sbin/cron/cron/popen.c
202
pids[fileno(iop)] = pid;
usr.sbin/cron/cron/popen.c
212
*pidptr = pid;
usr.sbin/cron/cron/popen.c
223
PID_T pid;
usr.sbin/cron/cron/popen.c
233
while ((pid = wait(&stat_loc)) != pids[fdes] && pid != -1)
usr.sbin/cron/cron/popen.c
237
return (pid == -1 ? -1 : WEXITSTATUS(stat_loc));
usr.sbin/cron/cron/popen.c
55
PID_T pid;
usr.sbin/cron/crontab/crontab.c
311
PID_T pid, xpid;
usr.sbin/cron/crontab/crontab.c
388
switch (pid = fork()) {
usr.sbin/cron/crontab/crontab.c
419
if (xpid != pid) {
usr.sbin/cron/crontab/crontab.c
420
warnx("wrong PID (%d != %d) from \"%s\"", xpid, pid, editor);
usr.sbin/cron/lib/misc.c
375
PID_T pid = xpid;
usr.sbin/cron/lib/misc.c
414
t->tm_sec, pid, event, detail);
usr.sbin/cron/lib/misc.c
451
username, pid, event, detail);
usr.sbin/ctld/ctld.cc
2299
pid_t pid;
usr.sbin/ctld/ctld.cc
2308
pid = wait4(-1, &status, 0, NULL);
usr.sbin/ctld/ctld.cc
2310
pid = wait4(-1, &status, WNOHANG, NULL);
usr.sbin/ctld/ctld.cc
2311
if (pid <= 0)
usr.sbin/ctld/ctld.cc
2315
pid, WTERMSIG(status));
usr.sbin/ctld/ctld.cc
2318
pid, WEXITSTATUS(status));
usr.sbin/ctld/ctld.cc
2320
log_debugx("child process %d terminated gracefully", pid);
usr.sbin/ctld/ctld.cc
2334
pid_t pid;
usr.sbin/ctld/ctld.cc
2357
pid = fork();
usr.sbin/ctld/ctld.cc
2358
if (pid < 0)
usr.sbin/ctld/ctld.cc
2360
if (pid > 0)
usr.sbin/daemon/daemon.c
438
state->pid = fork();
usr.sbin/daemon/daemon.c
441
switch (state->pid) {
usr.sbin/daemon/daemon.c
457
setproctitle("%s[%d]", state->title, (int)state->pid);
usr.sbin/daemon/daemon.c
483
state->pid = -1;
usr.sbin/daemon/daemon.c
499
if (state->pid > 0) {
usr.sbin/daemon/daemon.c
500
kill(state->pid, SIGTERM);
usr.sbin/daemon/daemon.c
805
.pid = 0,
usr.sbin/daemon/daemon.c
85
int pid;
usr.sbin/daemon/daemon.c
868
if (state->pid == who && (WIFEXITED(status) ||
usr.sbin/dconschat/dconschat.c
212
pid_t pid;
usr.sbin/dconschat/dconschat.c
216
pid = fork();
usr.sbin/dconschat/dconschat.c
217
if (pid < 0) {
usr.sbin/dconschat/dconschat.c
223
if (pid == 0) {
usr.sbin/edquota/edquota.c
420
int pid, status;
usr.sbin/edquota/edquota.c
424
if ((pid = fork()) < 0) {
usr.sbin/edquota/edquota.c
437
if (pid == 0) {
usr.sbin/edquota/edquota.c
450
waitpid(pid, &status, 0);
usr.sbin/getpmac/getpmac.c
103
error = mac_get_pid(pid, label);
usr.sbin/getpmac/getpmac.c
62
pid_t pid;
usr.sbin/getpmac/getpmac.c
66
pid = 0;
usr.sbin/getpmac/getpmac.c
78
pid = atoi(argv[optind - 1]);
usr.sbin/inetd/inetd.c
225
static void addchild_conn(struct conninfo *conn, pid_t pid);
usr.sbin/inetd/inetd.c
226
static void reapchild_conn(pid_t pid);
usr.sbin/inetd/inetd.c
231
static struct procinfo *search_proc(pid_t pid, int add);
usr.sbin/inetd/inetd.c
2423
addchild_conn(struct conninfo *conn, pid_t pid)
usr.sbin/inetd/inetd.c
2430
if ((proc = search_proc(pid, 1)) != NULL) {
usr.sbin/inetd/inetd.c
2443
reapchild_conn(pid_t pid)
usr.sbin/inetd/inetd.c
2449
if ((proc = search_proc(pid, 0)) == NULL)
usr.sbin/inetd/inetd.c
2523
search_proc(pid_t pid, int add)
usr.sbin/inetd/inetd.c
2528
hv = hashval((char *)&pid, sizeof(pid));
usr.sbin/inetd/inetd.c
2530
if (proc->pr_pid == pid)
usr.sbin/inetd/inetd.c
2538
proc->pr_pid = pid;
usr.sbin/inetd/inetd.c
324
pid_t pid;
usr.sbin/inetd/inetd.c
674
pid = 0;
usr.sbin/inetd/inetd.c
708
pid = fork();
usr.sbin/inetd/inetd.c
710
if (pid < 0) {
usr.sbin/inetd/inetd.c
720
if (pid) {
usr.sbin/inetd/inetd.c
721
addchild_conn(conn, pid);
usr.sbin/inetd/inetd.c
722
addchild(sep, pid);
usr.sbin/inetd/inetd.c
725
if (pid == 0) {
usr.sbin/inetd/inetd.c
907
addchild(struct servtab *sep, pid_t pid)
usr.sbin/inetd/inetd.c
923
sc->sc_pid = pid;
usr.sbin/inetd/inetd.c
934
pid_t pid;
usr.sbin/inetd/inetd.c
939
pid = wait3(&status, WNOHANG, (struct rusage *)0);
usr.sbin/inetd/inetd.c
940
if (pid <= 0)
usr.sbin/inetd/inetd.c
943
warnx("%d reaped, %s %u", pid,
usr.sbin/inetd/inetd.c
949
if (sc->sc_pid == pid)
usr.sbin/inetd/inetd.c
962
sep->se_server, pid,
usr.sbin/inetd/inetd.c
968
reapchild_conn(pid);
usr.sbin/iscsid/iscsid.c
660
pid_t pid;
usr.sbin/iscsid/iscsid.c
669
pid = wait4(-1, &status, 0, NULL);
usr.sbin/iscsid/iscsid.c
671
pid = wait4(-1, &status, WNOHANG, NULL);
usr.sbin/iscsid/iscsid.c
672
if (pid <= 0)
usr.sbin/iscsid/iscsid.c
676
pid, WTERMSIG(status));
usr.sbin/iscsid/iscsid.c
679
pid, WEXITSTATUS(status));
usr.sbin/iscsid/iscsid.c
681
log_debugx("child process %d terminated gracefully", pid);
usr.sbin/iscsid/iscsid.c
696
pid_t pid, otherpid;
usr.sbin/iscsid/iscsid.c
794
pid = fork();
usr.sbin/iscsid/iscsid.c
795
if (pid < 0)
usr.sbin/iscsid/iscsid.c
797
if (pid > 0)
usr.sbin/jail/command.c
297
pid_t pid;
usr.sbin/jail/command.c
62
pid_t pid;
usr.sbin/jail/command.c
70
static int add_proc(struct cfjail *j, pid_t pid);
usr.sbin/jail/command.c
72
static struct cfjail *find_proc(pid_t pid);
usr.sbin/jail/command.c
727
pid = fork();
usr.sbin/jail/command.c
728
if (pid < 0)
usr.sbin/jail/command.c
730
if (pid > 0) {
usr.sbin/jail/command.c
731
if (bg || !add_proc(j, pid)) {
usr.sbin/jail/command.c
837
add_proc(struct cfjail *j, pid_t pid)
usr.sbin/jail/command.c
845
EV_SET(&ke, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL);
usr.sbin/jail/command.c
853
ph->pid = pid;
usr.sbin/jail/command.c
854
LIST_INSERT_HEAD(&phash[pid % PHASH_SIZE], ph, le);
usr.sbin/jail/command.c
892
EV_SET(&ke, ph->pid, EVFILT_PROC, EV_DELETE,
usr.sbin/jail/command.c
904
find_proc(pid_t pid)
usr.sbin/jail/command.c
909
LIST_FOREACH(ph, &phash[pid % PHASH_SIZE], le)
usr.sbin/jail/command.c
910
if (ph->pid == pid) {
usr.sbin/lpr/lpc/cmds.c
277
pid_t pid;
usr.sbin/lpr/lpc/cmds.c
311
pid = atoi(line);
usr.sbin/lpr/lpc/cmds.c
312
if (pid < 0) {
usr.sbin/lpr/lpc/cmds.c
322
killres = kill(pid, SIGTERM);
usr.sbin/lpr/lpc/cmds.c
327
printf("\tdaemon (pid %d) killed\n", pid);
usr.sbin/lpr/lpc/cmds.c
332
printf("\tWarning: daemon (pid %d) not killed:\n", pid);
usr.sbin/lpr/lpd/lpd.c
244
pid_t pid;
usr.sbin/lpr/lpd/lpd.c
246
pid = fork();
usr.sbin/lpr/lpd/lpd.c
247
if (pid < 0) {
usr.sbin/lpr/lpd/lpd.c
249
} else if (pid == 0) { /* child */
usr.sbin/lpr/lpd/lpd.c
253
if (waitpid(pid, &status, 0) < 0) {
usr.sbin/lpr/lpd/lpd.c
592
int pid, status, more;
usr.sbin/lpr/lpd/lpd.c
605
if ((pid = fork()) < 0) {
usr.sbin/lpr/lpd/lpd.c
610
if (pid == 0) {
usr.sbin/ndp/ndp.c
121
static pid_t pid;
usr.sbin/ndp/ndp.c
201
pid = getpid();
usr.sbin/ndp/ndp.c
985
rtm->rtm_pid != pid));
usr.sbin/nfscbd/nfscbd.c
106
pid_t pid;
usr.sbin/nfscbd/nfscbd.c
200
pid = fork();
usr.sbin/nfscbd/nfscbd.c
201
if (pid < 0) {
usr.sbin/nfscbd/nfscbd.c
204
} else if (pid > 0) {
usr.sbin/nfscbd/nfscbd.c
205
children = pid;
usr.sbin/nfscbd/nfscbd.c
332
pid_t pid;
usr.sbin/nfscbd/nfscbd.c
334
while ((pid = wait3(NULL, WNOHANG, NULL)) > 0) {
usr.sbin/nfscbd/nfscbd.c
335
if (pid == children)
usr.sbin/nfsd/nfsd.c
168
pid_t pid, otherpid;
usr.sbin/nfsd/nfsd.c
505
pid = fork();
usr.sbin/nfsd/nfsd.c
506
if (pid == -1) {
usr.sbin/nfsd/nfsd.c
510
if (pid) {
usr.sbin/nfsd/nfsd.c
511
children[0] = pid;
usr.sbin/nfsd/nfsd.c
980
pid_t pid;
usr.sbin/nfsd/nfsd.c
983
while ((pid = wait3(NULL, WNOHANG, NULL)) > 0) {
usr.sbin/nfsd/nfsd.c
985
if (pid == children[i])
usr.sbin/nscd/nscd.c
599
pid_t pid;
usr.sbin/nscd/nscd.c
691
if (sscanf(pidbuf, "%d", &pid) != 1)
usr.sbin/nscd/nscd.c
693
LOG_MSG_1("main", "daemon PID is %d", pid);
usr.sbin/nscd/nscd.c
739
pidfile = pidfile_open(DEFAULT_PIDFILE_PATH, 0644, &pid);
usr.sbin/nscd/nscd.c
743
pid);
usr.sbin/pkg/pkg.c
225
pid_t pid;
usr.sbin/pkg/pkg.c
227
switch ((pid = fork())) {
usr.sbin/pkg/pkg.c
242
while (waitpid(pid, &pstat, 0) == -1)
usr.sbin/pmcstat/pmcstat.c
174
int n, nproc, pid, rv;
usr.sbin/pmcstat/pmcstat.c
182
pid = strtol(spec, &end, 0);
usr.sbin/pmcstat/pmcstat.c
183
if (end != spec && pid >= 0) {
usr.sbin/pmcstat/pmcstat.c
186
pt->pt_pid = pid;
usr.sbin/pmcstudy/pmcstudy.c
126
*p_pid = pid;
usr.sbin/pmcstudy/pmcstudy.c
152
pid_t pid;
usr.sbin/pmcstudy/pmcstudy.c
161
pid = wait4(the_pid, &pstat, 0, (struct rusage *)0);
usr.sbin/pmcstudy/pmcstudy.c
162
} while (pid == -1 && errno == EINTR);
usr.sbin/pmcstudy/pmcstudy.c
70
pid_t pid;
usr.sbin/pmcstudy/pmcstudy.c
96
switch (pid = fork()) {
usr.sbin/ppp/bundle.c
1384
pid_t pid;
usr.sbin/ppp/bundle.c
1480
pid = getpid();
usr.sbin/ppp/bundle.c
1481
if ((got = write(fd[1], &pid, sizeof pid)) != sizeof pid) {
usr.sbin/ppp/bundle.c
1486
(int)(sizeof pid));
usr.sbin/ppp/bundle.c
1720
pid_t pid, orig;
usr.sbin/ppp/bundle.c
1740
switch ((pid = fork())) {
usr.sbin/ppp/bundle.c
1754
switch ((pid = fork())) {
usr.sbin/ppp/bundle.c
1777
physical_ChangedPid(dl->physical, pid);
usr.sbin/ppp/bundle.c
1789
physical_ChangedPid(dl->physical, pid);
usr.sbin/ppp/bundle.c
1808
waitpid(pid, &status, 0);
usr.sbin/ppp/chap.c
261
pid_t pid;
usr.sbin/ppp/chap.c
280
pid = getpid();
usr.sbin/ppp/chap.c
281
switch ((chap->child.pid = fork())) {
usr.sbin/ppp/chap.c
288
chap->child.pid = 0;
usr.sbin/ppp/chap.c
320
chap->auth.physical->dl->bundle, 0, pid);
usr.sbin/ppp/chap.c
344
if (chap->child.pid) {
usr.sbin/ppp/chap.c
350
kill(chap->child.pid, SIGTERM);
usr.sbin/ppp/chap.c
351
chap->child.pid = 0;
usr.sbin/ppp/chap.c
676
chap->child.pid = 0;
usr.sbin/ppp/chap.h
42
pid_t pid;
usr.sbin/ppp/chat.c
715
pid_t pid;
usr.sbin/ppp/chat.c
735
if ((pid = fork()) == 0) {
usr.sbin/ppp/chat.c
771
waitpid(pid, &stat, WNOHANG);
usr.sbin/ppp/command.c
522
struct bundle *bundle, int inc0, pid_t pid)
usr.sbin/ppp/command.c
598
nargv[arg] = substlong(nargv[arg], "PROCESSID", pid);
usr.sbin/ppp/command.c
624
pid_t shpid, pid;
usr.sbin/ppp/command.c
650
pid = getpid();
usr.sbin/ppp/command.c
684
command_Expand(argv, argc, arg->argv + arg->argn, arg->bundle, 0, pid);
usr.sbin/ppp/exec.c
268
pid_t pid, realpid;
usr.sbin/ppp/exec.c
284
} else switch ((pid = fork())) {
usr.sbin/ppp/exec.c
303
switch ((pid = vfork())) {
usr.sbin/ppp/exec.c
316
write(pidpipe[1], &pid, sizeof pid);
usr.sbin/ppp/exec.c
351
while ((wret = waitpid(pid, &stat, 0)) == -1 && errno == EINTR)
usr.sbin/ppp/id.c
254
ID0kill(pid_t pid, int sig)
usr.sbin/ppp/id.c
259
result = kill(pid, sig);
usr.sbin/ppp/id.c
260
log_Printf(LogID0, "%d = kill(%ld, %d)\n", result, (long)pid, sig);
usr.sbin/pw/pw_user.c
690
pid_t pid;
usr.sbin/pw/pw_user.c
701
if (posix_spawn(&pid, argv[0], NULL, NULL,
usr.sbin/pw/pw_user.c
706
(void) waitpid(pid, NULL, 0);
usr.sbin/pw/pw_user.c
942
pid_t pid;
usr.sbin/pw/pw_user.c
944
if (posix_spawnp(&pid, argv[0], NULL, NULL,
usr.sbin/pw/pw_user.c
949
(void) waitpid(pid, NULL, 0);
usr.sbin/pw/pw_utils.c
78
pid_t pid;
usr.sbin/pw/pw_utils.c
82
if ((pid = fork()) == -1) {
usr.sbin/pw/pw_utils.c
86
if (pid == 0) {
usr.sbin/pw/pw_utils.c
90
waitpid(pid, &i, 0);
usr.sbin/pw/pwupd.c
56
pid_t pid;
usr.sbin/pw/pwupd.c
69
if ((pid = fork()) == -1) /* Error (errno set) */
usr.sbin/pw/pwupd.c
71
else if (pid == 0) { /* Child */
usr.sbin/pw/pwupd.c
75
waitpid(pid, &i, 0);
usr.sbin/pw/rm_r.c
132
pid_t pid;
usr.sbin/pw/rm_r.c
157
if ((skipped = posix_spawn(&pid, argv[0], NULL, NULL,
usr.sbin/pw/rm_r.c
162
if (waitpid(pid, &status, 0) != -1 && status != 0) {
usr.sbin/rarpd/rarpd.c
715
static pid_t pid;
usr.sbin/rarpd/rarpd.c
725
pid = getpid();
usr.sbin/rarpd/rarpd.c
751
rt->rtm_pid != pid));
usr.sbin/rarpd/rarpd.c
800
rt->rtm_pid != pid));
usr.sbin/route6d/route6d.c
175
static pid_t pid;
usr.sbin/route6d/route6d.c
1787
if (rtm->rtm_pid == pid) {
usr.sbin/route6d/route6d.c
2839
rtm->rtm_pid = pid;
usr.sbin/route6d/route6d.c
2907
rtm->rtm_pid = pid;
usr.sbin/route6d/route6d.c
291
pid = getpid();
usr.sbin/route6d/route6d.c
2987
rtm->rtm_pid != pid);
usr.sbin/route6d/route6d.c
424
pid = getpid();
usr.sbin/route6d/route6d.c
426
fprintf(pidfh, "%d\n", pid);
usr.sbin/rpc.lockd/kern.c
160
owner.pid = getpid();
usr.sbin/rpc.lockd/kern.c
212
(u_long)msg.lm_msg_ident.pid);
usr.sbin/rpc.lockd/kern.c
290
arg4.alock.svid = msg->lm_msg_ident.pid;
usr.sbin/rpc.lockd/kern.c
314
arg.alock.svid = msg->lm_msg_ident.pid;
usr.sbin/rpc.lockd/kern.c
360
arg4.alock.svid = msg->lm_msg_ident.pid;
usr.sbin/rpc.lockd/kern.c
385
arg.alock.svid = msg->lm_msg_ident.pid;
usr.sbin/rpc.lockd/kern.c
430
arg4.alock.svid = msg->lm_msg_ident.pid;
usr.sbin/rpc.lockd/kern.c
451
arg.alock.svid = msg->lm_msg_ident.pid;
usr.sbin/rpc.lockd/kern.c
470
lock_answer(int pid, netobj *netcookie, int result, int *pid_p, int version)
usr.sbin/rpc.lockd/kern.c
475
if (pid == -1) { /* we're screwed */
usr.sbin/rpc.lockd/kern.c
479
ans.la_msg_ident.pid = pid;
usr.sbin/rpc.lockd/kern.c
488
(unsigned long)ans.la_msg_ident.pid,
usr.sbin/rpc.lockd/kern.c
571
"process %lu: %m", (u_long)ans.la_msg_ident.pid);
usr.sbin/rpc.lockd/kern.c
588
syslog(LOG_DEBUG, "process ID: %lu\n", (long)mp->lm_msg_ident.pid);
usr.sbin/rpc.lockd/kern.c
67
pid_t pid; /* Process ID. */
usr.sbin/rpc.lockd/lockd_lock.h
10
int lock_answer(int pid, netobj *netcookie, int result, int *pid_p,
usr.sbin/rpc.statd/file.c
306
pid_t pid;
usr.sbin/rpc.statd/file.c
320
pid = fork();
usr.sbin/rpc.statd/file.c
321
if (pid == -1)
usr.sbin/rpc.statd/file.c
326
if (pid) return;
usr.sbin/rpc.statd/procs.c
389
pid_t pid;
usr.sbin/rpc.statd/procs.c
404
pid = fork();
usr.sbin/rpc.statd/procs.c
405
if (pid == -1)
usr.sbin/rpc.statd/procs.c
410
if (pid) return (&dummy); /* Parent returns */
usr.sbin/rpc.statd/statd.c
644
int pid, status;
usr.sbin/rpc.statd/statd.c
645
pid = wait4(-1, &status, WNOHANG, (struct rusage*)0);
usr.sbin/rpc.statd/statd.c
646
if (!pid) syslog(LOG_ERR, "Phantom SIGCHLD??");
usr.sbin/rpc.statd/statd.c
649
if (debug) syslog(LOG_DEBUG, "Child %d exited OK", pid);
usr.sbin/rpc.statd/statd.c
651
else syslog(LOG_ERR, "Child %d failed with status %d", pid,
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
474
int pid;
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
683
switch ((pid = fork())) {
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
740
int pid;
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
911
switch ((pid = fork())) {
usr.sbin/rpc.ypupdated/update.c
100
pid = _openchild(updater, &childargs, &childrslt);
usr.sbin/rpc.ypupdated/update.c
101
if (pid < 0) {
usr.sbin/rpc.ypupdated/update.c
141
pid_t pid;
usr.sbin/rpc.ypupdated/update.c
153
switch (pid = fork()) {
usr.sbin/rpc.ypupdated/update.c
187
return (pid);
usr.sbin/rpc.ypupdated/update.c
91
pid_t pid;
usr.sbin/rpc.ypupdated/yp_dbupdate.c
54
int pid;
usr.sbin/rpc.ypupdated/yp_dbupdate.c
56
switch ((pid = fork())) {
usr.sbin/rpc.ypupdated/ypupdated_main.c
130
int pid;
usr.sbin/rpc.ypupdated/ypupdated_main.c
134
pid = getpid();
usr.sbin/rpc.ypupdated/ypupdated_main.c
154
if (forked && pid != getpid())
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
133
int pid;
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
137
pid = getpid();
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
157
if (forked && pid != getpid())
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
232
int pid, i;
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
234
pid = fork();
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
235
if (pid < 0)
usr.sbin/rpc.ypxfrd/ypxfrd_main.c
237
if (pid)
usr.sbin/rtadvd/rtadvd.c
187
pid_t pid, otherpid;
usr.sbin/rtadvd/rtadvd.c
273
pid = getpid();
usr.sbin/rtsold/cap_script.c
59
pid_t pid;
usr.sbin/rtsold/cap_script.c
64
if ((pid = fork()) < 0)
usr.sbin/rtsold/cap_script.c
66
if (pid == 0) {
usr.sbin/sndctl/sndctl.c
185
{ "pid", F(pid), NUM, NULL },
usr.sbin/sndctl/sndctl.c
586
ch->pid = NV(number, PID);
usr.sbin/sndctl/sndctl.c
68
int pid;
usr.sbin/syslogd/syslogd.c
3369
pid_t pid;
usr.sbin/syslogd/syslogd.c
3375
pid = fork();
usr.sbin/syslogd/syslogd.c
3376
if (pid == -1) {
usr.sbin/syslogd/syslogd.c
3379
} else if (pid > 0) {
usr.sbin/syslogd/syslogd.c
3388
if (waitpid(pid, &status, WNOHANG) > 0) {
usr.sbin/syslogd/syslogd.c
3391
pid, WEXITSTATUS(status));
usr.sbin/syslogd/syslogd.c
3394
pid, WTERMSIG(status),
usr.sbin/syslogd/syslogd.c
3716
pid_t pid;
usr.sbin/syslogd/syslogd.c
3722
switch ((pid = pdfork(&pd, PD_CLOEXEC))) {
usr.sbin/syslogd/syslogd.c
3763
"behaviour.", pid);
usr.sbin/syslogd/syslogd.c
3799
pid_t pid;
usr.sbin/syslogd/syslogd.c
3814
if (pdgetpid(pd, &pid) == -1)
usr.sbin/syslogd/syslogd.c
3818
pid, f->f_pname, reason, code);
usr.sbin/traceroute/findsaddr-socket.c
105
pid = getpid();
usr.sbin/traceroute/findsaddr-socket.c
141
rp->rtm_pid != pid);
usr.sbin/traceroute/findsaddr-socket.c
95
register pid_t pid;
usr.sbin/uefisign/uefisign.c
322
wait_for_child(pid_t pid)
usr.sbin/uefisign/uefisign.c
326
pid = waitpid(pid, &status, 0);
usr.sbin/uefisign/uefisign.c
327
if (pid == -1)
usr.sbin/uefisign/uefisign.c
342
pid_t pid;
usr.sbin/uefisign/uefisign.c
407
pid = fork();
usr.sbin/uefisign/uefisign.c
408
if (pid < 0)
usr.sbin/uefisign/uefisign.c
411
if (pid == 0) {
usr.sbin/uefisign/uefisign.c
436
exit(wait_for_child(pid));
usr.sbin/uhsoctl/uhsoctl.c
1319
pid_t pid;
usr.sbin/uhsoctl/uhsoctl.c
1329
n = fscanf(fp, "%d", &pid);
usr.sbin/uhsoctl/uhsoctl.c
1336
fprintf(stderr, "Sending SIGTERM to %d\n", pid);
usr.sbin/uhsoctl/uhsoctl.c
1338
kill(pid, SIGTERM);
usr.sbin/usbconfig/dump.c
453
uint16_t pid;
usr.sbin/usbconfig/dump.c
466
pid = libusb20_dev_get_device_desc(pdev)->idProduct;
usr.sbin/usbconfig/dump.c
479
if (pi->id == pid) {
usr.sbin/usbconfig/dump.c
626
q.vid, q.pid, q.bcdDeviceLow,
usr.sbin/usbconfig/usbconfig.c
168
uint16_t vid, uint16_t pid, uint16_t lorev, uint16_t hirev,
usr.sbin/usbconfig/usbconfig.c
177
q.pid = pid;
usr.sbin/usbconfig/usbconfig.c
190
uint16_t vid, uint16_t pid, uint16_t lorev, uint16_t hirev,
usr.sbin/usbconfig/usbconfig.c
199
q.pid = pid;
usr.sbin/usbconfig/usbconfig.c
348
opt->vid, opt->pid, opt->lo_rev, opt->hi_rev, opt->quirkname);
usr.sbin/usbconfig/usbconfig.c
353
opt->vid, opt->pid, opt->lo_rev, opt->hi_rev, opt->quirkname);
usr.sbin/usbconfig/usbconfig.c
60
uint16_t pid;
usr.sbin/usbconfig/usbconfig.c
660
opt->pid = num_id(argv[n + 2], "Product ID");
usr.sbin/usbconfig/usbconfig.c
675
opt->pid = num_id(argv[n + 2], "Product ID");
usr.sbin/virtual_oss/virtual_oss/main.c
166
vmonitor_alloc(int *pid, vmonitor_head_t *phead)
usr.sbin/virtual_oss/virtual_oss/main.c
175
*pid = 0;
usr.sbin/virtual_oss/virtual_oss/main.c
180
*pid = 0;
usr.sbin/virtual_oss/virtual_oss/main.c
189
*pid = id;
usr.sbin/ypldap/ldapclient.c
348
pid_t pid;
usr.sbin/ypldap/ldapclient.c
355
switch (pid = fork()) {
usr.sbin/ypldap/ldapclient.c
362
return (pid);
usr.sbin/ypldap/ypldap.c
643
pid_t pid, int fd, void *data, u_int16_t datalen)
usr.sbin/ypldap/ypldap.c
648
pid, fd, data, datalen)) != -1)
usr.sbin/ypldap/ypldap.c
75
check_child(pid_t pid, const char *pname)
usr.sbin/ypldap/ypldap.c
79
if (waitpid(pid, &status, WNOHANG) > 0) {
usr.sbin/ypldap/ypldap_dns.c
75
pid_t pid;
usr.sbin/ypldap/ypldap_dns.c
81
switch (pid = fork()) {
usr.sbin/ypldap/ypldap_dns.c
88
return (pid);