1 signal.h |
1 /* |
|
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @publishedAll |
|
26 @released |
|
27 */ |
|
28 |
|
29 #ifndef _SYS_SIGNAL_H |
|
30 #define _SYS_SIGNAL_H |
|
31 |
|
32 #ifndef _STRICT_ANSI |
|
33 |
|
34 typedef unsigned long sigset_t; |
|
35 |
|
36 struct sigaction |
|
37 { |
|
38 void (*sa_handler)(); |
|
39 sigset_t sa_mask; |
|
40 int sa_flags; |
|
41 }; |
|
42 |
|
43 #define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */ |
|
44 #define SIG_SETMASK 0 /* set mask with sigprocmask() */ |
|
45 #define SIG_BLOCK 1 /* set of signals to block */ |
|
46 #define SIG_UNBLOCK 2 /* set of signals to, well, unblock */ |
|
47 |
|
48 |
|
49 /** |
|
50 These depend upon the type of sigset_t, which right now |
|
51 is always a long.. They're in the POSIX namespace, but |
|
52 are not ANSI. |
|
53 */ |
|
54 #define sigaddset(what,sig) (*(what) |= (1<<(sig))) |
|
55 #define sigemptyset(what) (*(what) = 0) |
|
56 |
|
57 int sigprocmask (int how, const sigset_t *a, sigset_t *b); |
|
58 #endif /* _STRICT_ANSI */ |
|
59 |
|
60 |
|
61 #define SIGHUP 1 /* hangup */ |
|
62 #define SIGINT 2 /* interrupt */ |
|
63 #define SIGQUIT 3 /* quit */ |
|
64 #define SIGILL 4 /* illegal instruction (not reset when caught) */ |
|
65 #define SIGTRAP 5 /* trace trap (not reset when caught) */ |
|
66 #define SIGIOT 6 /* IOT instruction */ |
|
67 #define SIGABRT 6 /* used by abort, replace SIGIOT in the future */ |
|
68 #define SIGEMT 7 /* EMT instruction */ |
|
69 #define SIGFPE 8 /* floating point exception */ |
|
70 #define SIGKILL 9 /* kill (cannot be caught or ignored) */ |
|
71 #define SIGBUS 10 /* bus error */ |
|
72 #define SIGSEGV 11 /* segmentation violation */ |
|
73 #define SIGSYS 12 /* bad argument to system call */ |
|
74 #define SIGPIPE 13 /* write on a pipe with no one to read it */ |
|
75 #define SIGALRM 14 /* alarm clock */ |
|
76 #define SIGTERM 15 /* software termination signal from kill */ |
|
77 #define SIGUSR1 16 |
|
78 #define SIGUSR2 17 |
|
79 #define SIGCLD 18 |
|
80 #define SIGPWR 19 |
|
81 #define SIGWINCH 20 |
|
82 #define SIGPOLL 22 /* 20 for x.out binaries!!!! */ |
|
83 #define SIGSTOP 23 /* sendable stop signal not from tty */ |
|
84 #define SIGTSTP 24 /* stop signal from tty */ |
|
85 #define SIGCONT 25 /* continue a stopped process */ |
|
86 #define SIGTTIN 26 /* to readers pgrp upon background tty read */ |
|
87 #define SIGTTOU 27 /* like TTIN for output if (tp->t_local<OSTOP) */ |
|
88 #define NSIG 28 |
|
89 |
|
90 #endif /* _SYS_SIGNAL_H */ |