# 2.11BSD#431 - /usr/src/sys/h/wait.h

##### Macros

    WAIT_ANY          X
    WAIT_MYPGRP       X
    WEXITSTATUS       X
    WIFEXITED         X
    WIFSIGNALED       X
    WIFSTOPPED        X
    WNOHANG           X
    WSTOPPED          X
    WUNTRACED         X
    W_EXITCODE        X
    W_STOPCODE        X
    w_coredump        X
    w_retcode         X
    w_stopsig         X
    w_stopval         X
    w_termsig         X

##### unions's

    wait              X

       1: /*
       2:  * Copyright (c) 1982, 1986 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)wait.h	7.2.1 (2.11BSD GTE) 1995/06/23
       7:  */
       8:
       9: /*
      10:  * This file holds definitions relevent to the wait system call.
      11:  * Some of the options here are available only through the ``wait3''
      12:  * entry point; the old entry point with one argument has more fixed
      13:  * semantics, never returning status of unstopped children, hanging until
      14:  * a process terminates if any are outstanding, and never returns
      15:  * detailed information about process resource utilization (<vtimes.h>).
      16:  */
      17:
      18: /*
      19:  * Structure of the information in the first word returned by both
      20:  * wait and wait3.  If w_stopval==WSTOPPED, then the second structure
      21:  * describes the information returned, else the first.  See WUNTRACED below.
      22:  */
      23: union wait  {
      24:     int w_status;       /* used in syscall */
      25:     /*
      26: 	 * Terminated process status.
      27: 	 */
      28:     struct {
      29:         unsigned short  w_Termsig:7;    /* termination signal */
      30:         unsigned short  w_Coredump:1;   /* core dump indicator */
      31:         unsigned short  w_Retcode:8;    /* exit code if w_termsig==0 */
      32:     } w_T;
      33:     /*
      34: 	 * Stopped process status.  Returned
      35: 	 * only for traced children unless requested
      36: 	 * with the WUNTRACED option bit.
      37: 	 */
      38:     struct {
      39:         unsigned short  w_Stopval:8;    /* == W_STOPPED if stopped */
      40:         unsigned short  w_Stopsig:8;    /* signal that stopped us */
      41:     } w_S;
      42: };
      43: #define w_termsig   w_T.w_Termsig
      44: #define w_coredump  w_T.w_Coredump
      45: #define w_retcode   w_T.w_Retcode
      46: #define w_stopval   w_S.w_Stopval
      47: #define w_stopsig   w_S.w_Stopsig
      48:
      49:
      50: #define WSTOPPED    0177    /* value of s.stopval if process is stopped */
      51:
      52: /*
      53:  * Option bits for the second argument of wait3.  WNOHANG causes the
      54:  * wait to not hang if there are no stopped or terminated processes, rather
      55:  * returning an error indication in this case (pid==0).  WUNTRACED
      56:  * indicates that the caller should receive status about untraced children
      57:  * which stop due to signals.  If children are stopped and a wait without
      58:  * this option is done, it is as though they were still running... nothing
      59:  * about them is returned.
      60:  */
      61: #define WNOHANG     1   /* dont hang in wait */
      62: #define WUNTRACED   2   /* tell about stopped, untraced children */
      63:
      64: #define WIFSTOPPED(x)   ((x).w_stopval == WSTOPPED)
      65: #define WIFSIGNALED(x)  ((x).w_stopval != WSTOPPED && (x).w_termsig != 0)
      66: #define WIFEXITED(x)    ((x).w_stopval != WSTOPPED && (x).w_termsig == 0)
      67: #define WEXITSTATUS(x)  ((x).w_retcode)
      68:
      69: #define W_STOPCODE(sig) ((sig << 8) | WSTOPPED)
      70: #define W_EXITCODE(ret,sig) ((ret << 8) | (sig))
      71:
      72: #define WAIT_ANY    (-1)
      73: #define WAIT_MYPGRP 0

#### Defined union's

wait defined in line 23; used 80 times

- in /usr/src/bin/csh/sh.proc.c line 36(2)
- in /usr/src/bin/tcsh/sh.proc.c line 170(2)
- in /usr/src/games/hack/hack.pager.c line 390(2)
- in /usr/src/games/sail/pl_1.c line 96(2)
- in /usr/src/lib/libc/gen/popen.c line 111(2)
- in /usr/src/lib/libc/gen/system.c line 46(2)
- in /usr/src/libexec/ftpd/popen.c line 137(2)
- in /usr/src/libexec/identd/src/identd.c line 235(2)
- in /usr/src/libexec/popper/pop_xmit.c line 31(2)
- in /usr/src/local/ddd/ddd.c line 158(2)
- in /usr/src/new/jove/iproc.c line 291(2), 308(2)
- in /usr/src/new/jove/portsrv.c line 147(2)
- in /usr/src/new/jove/proc.c line 501(2)
- in /usr/src/new/kermit5.188/ckcdeb.h line 1009(2)
- in /usr/src/new/nntp/server/netaux.c line 256(2)
- in /usr/src/new/nntp/server/spawn.c line 60(2)
- in /usr/src/new/notes/src/misc.c line 32(2)
- in /usr/src/sbin/fsck/main.c line 151(2)
- in /usr/src/sbin/mount/mount.c line 250(2)
- in /usr/src/sbin/quotacheck/preen.c line 74(2)
- in /usr/src/ucb/Mail/cmd2.c line 365(2)
- in /usr/src/ucb/Mail/fio.c line 305(2)
- in /usr/src/ucb/Mail/popen.c line 256(2), 294(2), 309(2)
- in /usr/src/ucb/PORT/pascal/utilities/pc.c line 465(2)
- in /usr/src/ucb/ftp/cmds.c line 1222(2)
- in /usr/src/ucb/rlogin.c line 245(2)
- in /usr/src/ucb/script.c line 118(2)
- in /usr/src/ucb/window/wwchild.c line 19(2)
- in /usr/src/usr.bin/uucp/uucpd.c line 238(2)
- in /usr/src/usr.bin/xargs/xargs.c line 269(2)
- in /usr/src/usr.sbin/edquota/edquota.c line 312(2)
- in /usr/src/usr.sbin/lpr/lpd.c line 226(2)
- in /usr/src/usr.sbin/lpr/printjob.c line 422(2)
- in /usr/src/usr.sbin/named/named/ns_main.c line 942(2)
- in /usr/src/usr.sbin/sendmail.MX/src/conf.c line 443(2)
- in /usr/src/usr.sbin/sendmail/src/conf.c line 443(2)
- in /usr/src/usr.sbin/syslogd/syslogd.c line 714(2)

#### Defined macros

WAIT_ANY defined in line 72; used 4 times

- in /usr/src/lib/libc/gen/wait.c line 47
- in /usr/src/lib/libc/gen/wait3.c line 49
- in /usr/src/sys/sys/kern_exit.c line 209, 244

WAIT_MYPGRP defined in line 73; used 1 times

- in /usr/src/sys/sys/kern_exit.c line 194

WEXITSTATUS defined in line 67; used 9 times

- in /usr/src/bin/tcsh/sh.proc.c line 90, 273, 343
- in /usr/src/sbin/mount/mount.c line 323-324(2)
- in /usr/src/sbin/quotacheck/preen.c line 128
- in /usr/src/usr.bin/xargs/xargs.c line 296-298(2)
- in /usr/src/usr.sbin/edquota/edquota.c line 345

WIFEXITED defined in line 66; used 7 times

- in /usr/src/new/jove/iproc.c line 320
- in /usr/src/new/jove/portsrv.c line 155
- in /usr/src/sbin/mount/mount.c line 322
- in /usr/src/sbin/quotacheck/preen.c line 127
- in /usr/src/usr.sbin/cron/crontab.c line 407
- in /usr/src/usr.sbin/edquota/edquota.c line 345
- in /usr/src/usr.sbin/lpr/printjob.c line 597

WIFSIGNALED defined in line 65; used 10 times

- in /usr/src/bin/csh/sh.proc.c line 65
- in /usr/src/bin/tcsh/sh.proc.c line 333
- in /usr/src/new/jove/iproc.c line 322
- in /usr/src/new/jove/portsrv.c line 157
- in /usr/src/sbin/mount/mount.c line 325
- in /usr/src/sbin/quotacheck/preen.c line 131
- in /usr/src/ucb/PORT/pascal/utilities/pc.c line 511
- in /usr/src/usr.bin/xargs/xargs.c line 296
- in /usr/src/usr.sbin/cron/crontab.c line 412
- in /usr/src/usr.sbin/cron/do_command.c line 429

WIFSTOPPED defined in line 64; used 6 times

- in /usr/src/bin/csh/sh.proc.c line 58
- in /usr/src/bin/tcsh/sh.proc.c line 308
- in /usr/src/games/sail/pl_1.c line 102
- in /usr/src/new/jove/iproc.c line 316
- in /usr/src/new/notes/src/misc.c line 176
- in /usr/src/ucb/rlogin.c line 255

WNOHANG defined in line 61; used 38 times

- in /usr/src/bin/csh/sh.proc.c line 41(2)
- in /usr/src/bin/tcsh/sh.proc.c line 223-226(4), 232(2), 239-242(4), 250-252(2)
- in /usr/src/games/sail/pl_1.c line 101
- in /usr/src/libexec/comsat/comsat.c line 107
- in /usr/src/libexec/identd/src/identd.c line 240
- in /usr/src/new/jove/iproc.c line 296-298(2)
- in /usr/src/new/nntp/server/netaux.c line 258
- in /usr/src/new/notes/src/misc.c line 171
- in /usr/src/sys/sys/kern_exit.c line 265
- in /usr/src/ucb/Mail/popen.c line 298
- in /usr/src/ucb/rlogin.c line 249
- in /usr/src/ucb/script.c line 122
- in /usr/src/ucb/window/wwchild.c line 23
- in /usr/src/usr.bin/uucp/uucpd.c line 244
- in /usr/src/usr.sbin/cron/cron.c line 236
- in /usr/src/usr.sbin/inetd/inetd.c line 472
- in /usr/src/usr.sbin/lpr/lpd.c line 228
- in /usr/src/usr.sbin/named/named/ns_main.c line 944
- in /usr/src/usr.sbin/sendmail.MX/src/conf.c line 442-447(3)
- in /usr/src/usr.sbin/sendmail/src/conf.c line 442-447(3)
- in /usr/src/usr.sbin/syslogd/syslogd.c line 716

WSTOPPED defined in line 50; used 5 times

- in line 64-69(4)
- in /usr/src/usr.sbin/lpr/printjob.c line 561

WUNTRACED defined in line 62; used 13 times

- in /usr/src/bin/csh/sh.proc.c line 41
- in /usr/src/bin/tcsh/sh.proc.c line 223-226(2), 232, 239-242(2)
- in /usr/src/new/jove/iproc.c line 296-298(2)
- in /usr/src/new/notes/src/misc.c line 171
- in /usr/src/sys/sys/kern_exit.c line 249
- in /usr/src/ucb/rlogin.c line 249
- in /usr/src/ucb/window/wwchild.c line 23
- in /usr/src/usr.sbin/lpr/printjob.c line 559

W_EXITCODE defined in line 70; used 1 times

- in /usr/src/sys/sys/kern_exit.c line 38

W_STOPCODE defined in line 69; used 2 times

- in /usr/src/sys/sys/kern_exit.c line 254-256(2)

w_coredump defined in line 44; used 4 times

- in /usr/src/bin/csh/sh.proc.c line 70
- in /usr/src/bin/tcsh/sh.proc.c line 99
- in /usr/src/ucb/Mail/cmd2.c line 378
- in /usr/src/ucb/PORT/pascal/utilities/pc.c line 514

w_retcode defined in line 45; used 14 times

- in line 67
- in /usr/src/bin/csh/sh.proc.c line 74
- in /usr/src/bin/tcsh/sh.proc.c line 91
- in /usr/src/lib/libc/gen/system.c line 61
- in /usr/src/libexec/popper/pop_xmit.c line 88
- in /usr/src/new/jove/portsrv.c line 156
- in /usr/src/sbin/fsck/main.c line 153
- in /usr/src/ucb/PORT/pascal/utilities/pc.c line 522-526(2)
- in /usr/src/ucb/rlogin.c line 256
- in /usr/src/usr.sbin/lpr/printjob.c line 564, 584, 602, 610

w_stopsig defined in line 47; used 2 times

- in /usr/src/bin/csh/sh.proc.c line 60
- in /usr/src/bin/tcsh/sh.proc.c line 94

w_stopval defined in line 46; used 4 times

- in line 64-66(3)
- in /usr/src/usr.sbin/lpr/printjob.c line 561

w_termsig defined in line 43; used 14 times

- in line 65-66(2)
- in /usr/src/bin/csh/sh.proc.c line 66, 72
- in /usr/src/bin/tcsh/sh.proc.c line 87
- in /usr/src/new/jove/iproc.c line 323
- in /usr/src/new/jove/portsrv.c line 158
- in /usr/src/sbin/mount/mount.c line 326
- in /usr/src/sbin/quotacheck/preen.c line 134
- in /usr/src/ucb/Mail/fio.c line 357
- in /usr/src/ucb/PORT/pascal/utilities/pc.c line 512-513(2)
- in /usr/src/ucb/rlogin.c line 256
- in /usr/src/usr.sbin/lpr/printjob.c line 599

#### Usage of this include

wait.h used 64 times

- in /usr/src/bin/csh/sh.proc.c line 15
- in /usr/src/bin/tcsh/sh.proc.c line 60-64(2), 70
- in /usr/src/bin/tcsh/tc.sig.c line 58-62(2), 68
- in /usr/src/games/hack/hack.pager.c line 366
- in /usr/src/games/sail/pl_1.c line 13
- in /usr/src/games/sail/pl_main.c line 13
- in /usr/src/lib/libc/gen/popen.c line 44
- in /usr/src/lib/libc/gen/system.c line 41
- in /usr/src/lib/libc/gen/wait.c line 40
- in /usr/src/lib/libc/gen/wait3.c line 40
- in /usr/src/lib/libc/gen/waitpid.c line 40
- in /usr/src/libexec/comsat/comsat.c line 27
- in /usr/src/libexec/ftpd/ftpd.c line 34
- in /usr/src/libexec/ftpd/popen.c line 28
- in /usr/src/libexec/identd/src/identd.c line 50
- in /usr/src/libexec/popper/pop_xmit.c line 15
- in /usr/src/libexec/rlogind/rlogind.c line 42
- in /usr/src/libexec/talkd/announce.c line 17
- in /usr/src/libexec/telnetd/telnetd.c line 20
- in /usr/src/libexec/tftpd/tftpd.c line 37
- in /usr/src/local/ddd/ddd.c line 35
- in /usr/src/new/jove/iproc-pipes.c line 9
- in /usr/src/new/jove/iproc-ptys.c line 9
- in /usr/src/new/jove/portsrv.c line 21
- in /usr/src/new/jove/proc.c line 496
- in /usr/src/new/kermit5.188/ckcdeb.h line 1008-1012(2), 1244
- in /usr/src/new/kermit5.188/ckucon.c line 19
- in /usr/src/new/nntp/server/common.h line 33
- in /usr/src/new/nntp/xfer/nntpxfer.c line 30
- in /usr/src/new/notes/src/misc.c line 7
- in /usr/src/sbin/fsck/main.c line 19
- in /usr/src/sbin/mount/mount.c line 44
- in /usr/src/sbin/quotacheck/preen.c line 40
- in /usr/src/sys/sys/kern_exit.c line 20
- in /usr/src/ucb/Mail/cmd2.c line 39
- in /usr/src/ucb/Mail/fio.c line 41
- in /usr/src/ucb/Mail/popen.c line 40
- in /usr/src/ucb/PORT/pascal/utilities/pc.c line 19
- in /usr/src/ucb/ftp/cmds.c line 26
- in /usr/src/ucb/rlogin.c line 22
- in /usr/src/ucb/script.c line 114
- in /usr/src/ucb/window/wwchild.c line 12
- in /usr/src/usr.bin/uucp/uucpd.c line 21
- in /usr/src/usr.bin/xargs/xargs.c line 49
- in /usr/src/usr.bin/xinstall/xinstall.c line 43
- in /usr/src/usr.lib/libident/id_open.c line 27
- in /usr/src/usr.lib/libident/id_parse.c line 24
- in /usr/src/usr.lib/libident/id_query.c line 22
- in /usr/src/usr.sbin/cron/cron.h line 37
- in /usr/src/usr.sbin/edquota/edquota.c line 51
- in /usr/src/usr.sbin/inetd/inetd.c line 95
- in /usr/src/usr.sbin/lpr/lp.h line 25
- in /usr/src/usr.sbin/named/named/ns_main.c line 32
- in /usr/src/usr.sbin/sendmail.MX/src/conf.c line 437
- in /usr/src/usr.sbin/sendmail.MX/src/daemon.c line 23
- in /usr/src/usr.sbin/sendmail/src/conf.c line 437
- in /usr/src/usr.sbin/sendmail/src/daemon.c line 23
- in /usr/src/usr.sbin/syslogd/syslogd.c line 56

Last modified: 1995-06-24 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 863 |