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