home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / k / ksh48.zip / sh / sigact.h < prev    next >
C/C++ Source or Header  |  1992-05-03  |  2KB  |  89 lines

  1. /* NAME:
  2.  *      sigact.h - sigaction et al
  3.  *
  4.  * SYNOPSIS:
  5.  *      #include <signal.h>
  6.  *      #ifndef  SA_NOCLDSTOP
  7.  *      # include "sigact.h"
  8.  *      #endif
  9.  *
  10.  * DESCRIPTION:
  11.  *      This header is the interface to a fake sigaction(2) implementation.  
  12.  *      Do NOT include this header unless your system does not 
  13.  *      have a real sigaction(2) implementation.
  14.  */
  15. /*
  16.  * $Log: sigact.h,v $
  17.  * Revision 1.2  1992/04/24  15:04:11  sjg
  18.  * now compiles with cc
  19.  *
  20.  * Revision 1.1  1992/04/24  12:01:38  sjg
  21.  * Initial revision
  22.  *
  23.  */
  24.  
  25. #ifndef _SIGACT_H
  26. #define _SIGACT_H
  27.  
  28. #ifndef ARGS
  29. # if defined(__STDC__)
  30. #   define ARGS(p) p
  31. # else
  32. #   define ARGS(p) ()
  33. # endif
  34. #endif
  35. #ifndef __STDC__
  36. # define volatile            /* can change without warning */
  37. # define const                /* read only */
  38. #endif
  39.  
  40. #ifndef SIGKILL
  41. # include <signal.h>
  42. #endif
  43. #ifndef SA_NOCLDSTOP
  44. /* sa_flags */
  45. #define    SA_NOCLDSTOP    0x0001        /* don't send SIGCHLD on child stop */
  46. #define SA_RESTART    0x0002        /* re-start I/O */
  47.  
  48. /* sigprocmask flags */
  49. #define    SIG_BLOCK    0x0001
  50. #define    SIG_UNBLOCK    0x0002
  51. #define    SIG_SETMASK    0x0004
  52.  
  53. #ifndef __sys_stdtypes_h
  54. typedef int sigset_t;
  55. #endif
  56.  
  57. struct sigaction
  58. {
  59.   void        (*sa_handler)();
  60.   sigset_t    sa_mask;
  61.   int        sa_flags;
  62. };
  63.  
  64.  
  65. int    sigaction    ARGS(( int sig, struct sigaction *act, struct sigaction *oact ));
  66. int    sigaddset    ARGS(( sigset_t *mask, int sig ));
  67. int    sigdelset    ARGS(( sigset_t *mask, int sig ));
  68. int    sigemptyset    ARGS(( sigset_t *mask ));
  69. int    sigfillset    ARGS(( sigset_t *mask ));
  70. int    sigismember    ARGS(( sigset_t *mask, int sig ));
  71. int    sigpending    ARGS(( sigset_t *set ));
  72. int    sigprocmask    ARGS(( int how, sigset_t *set, sigset_t *oldset ));
  73. int    sigsuspend    ARGS(( sigset_t *mask ));
  74.  
  75. #ifndef sigmask
  76. #define sigmask(m)    (1<<((m)-1))    /* convert SIGnum to mask */
  77. #endif
  78. #if !defined(NSIG) && defined(_NSIG)
  79. # define NSIG _NSIG
  80. #endif
  81. #endif /* ! SA_NOCLDSTOP */
  82. #endif /* _SIGACT_H */
  83. /*
  84.  * Local Variables:
  85.  * version-control:t
  86.  * comment-column:40
  87.  * End:
  88.  */
  89.