2 * D header file for C99.
4 * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_signal.h.html, _signal.h)
6 * Copyright: Copyright Sean Kelly 2005 - 2009.
7 * License: Distributed under the
8 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
9 * (See accompanying file LICENSE)
11 * Source: $(DRUNTIMESRC core/stdc/_signal.d)
12 * Standards: ISO/IEC 9899:1999 (E)
15 module core
.stdc
.signal
;
21 // this should be volatile
23 alias int sig_atomic_t
;
25 private alias void function(int) sigfn_t
;
30 enum SIG_ERR
= cast(sigfn_t
) -1;
32 enum SIG_DFL
= cast(sigfn_t
) 0;
34 enum SIG_IGN
= cast(sigfn_t
) 1;
38 enum SIGABRT
= 6; // Abnormal termination
40 enum SIGFPE
= 8; // Floating-point error
42 enum SIGILL
= 4; // Illegal hardware instruction
44 enum SIGINT
= 2; // Terminal interrupt character
46 enum SIGSEGV
= 11; // Invalid memory reference
48 enum SIGTERM
= 15; // Termination
50 else version (Windows
)
53 enum SIG_ERR
= cast(sigfn_t
) -1;
55 enum SIG_DFL
= cast(sigfn_t
) 0;
57 enum SIG_IGN
= cast(sigfn_t
) 1;
61 enum SIGABRT
= 22; // Abnormal termination
63 enum SIGFPE
= 8; // Floating-point error
65 enum SIGILL
= 4; // Illegal hardware instruction
67 enum SIGINT
= 2; // Terminal interrupt character
69 enum SIGSEGV
= 11; // Invalid memory reference
71 enum SIGTERM
= 15; // Termination
75 sigfn_t
signal(int sig
, sigfn_t func
);