# 2.11BSD#431 - /usr/src/bin/tcsh/tc.sig.h

##### Macros

    HAVE_SIGVEC       X
    NEEDsignal        X
    NSIGSAVED         X
    SAVESIGVEC        X
    SIGCHLD           X
    SIGSYNCH          X
    SIG_WINDOW        X
    SYNCHMASK         X
    _h_tc_sig         X
    killpg            X
    mysigvec          X
    restoresigvec     X
    savesigvec        X
    sighold           X
    sigignore         X
    sigmask           X
    signal            X
    sigpause          X
    sigrelse          X
    sigset            X
    sv_handler        X

##### typedef's

    sigvec_t          X

       1: /* $Header: /home/hyperion/mu/christos/src/sys/tcsh-6.00/RCS/tc.sig.h,v 3.0 1991/07/04 23:34:26 christos Exp $ */
       2: /*
       3:  * tc.sig.h: Signal handling
       4:  *
       5:  */
       6: /*-
       7:  * Copyright (c) 1980, 1991 The Regents of the University of California.
       8:  * All rights reserved.
       9:  *
      10:  * Redistribution and use in source and binary forms, with or without
      11:  * modification, are permitted provided that the following conditions
      12:  * are met:
      13:  * 1. Redistributions of source code must retain the above copyright
      14:  *    notice, this list of conditions and the following disclaimer.
      15:  * 2. Redistributions in binary form must reproduce the above copyright
      16:  *    notice, this list of conditions and the following disclaimer in the
      17:  *    documentation and/or other materials provided with the distribution.
      18:  * 3. All advertising materials mentioning features or use of this software
      19:  *    must display the following acknowledgement:
      20:  *	This product includes software developed by the University of
      21:  *	California, Berkeley and its contributors.
      22:  * 4. Neither the name of the University nor the names of its contributors
      23:  *    may be used to endorse or promote products derived from this software
      24:  *    without specific prior written permission.
      25:  *
      26:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
      27:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      28:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      29:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
      30:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      31:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
      32:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      33:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
      34:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
      35:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      36:  * SUCH DAMAGE.
      37:  */
      38: #ifndef _h_tc_sig
      39: #define _h_tc_sig
      40:
      41: #if SVID > 0
      42: # include <signal.h>
      43: # ifndef SIGCHLD
      44: #  define SIGCHLD SIGCLD
      45: # endif				/* SIGCHLD */
      46: #else               /* SVID == 0 */
      47: # include <sys/signal.h>
      48: #endif				/* SVID > 0 */
      49:
      50: #ifdef sun
      51: # define SAVESIGVEC
      52: #endif
      53:
      54: #ifdef BSDSIGS
      55: /*
      56:  * sigvec is not the same everywhere
      57:  */
      58: # ifdef _SEQUENT_
      59: #  define HAVE_SIGVEC
      60: #  define mysigvec(a, b, c) sigaction(a, b, c)
      61: typedef struct sigaction sigvec_t;
      62: #  define sv_handler sa_handler
      63: # endif	/* _SEQUENT */
      64:
      65: # ifdef hpux
      66: #  define HAVE_SIGVEC
      67: #  define mysigvec(a, b, c) sigvector(a, b, c)
      68: #  define NEEDsignal
      69: typedef struct sigvec sigvec_t;
      70: # endif	/* hpux */
      71:
      72: # ifndef HAVE_SIGVEC
      73: #  define mysigvec(a, b, c) sigvec(a, b, c)
      74: typedef struct sigvec sigvec_t;
      75: # endif	/* HAVE_SIGVEC */
      76:
      77: # undef HAVE_SIGVEC
      78: #endif /* BSDSIGS */
      79:
      80: #if SVID > 0
      81: # ifdef BSDJOBS
      82: /* here I assume that systems that have bsdjobs implement the
      83:  * the setpgrp call correctly. Otherwise defining this would
      84:  * work, but it would kill the world, because all the setpgrp
      85:  * code is the the part defined when BSDJOBS are defined
      86:  * NOTE: we don't want killpg(a, b) == kill(-getpgrp(a), b)
      87:  * cause process a might be already dead and getpgrp would fail
      88:  */
      89: #  define killpg(a, b) kill(-(a), (b))
      90: # else
      91: /* this is the poor man's version of killpg()! Just kill the
      92:  * current process and don't worry about the rest. Someday
      93:  * I hope I get to fix that.
      94:  */
      95: #  define killpg(a, b) kill((a), (b))
      96: # endif	/* BSDJOBS */
      97: #endif /* SVID > 0 */
      98:
      99:
     100: #ifdef BSDSIGS
     101: /*
     102:  * For 4.2bsd signals.
     103:  */
     104: # ifdef sigmask
     105: #  undef sigmask
     106: # endif				/* sigmask */
     107: # define    sigmask(s)  ((sigmask_t)1 << ((s)-1))
     108: # ifdef _SEQUENT_
     109: #  define   sigpause(a) b_sigpause(a)
     110: #  define   signal(a, b)    sigset(a, b)
     111: # else /* _SEQUENT_ */
     112: #  define   sighold(s)  sigblock(sigmask(s))
     113: #  define   sigignore(s)    signal(s, SIG_IGN)
     114: #  define   sigset(s, a)    signal(s, a)
     115: # endif	/* _SEQUENT_ */
     116: # ifdef aiws
     117: #  define   sigrelse(a) sigsetmask(sigblock(0) & ~sigmask(a))
     118: #  undef    killpg
     119: #  define   killpg(a, b)    kill(-getpgrp(a), b)
     120: #  define   NEEDsignal
     121: # endif	/* aiws */
     122: #endif /* BSDSIGS */
     123:
     124:
     125: /*
     126:  * We choose a define for the window signal if it exists..
     127:  */
     128: #ifdef SIGWINCH
     129: # define SIG_WINDOW SIGWINCH
     130: #else
     131: # ifdef SIGWINDOW
     132: #  define SIG_WINDOW SIGWINDOW
     133: # endif	/* SIGWINDOW */
     134: #endif /* SIGWINCH */
     135:
     136: #if defined(convex) || defined(__convex__)
     137: # define SIGSYNCH       0
     138: # ifdef SIGSYNCH
     139: #  define SYNCHMASK     (sigmask(SIGCHLD)|sigmask(SYNCH_SIG))
     140: # else
     141: #  define SYNCHMASK     (sigmask(SIGCHLD))
     142: # endif
     143: extern sigret_t synch_handler();
     144: #endif /* convex || __convex__ */
     145:
     146: #ifdef SAVESIGVEC
     147: # define NSIGSAVED 7
     148:  /*
     149:   * These are not inline for speed. gcc -traditional -O on the sparc ignores
     150:   * the fact that vfork() corrupts the registers. Calling a routine is not
     151:   * nice, since it can make the comp_r put some things that we want saved
     152:   * into registers 				- christos
     153:   */
     154: # define savesigvec(sv)                     \
     155:    (mysigvec(SIGINT,  (sigvec_t *) 0, &(sv)[0]),        \
     156:     mysigvec(SIGQUIT, (sigvec_t *) 0, &(sv)[1]),        \
     157:     mysigvec(SIGTSTP, (sigvec_t *) 0, &(sv)[2]),        \
     158:     mysigvec(SIGTTIN, (sigvec_t *) 0, &(sv)[3]),        \
     159:     mysigvec(SIGTTOU, (sigvec_t *) 0, &(sv)[4]),        \
     160:     mysigvec(SIGTERM, (sigvec_t *) 0, &(sv)[5]),        \
     161:     mysigvec(SIGHUP,  (sigvec_t *) 0, &(sv)[6]),        \
     162:     sigblock(sigmask(SIGINT) | sigmask(SIGQUIT) |       \
     163:         sigmask(SIGTSTP) | sigmask(SIGTTIN) |       \
     164:         sigmask(SIGTTOU) | sigmask(SIGTERM) |       \
     165:         sigmask(SIGHUP)))
     166:
     167: # define restoresigvec(sv, sm)                  \
     168:     (void) (mysigvec(SIGINT,  &(sv)[0], (sigvec_t *) 0),    \
     169:         mysigvec(SIGQUIT, &(sv)[1], (sigvec_t *) 0),    \
     170:         mysigvec(SIGTSTP, &(sv)[2], (sigvec_t *) 0),    \
     171:         mysigvec(SIGTTIN, &(sv)[3], (sigvec_t *) 0),    \
     172:         mysigvec(SIGTTOU, &(sv)[4], (sigvec_t *) 0),    \
     173:         mysigvec(SIGTERM, &(sv)[5], (sigvec_t *) 0),    \
     174:         mysigvec(SIGHUP,  &(sv)[6], (sigvec_t *) 0),    \
     175:         sigsetmask(sm))
     176: # endif				/* SAVESIGVEC */
     177:
     178: #endif				/* _h_tc_sig */

#### Defined typedef's

sigvec_t defined in line 61; used 21 times

- in line 69-74(2), 155-161(7), 168-174(7)
- in /usr/src/bin/tcsh/sh.c line 135
- in /usr/src/bin/tcsh/sh.proc.c line 1640-1641(2)
- in /usr/src/bin/tcsh/sh.sem.c line 278
- in /usr/src/bin/tcsh/tc.sig.c line 252

#### Defined macros

HAVE_SIGVEC defined in line 66; used 2 times

- in line 72-77(2)

NEEDsignal defined in line 120; used 1 times

- in /usr/src/bin/tcsh/tc.sig.c line 244

NSIGSAVED defined in line 147; used 1 times

- in /usr/src/bin/tcsh/sh.sem.c line 278

SAVESIGVEC defined in line 51; used 5 times

- in line 146
- in /usr/src/bin/tcsh/sh.sem.c line 277, 316, 330, 346

SIGCHLD defined in line 44; used 3 times

- in line 43, 139-141(2)

SIGSYNCH defined in line 137; used 10 times

- in line 138
- in /usr/src/bin/tcsh/sh.proc.c line 1639, 1663-1664(2), 1742-1744(2), 1755, 1765
- in /usr/src/bin/tcsh/tc.sig.c line 388, 395

SIG_WINDOW defined in line 132; used 21 times

- in /usr/src/bin/tcsh/ed.init.c line 143, 155-157(3), 181, 374-375(2), 429-430(2)
- in /usr/src/bin/tcsh/ed.screen.c line 1182, 1190-1192(3), 1279, 1286, 1295, 1355
- in /usr/src/bin/tcsh/sh.c line 855, 1512
- in /usr/src/bin/tcsh/sh.func.c line 1064
- in /usr/src/bin/tcsh/tc.const.c line 241

SYNCHMASK defined in line 141; used 1 times

- in /usr/src/bin/tcsh/sh.proc.c line 1764

_h_tc_sig defined in line 39; used 1 times

- in line 38

killpg defined in line 119; used 5 times

- in line 118
- in /usr/src/bin/tcsh/sh.lex.c line 1374
- in /usr/src/bin/tcsh/sh.proc.c line 1432, 1438, 1509

mysigvec defined in line 73; used 20 times

- in line 155-161(7), 168-174(7)
- in /usr/src/bin/tcsh/sh.c line 418-420(2)
- in /usr/src/bin/tcsh/sh.proc.c line 1664, 1765
- in /usr/src/bin/tcsh/tc.sig.c line 254, 264

restoresigvec defined in line 167; used 2 times

- in /usr/src/bin/tcsh/sh.sem.c line 331, 347

savesigvec defined in line 154; used 1 times

- in /usr/src/bin/tcsh/sh.sem.c line 317

sighold defined in line 112; used 35 times

- in /usr/src/bin/tcsh/ed.init.c line 157
- in /usr/src/bin/tcsh/ed.screen.c line 1192
- in /usr/src/bin/tcsh/sh.c line 666, 793, 1065, 1290, 1442
- in /usr/src/bin/tcsh/sh.func.c line 163, 523, 583, 1006
- in /usr/src/bin/tcsh/sh.proc.c line 460, 493, 550, 642, 1384-1385(2), 1488, 1670, 1819-1821(3)
- in /usr/src/bin/tcsh/sh.sem.c line 232, 286, 292-293(2)
- in /usr/src/bin/tcsh/tc.func.c line 215, 451, 528, 563, 600
- in /usr/src/bin/tcsh/tc.os.c line 428-429(2)
- in /usr/src/bin/tcsh/tc.sched.c line 200
- in /usr/src/bin/tcsh/tc.who.c line 172

sigignore defined in line 113; used 8 times

- in /usr/src/bin/tcsh/sh.glob.c line 699-705(3)
- in /usr/src/bin/tcsh/sh.proc.c line 511, 1246, 1268, 1719
- in /usr/src/bin/tcsh/tc.os.c line 681

sigmask defined in line 107; used 14 times

- in line 104-105(2), 112-117(2), 139-141(3), 162-165(7)

signal defined in line 110; used 2 times

- in line 113-114(2)

sigpause defined in line 109; used 5 times

- in /usr/src/bin/tcsh/sh.proc.c line 563-565(2), 648-650(2), 1764

sigrelse defined in line 117; used 54 times

- in /usr/src/bin/tcsh/ed.init.c line 181
- in /usr/src/bin/tcsh/ed.screen.c line 1286
- in /usr/src/bin/tcsh/sh.c line 808, 1094, 1108, 1270, 1291, 1359
- in /usr/src/bin/tcsh/sh.exec.c line 195-196(2)
- in /usr/src/bin/tcsh/sh.func.c line 516, 591, 601, 919, 1029
- in /usr/src/bin/tcsh/sh.hist.c line 140
- in /usr/src/bin/tcsh/sh.proc.c line 469, 508, 571, 640, 657, 1463-1465(2), 1514, 1679-1680(2), 1696, 1773, 1853-1855(3)
- in /usr/src/bin/tcsh/sh.sem.c line 243, 335-336(2), 388-389(2), 401, 490
- in /usr/src/bin/tcsh/sh.set.c line 838
- in /usr/src/bin/tcsh/tc.func.c line 257, 468, 543, 578, 624
- in /usr/src/bin/tcsh/tc.os.c line 487-489(2)
- in /usr/src/bin/tcsh/tc.sched.c line 216, 268
- in /usr/src/bin/tcsh/tc.who.c line 180, 192, 207, 215, 225, 392

sigset defined in line 114; used 17 times

- in line 110
- in /usr/src/bin/tcsh/ed.init.c line 375, 430, 936, 972
- in /usr/src/bin/tcsh/sh.c line 289, 424-426(2), 665, 777, 1179
- in /usr/src/bin/tcsh/sh.func.c line 165, 173, 182
- in /usr/src/bin/tcsh/tc.sig.c line 75
- in /usr/src/bin/tcsh/tw.help.c line 129-132(2)

sv_handler defined in line 62; used 4 times

- in /usr/src/bin/tcsh/sh.c line 419-421(2)
- in /usr/src/bin/tcsh/tc.sig.c line 256, 266

#### Usage of this include

tc.sig.h used 1 times

- in /usr/src/bin/tcsh/tc.h line 42

Last modified: 1991-08-21 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 808 |