home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 December / PCWorld_2005-12_cd.bin / software / topware / partlogic / partlogic-0.57-iso.exe / partlogic-0.57.iso / system / headers / signal.h < prev    next >
Text File  |  2005-08-29  |  2KB  |  58 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2005 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  signal.h
  20. //
  21.  
  22. // This is the Visopsys version of the standard header file signal.h
  23.  
  24. #if !defined(_SIGNAL_H)
  25.  
  26. #define SIGNALS_MAX 32
  27.  
  28. // Signal numbers.  Compatible with solaris codes.
  29.  
  30. // SIGABRT: Abnormal termination, such as is initiated by the abort function
  31. #define SIGABRT     6
  32. // SIGFPE: An erroneous arithmetic operation, such as zero divide or an
  33. // operation resulting in overflow
  34. #define SIGFPE      8
  35. // SIGILL: Detection of an invalid function image, such as an invalid
  36. // instruction
  37. #define SIGILL      4
  38. // SIGINT: Receipt of an interactive attention signal
  39. #define SIGINT      2
  40. // SIGSEGV: An invalid access to storage
  41. #define SIGSEGV     11
  42. // SIGTERM: A termination request sent to the program
  43. #define SIGTERM     15
  44.  
  45. // A type for a signal handler
  46. typedef void (*sighandler_t)(int);
  47.  
  48. // Built-in signal handing macros. 
  49. #define SIG_DFL ((sighandler_t) 0)  // Do the default action.
  50. #define SIG_ERR ((sighandler_t) 1)  // Signal handling error.
  51. #define SIG_IGN ((sighandler_t) 2)  // Ignore this signal.
  52.  
  53. // Signal handling functions
  54. sighandler_t signal(int, sighandler_t);
  55.  
  56. #define _SIGNAL_H
  57. #endif
  58.