__signal.h
Upload User: tsgydb
Upload Date: 2007-04-14
Package Size: 10674k
Code Size: 3k
Category:

MySQL

Development Platform:

Visual C++

  1. #include <ansi_compat.h>
  2. #define NSIG 32
  3. #define SIGHUP      1 /* hangup */
  4. #define SIGINT      2 /* interrupt */
  5. #define SIGQUIT     3 /* quit */
  6. #define SIGILL      4 /* illegal instruction (not reset when caught) */
  7. #define SIGTRAP     5 /* trace trap (not reset when caught) */
  8. #define SIGIOT      6 /* IOT instruction */
  9. #define SIGEMT      7 /* EMT instruction */
  10. #define SIGFPE      8 /* floating point exception */
  11. #define SIGKILL     9 /* kill (cannot be caught or ignored) */
  12. #define SIGBUS     10 /* bus error */
  13. #define SIGSEGV    11 /* segmentation violation */
  14. #define SIGSYS     12 /* bad argument to system call */
  15. #define SIGPIPE    13 /* write on a pipe with no one to read it */
  16. #define SIGALRM    14 /* alarm clock */
  17. #define SIGTERM    15 /* software termination signal from kill */
  18. #define SIGURG     16 /* urgent condition on IO channel */
  19. #define SIGSTOP    17 /* sendable stop signal not from tty */
  20. #define SIGTSTP    18 /* stop signal from tty */
  21. #define SIGCONT    19 /* continue a stopped process */
  22. #define SIGCHLD    20 /* to parent on child stop or exit */
  23. #define SIGTTIN    21 /* to readers pgrp upon background tty read */
  24. #define SIGTTOU    22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
  25. #define SIGIO      23 /* input/output possible signal */
  26. #define SIGXCPU    24 /* exceeded CPU time limit */
  27. #define SIGXFSZ    25 /* exceeded file size limit */
  28. #define SIGVTALRM  26 /* virtual time alarm */
  29. #define SIGPROF    27 /* profiling time alarm */
  30. #define SIGWINCH   28 /* window size changes */
  31. #define SIGLOST    29 /* Sys-V rec lock: notify user upon server crash */
  32. #define SIGUSR1    30 /* User signal 1 (from SysV) */
  33. #define SIGUSR2    31 /* User signal 2 (from SysV) */
  34. /* Add System V signal definitions (DLB001) */
  35. #define SIGCLD SIGCHLD /* System V name for SIGCHLD */
  36. #define SIGABRT SIGIOT
  37. typedef long  sig_atomic_t;
  38. typedef unsigned int sigset_t;
  39. struct sigaction {
  40. void   (*sa_handler)(); /* signal handler */
  41. sigset_t  sa_mask; /* signal mask to apply */
  42. int   sa_flags; /* see signal options below */
  43. };
  44. /* Defines for sigprocmask() call. POSIX.
  45.  */
  46. #define SIG_BLOCK 1 /* Add these signals to block mask */
  47. #define SIG_UNBLOCK 2 /* Remove these signals from block mask */
  48. #define SIG_SETMASK 3 /* Set block mask to this mask */
  49. #define SIG_ERR ((void (*)())(-1))
  50. #define SIG_DFL ((void (*)())( 0))
  51. #define SIG_IGN ((void (*)())( 1))
  52. #define __SIGFILLSET 0xffffffff
  53. #define __SIGEMPTYSET 0
  54. #define __SIGADDSET(s,n) ((*s) |= (1 << ((n) - 1))) 
  55. #define __SIGDELSET(s,n) ((*s) &= ~(1 << ((n) - 1))) 
  56. #define __SIGISMEMBER(s,n) ((*s) & (1 << ((n) - 1)))