1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv=
"Content-Type" content=
"text/html;charset=UTF-8">
3 <title>Native Client: sys/signal.h Source File
</title>
4 <link href=
"./tabs.css" rel=
"stylesheet" type=
"text/css">
5 <link href=
"./stylesheet-dox.css" rel=
"stylesheet" type=
"text/css">
8 <a href=
"../../../README.html">Back to README
</a>
10 <!-- Generated by Doxygen 1.5.7.1 -->
11 <div class=
"navigation" id=
"top">
14 <li><a href=
"index.html"><span>Main
Page
</span></a></li>
15 <li><a href=
"modules.html"><span>Modules
</span></a></li>
16 <li><a href=
"annotated.html"><span>Data
Structures
</span></a></li>
17 <li class=
"current"><a href=
"files.html"><span>Files
</span></a></li>
22 <li><a href=
"files.html"><span>File
List
</span></a></li>
23 <li><a href=
"globals.html"><span>Globals
</span></a></li>
26 <h1>sys/signal.h
</h1><div class=
"fragment"><pre class=
"fragment"><a name=
"l00001"></a>00001 <span class=
"comment">/* sys/signal.h */
</span>
27 <a name=
"l00002"></a>00002
28 <a name=
"l00003"></a>00003 <span class=
"preprocessor">#ifndef _SYS_SIGNAL_H
</span>
29 <a name=
"l00004"></a>00004 <span class=
"preprocessor"></span><span class=
"preprocessor">#define _SYS_SIGNAL_H
</span>
30 <a name=
"l00005"></a>00005 <span class=
"preprocessor"></span><span class=
"preprocessor">#ifdef __cplusplus
</span>
31 <a name=
"l00006"></a>00006 <span class=
"preprocessor"></span><span class=
"keyword">extern
</span> <span class=
"stringliteral">"C"</span> {
32 <a name=
"l00007"></a>00007 <span class=
"preprocessor">#endif
</span>
33 <a name=
"l00008"></a>00008 <span class=
"preprocessor"></span>
34 <a name=
"l00009"></a>00009 <span class=
"preprocessor">#include
"_ansi.h"</span>
35 <a name=
"l00010"></a>00010 <span class=
"preprocessor">#include
<sys/features.h
></span>
36 <a name=
"l00011"></a>00011
37 <a name=
"l00012"></a>00012 <span class=
"comment">/* #ifndef __STRICT_ANSI__*/
</span>
38 <a name=
"l00013"></a>00013
39 <a name=
"l00014"></a>00014 <span class=
"preprocessor">#if defined(_POSIX_THREADS)
</span>
40 <a name=
"l00015"></a>00015 <span class=
"preprocessor"></span><span class=
"preprocessor">#include
<sys/types.h
></span> <span class=
"comment">/* for pthread data types */
</span>
41 <a name=
"l00016"></a>00016 <span class=
"preprocessor">#endif
</span>
42 <a name=
"l00017"></a>00017 <span class=
"preprocessor"></span>
43 <a name=
"l00018"></a>00018 <span class=
"keyword">typedef
</span> <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">long
</span> sigset_t;
44 <a name=
"l00019"></a>00019
45 <a name=
"l00020"></a>00020 <span class=
"preprocessor">#if defined(__rtems__)
</span>
46 <a name=
"l00021"></a>00021 <span class=
"preprocessor"></span>
47 <a name=
"l00022"></a>00022 <span class=
"preprocessor">#if defined(_POSIX_REALTIME_SIGNALS)
</span>
48 <a name=
"l00023"></a>00023 <span class=
"preprocessor"></span>
49 <a name=
"l00024"></a>00024 <span class=
"comment">/* sigev_notify values
</span>
50 <a name=
"l00025"></a>00025 <span class=
"comment"> NOTE: P1003.1c/D10, p.
34 adds SIGEV_THREAD. */
</span>
51 <a name=
"l00026"></a>00026
52 <a name=
"l00027"></a>00027 <span class=
"preprocessor">#define SIGEV_NONE
1 </span><span class=
"comment">/* No asynchronous notification shall be delivered */
</span>
53 <a name=
"l00028"></a>00028 <span class=
"comment">/* when the event of interest occurs. */
</span>
54 <a name=
"l00029"></a>00029 <span class=
"preprocessor">#define SIGEV_SIGNAL
2 </span><span class=
"comment">/* A queued signal, with an application defined */
</span>
55 <a name=
"l00030"></a>00030 <span class=
"comment">/* value, shall be delivered when the event of */
</span>
56 <a name=
"l00031"></a>00031 <span class=
"comment">/* interest occurs. */
</span>
57 <a name=
"l00032"></a>00032 <span class=
"preprocessor">#define SIGEV_THREAD
3 </span><span class=
"comment">/* A notification function shall be called to */
</span>
58 <a name=
"l00033"></a>00033 <span class=
"comment">/* perform notification. */
</span>
59 <a name=
"l00034"></a>00034
60 <a name=
"l00035"></a>00035 <span class=
"comment">/* Signal Generation and Delivery, P1003.1b-
1993, p.
63</span>
61 <a name=
"l00036"></a>00036 <span class=
"comment"> NOTE: P1003.1c/D10, p.
34 adds sigev_notify_function and
</span>
62 <a name=
"l00037"></a>00037 <span class=
"comment"> sigev_notify_attributes to the sigevent structure. */
</span>
63 <a name=
"l00038"></a>00038
64 <a name=
"l00039"></a>00039 <span class=
"keyword">union
</span>sigval {
65 <a name=
"l00040"></a>00040 <span class=
"keywordtype">int
</span> sival_int;
<span class=
"comment">/* Integer signal value */
</span>
66 <a name=
"l00041"></a>00041 <span class=
"keywordtype">void
</span> *sival_ptr;
<span class=
"comment">/* Pointer signal value */
</span>
67 <a name=
"l00042"></a>00042 };
68 <a name=
"l00043"></a>00043
69 <a name=
"l00044"></a>00044 <span class=
"keyword">struct
</span>sigevent {
70 <a name=
"l00045"></a>00045 <span class=
"keywordtype">int
</span> sigev_notify;
<span class=
"comment">/* Notification type */
</span>
71 <a name=
"l00046"></a>00046 <span class=
"keywordtype">int
</span> sigev_signo;
<span class=
"comment">/* Signal number */
</span>
72 <a name=
"l00047"></a>00047 <span class=
"keyword">union
</span>sigval sigev_value;
<span class=
"comment">/* Signal value */
</span>
73 <a name=
"l00048"></a>00048
74 <a name=
"l00049"></a>00049 <span class=
"preprocessor">#if defined(_POSIX_THREADS)
</span>
75 <a name=
"l00050"></a>00050 <span class=
"preprocessor"></span> void (*sigev_notify_function)(
<span class=
"keyword">union
</span>sigval );
76 <a name=
"l00051"></a>00051 <span class=
"comment">/* Notification function */
</span>
77 <a name=
"l00052"></a>00052 <a class=
"code" href=
"structpthread__attr__t.html" title=
"pthread_attr_t describes thread attributes.">pthread_attr_t
</a> *sigev_notify_attributes;
<span class=
"comment">/* Notification Attributes */
</span>
78 <a name=
"l00053"></a>00053 <span class=
"preprocessor">#endif
</span>
79 <a name=
"l00054"></a>00054 <span class=
"preprocessor"></span>};
80 <a name=
"l00055"></a>00055
81 <a name=
"l00056"></a>00056 <span class=
"comment">/* Signal Actions, P1003.1b-
1993, p.
64 */
</span>
82 <a name=
"l00057"></a>00057 <span class=
"comment">/* si_code values, p.
66 */
</span>
83 <a name=
"l00058"></a>00058
84 <a name=
"l00059"></a>00059 <span class=
"preprocessor">#define SI_USER
1 </span><span class=
"comment">/* Sent by a user. kill(), abort(), etc */
</span>
85 <a name=
"l00060"></a>00060 <span class=
"preprocessor">#define SI_QUEUE
2 </span><span class=
"comment">/* Sent by sigqueue() */
</span>
86 <a name=
"l00061"></a>00061 <span class=
"preprocessor">#define SI_TIMER
3 </span><span class=
"comment">/* Sent by expiration of a timer_settime() timer */
</span>
87 <a name=
"l00062"></a>00062 <span class=
"preprocessor">#define SI_ASYNCIO
4 </span><span class=
"comment">/* Indicates completion of asycnhronous IO */
</span>
88 <a name=
"l00063"></a>00063 <span class=
"preprocessor">#define SI_MESGQ
5 </span><span class=
"comment">/* Indicates arrival of a message at an empty queue */
</span>
89 <a name=
"l00064"></a>00064
90 <a name=
"l00065"></a>00065 <span class=
"keyword">typedef
</span> <span class=
"keyword">struct
</span>{
91 <a name=
"l00066"></a>00066 <span class=
"keywordtype">int
</span> si_signo;
<span class=
"comment">/* Signal number */
</span>
92 <a name=
"l00067"></a>00067 <span class=
"keywordtype">int
</span> si_code;
<span class=
"comment">/* Cause of the signal */
</span>
93 <a name=
"l00068"></a>00068 <span class=
"keyword">union
</span>sigval si_value;
<span class=
"comment">/* Signal value */
</span>
94 <a name=
"l00069"></a>00069 } siginfo_t;
95 <a name=
"l00070"></a>00070 <span class=
"preprocessor">#endif
</span>
96 <a name=
"l00071"></a>00071 <span class=
"preprocessor"></span>
97 <a name=
"l00072"></a>00072 <span class=
"comment">/*
3.3.8 Synchronously Accept a Signal, P1003.1b-
1993, p.
76 */
</span>
98 <a name=
"l00073"></a>00073
99 <a name=
"l00074"></a>00074 <span class=
"preprocessor">#define SA_NOCLDSTOP
1 </span><span class=
"comment">/* Do not generate SIGCHLD when children stop */
</span>
100 <a name=
"l00075"></a>00075 <span class=
"preprocessor">#define SA_SIGINFO
2 </span><span class=
"comment">/* Invoke the signal catching function with */
</span>
101 <a name=
"l00076"></a>00076 <span class=
"comment">/* three arguments instead of one. */
</span>
102 <a name=
"l00077"></a>00077
103 <a name=
"l00078"></a>00078 <span class=
"comment">/* struct sigaction notes from POSIX:
</span>
104 <a name=
"l00079"></a>00079 <span class=
"comment"> *
</span>
105 <a name=
"l00080"></a>00080 <span class=
"comment"> * (
1) Routines stored in sa_handler should take a single int as
</span>
106 <a name=
"l00081"></a>00081 <span class=
"comment"> * their argument although the POSIX standard does not require this.
</span>
107 <a name=
"l00082"></a>00082 <span class=
"comment"> * (
2) The fields sa_handler and sa_sigaction may overlap, and a conforming
</span>
108 <a name=
"l00083"></a>00083 <span class=
"comment"> * application should not use both simultaneously.
</span>
109 <a name=
"l00084"></a>00084 <span class=
"comment"> */
</span>
110 <a name=
"l00085"></a>00085
111 <a name=
"l00086"></a>00086 <span class=
"keyword">typedef
</span> void (*_sig_func_ptr)();
112 <a name=
"l00087"></a>00087
113 <a name=
"l00088"></a>00088 <span class=
"keyword">struct
</span>sigaction {
114 <a name=
"l00089"></a>00089 <span class=
"keywordtype">int
</span> sa_flags;
<span class=
"comment">/* Special flags to affect behavior of signal */
</span>
115 <a name=
"l00090"></a>00090 sigset_t sa_mask;
<span class=
"comment">/* Additional set of signals to be blocked */
</span>
116 <a name=
"l00091"></a>00091 <span class=
"comment">/* during execution of signal-catching */
</span>
117 <a name=
"l00092"></a>00092 <span class=
"comment">/* function. */
</span>
118 <a name=
"l00093"></a>00093 <span class=
"keyword">union
</span>{
119 <a name=
"l00094"></a>00094 _sig_func_ptr _handler;
<span class=
"comment">/* SIG_DFL, SIG_IGN, or pointer to a function */
</span>
120 <a name=
"l00095"></a>00095 <span class=
"preprocessor">#if defined(_POSIX_REALTIME_SIGNALS)
</span>
121 <a name=
"l00096"></a>00096 <span class=
"preprocessor"></span> void (*_sigaction)( int, siginfo_t *,
<span class=
"keywordtype">void
</span> * );
122 <a name=
"l00097"></a>00097 <span class=
"preprocessor">#endif
</span>
123 <a name=
"l00098"></a>00098 <span class=
"preprocessor"></span> } _signal_handlers;
124 <a name=
"l00099"></a>00099 };
125 <a name=
"l00100"></a>00100
126 <a name=
"l00101"></a>00101 <span class=
"preprocessor">#define sa_handler _signal_handlers._handler
</span>
127 <a name=
"l00102"></a>00102 <span class=
"preprocessor"></span><span class=
"preprocessor">#if defined(_POSIX_REALTIME_SIGNALS)
</span>
128 <a name=
"l00103"></a>00103 <span class=
"preprocessor"></span><span class=
"preprocessor">#define sa_sigaction _signal_handlers._sigaction
</span>
129 <a name=
"l00104"></a>00104 <span class=
"preprocessor"></span><span class=
"preprocessor">#endif
</span>
130 <a name=
"l00105"></a>00105 <span class=
"preprocessor"></span>
131 <a name=
"l00106"></a>00106 <span class=
"preprocessor">#elif defined(__CYGWIN__)
</span>
132 <a name=
"l00107"></a>00107 <span class=
"preprocessor"></span><span class=
"preprocessor">#include
<cygwin/signal.h
></span>
133 <a name=
"l00108"></a>00108 <span class=
"preprocessor">#else
</span>
134 <a name=
"l00109"></a>00109 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SA_NOCLDSTOP
1 </span><span class=
"comment">/* only value supported now for sa_flags */
</span>
135 <a name=
"l00110"></a>00110
136 <a name=
"l00111"></a>00111 <span class=
"keyword">typedef
</span> void (*_sig_func_ptr)(int);
137 <a name=
"l00112"></a>00112
138 <a name=
"l00113"></a>00113 <span class=
"keyword">struct
</span>sigaction
139 <a name=
"l00114"></a>00114 {
140 <a name=
"l00115"></a>00115 _sig_func_ptr sa_handler;
141 <a name=
"l00116"></a>00116 sigset_t sa_mask;
142 <a name=
"l00117"></a>00117 <span class=
"keywordtype">int
</span> sa_flags;
143 <a name=
"l00118"></a>00118 };
144 <a name=
"l00119"></a>00119 <span class=
"preprocessor">#endif
</span><span class=
"comment">/* defined(__rtems__) */
</span>
145 <a name=
"l00120"></a>00120
146 <a name=
"l00121"></a>00121 <span class=
"preprocessor">#define SIG_SETMASK
0 </span><span class=
"comment">/* set mask with sigprocmask() */
</span>
147 <a name=
"l00122"></a>00122 <span class=
"preprocessor">#define SIG_BLOCK
1 </span><span class=
"comment">/* set of signals to block */
</span>
148 <a name=
"l00123"></a>00123 <span class=
"preprocessor">#define SIG_UNBLOCK
2 </span><span class=
"comment">/* set of signals to, well, unblock */
</span>
149 <a name=
"l00124"></a>00124
150 <a name=
"l00125"></a>00125 <span class=
"comment">/* These depend upon the type of sigset_t, which right now
</span>
151 <a name=
"l00126"></a>00126 <span class=
"comment"> is always a long.. They're in the POSIX namespace, but
</span>
152 <a name=
"l00127"></a>00127 <span class=
"comment"> are not ANSI. */
</span>
153 <a name=
"l00128"></a>00128 <span class=
"preprocessor">#define sigaddset(what,sig) (*(what) |= (
1<<(sig)),
0)
</span>
154 <a name=
"l00129"></a>00129 <span class=
"preprocessor"></span><span class=
"preprocessor">#define sigdelset(what,sig) (*(what)
&= ~(
1<<(sig)),
0)
</span>
155 <a name=
"l00130"></a>00130 <span class=
"preprocessor"></span><span class=
"preprocessor">#define sigemptyset(what) (*(what) =
0,
0)
</span>
156 <a name=
"l00131"></a>00131 <span class=
"preprocessor"></span><span class=
"preprocessor">#define sigfillset(what) (*(what) = ~(
0),
0)
</span>
157 <a name=
"l00132"></a>00132 <span class=
"preprocessor"></span><span class=
"preprocessor">#define sigismember(what,sig) (((*(what))
& (
1<<(sig))) !=
0)
</span>
158 <a name=
"l00133"></a>00133 <span class=
"preprocessor"></span>
159 <a name=
"l00134"></a>00134 <span class=
"keywordtype">int
</span> _EXFUN(sigprocmask, (
<span class=
"keywordtype">int
</span> how,
<span class=
"keyword">const
</span> sigset_t *
<span class=
"keyword">set
</span>, sigset_t *oset));
160 <a name=
"l00135"></a>00135
161 <a name=
"l00136"></a>00136 <span class=
"preprocessor">#if defined(_POSIX_THREADS)
</span>
162 <a name=
"l00137"></a>00137 <span class=
"preprocessor"></span><span class=
"keywordtype">int
</span> _EXFUN(pthread_sigmask, (
<span class=
"keywordtype">int
</span> how,
<span class=
"keyword">const
</span> sigset_t *
<span class=
"keyword">set
</span>, sigset_t *oset));
163 <a name=
"l00138"></a>00138 <span class=
"preprocessor">#endif
</span>
164 <a name=
"l00139"></a>00139 <span class=
"preprocessor"></span>
165 <a name=
"l00140"></a>00140 <span class=
"comment">/* protos for functions found in winsup sources for CYGWIN */
</span>
166 <a name=
"l00141"></a>00141 <span class=
"preprocessor">#if defined(__CYGWIN__) || defined(__rtems__)
</span>
167 <a name=
"l00142"></a>00142 <span class=
"preprocessor"></span><span class=
"preprocessor">#undef sigaddset
</span>
168 <a name=
"l00143"></a>00143 <span class=
"preprocessor"></span><span class=
"preprocessor">#undef sigdelset
</span>
169 <a name=
"l00144"></a>00144 <span class=
"preprocessor"></span><span class=
"preprocessor">#undef sigemptyset
</span>
170 <a name=
"l00145"></a>00145 <span class=
"preprocessor"></span><span class=
"preprocessor">#undef sigfillset
</span>
171 <a name=
"l00146"></a>00146 <span class=
"preprocessor"></span><span class=
"preprocessor">#undef sigismember
</span>
172 <a name=
"l00147"></a>00147 <span class=
"preprocessor"></span><span class=
"comment">/* The first argument to kill should be pid_t. Right now
</span>
173 <a name=
"l00148"></a>00148 <span class=
"comment"> <sys/types.h
> always defines pid_t to be int. If that ever
</span>
174 <a name=
"l00149"></a>00149 <span class=
"comment"> changes, then we will need to do something else, perhaps along the
</span>
175 <a name=
"l00150"></a>00150 <span class=
"comment"> lines of
<machine/types.h
>. */
</span>
176 <a name=
"l00151"></a>00151 <span class=
"keywordtype">int
</span> _EXFUN(kill, (
<span class=
"keywordtype">int
</span>,
<span class=
"keywordtype">int
</span>));
177 <a name=
"l00152"></a>00152 <span class=
"keywordtype">int
</span> _EXFUN(killpg, (pid_t,
<span class=
"keywordtype">int
</span>));
178 <a name=
"l00153"></a>00153 <span class=
"keywordtype">int
</span> _EXFUN(sigaction, (
<span class=
"keywordtype">int
</span>,
<span class=
"keyword">const
</span> <span class=
"keyword">struct
</span> sigaction *,
<span class=
"keyword">struct
</span> sigaction *));
179 <a name=
"l00154"></a>00154 <span class=
"keywordtype">int
</span> _EXFUN(sigaddset, (sigset_t *,
<span class=
"keyword">const
</span> <span class=
"keywordtype">int
</span>));
180 <a name=
"l00155"></a>00155 <span class=
"keywordtype">int
</span> _EXFUN(sigdelset, (sigset_t *,
<span class=
"keyword">const
</span> <span class=
"keywordtype">int
</span>));
181 <a name=
"l00156"></a>00156 <span class=
"keywordtype">int
</span> _EXFUN(sigismember, (
<span class=
"keyword">const
</span> sigset_t *,
<span class=
"keywordtype">int
</span>));
182 <a name=
"l00157"></a>00157 <span class=
"keywordtype">int
</span> _EXFUN(sigfillset, (sigset_t *));
183 <a name=
"l00158"></a>00158 <span class=
"keywordtype">int
</span> _EXFUN(sigemptyset, (sigset_t *));
184 <a name=
"l00159"></a>00159 <span class=
"keywordtype">int
</span> _EXFUN(sigpending, (sigset_t *));
185 <a name=
"l00160"></a>00160 <span class=
"keywordtype">int
</span> _EXFUN(sigsuspend, (
<span class=
"keyword">const
</span> sigset_t *));
186 <a name=
"l00161"></a>00161 <span class=
"keywordtype">int
</span> _EXFUN(sigpause, (
<span class=
"keywordtype">int
</span>));
187 <a name=
"l00162"></a>00162
188 <a name=
"l00163"></a>00163 <span class=
"preprocessor">#if defined(_POSIX_THREADS)
</span>
189 <a name=
"l00164"></a>00164 <span class=
"preprocessor"></span><span class=
"preprocessor">#ifdef __CYGWIN__
</span>
190 <a name=
"l00165"></a>00165 <span class=
"preprocessor"></span><span class=
"preprocessor"># ifndef _CYGWIN_TYPES_H
</span>
191 <a name=
"l00166"></a>00166 <span class=
"preprocessor"></span><span class=
"preprocessor"># error You need the winsup sources or a cygwin installation to compile the cygwin version of newlib.
</span>
192 <a name=
"l00167"></a>00167 <span class=
"preprocessor"></span><span class=
"preprocessor"># endif
</span>
193 <a name=
"l00168"></a>00168 <span class=
"preprocessor"></span><span class=
"preprocessor">#endif
</span>
194 <a name=
"l00169"></a>00169 <span class=
"preprocessor"></span><span class=
"keywordtype">int
</span> _EXFUN(pthread_kill, (
<a class=
"code" href=
"group___pthread.html#g405938c67e9c568fde9993c7e14d58ec" title=
"Thread identifier type.">pthread_t
</a> thread,
<span class=
"keywordtype">int
</span> sig));
195 <a name=
"l00170"></a>00170 <span class=
"preprocessor">#endif
</span>
196 <a name=
"l00171"></a>00171 <span class=
"preprocessor"></span>
197 <a name=
"l00172"></a>00172 <span class=
"preprocessor">#if defined(_POSIX_REALTIME_SIGNALS)
</span>
198 <a name=
"l00173"></a>00173 <span class=
"preprocessor"></span>
199 <a name=
"l00174"></a>00174 <span class=
"comment">/*
3.3.8 Synchronously Accept a Signal, P1003.1b-
1993, p.
76</span>
200 <a name=
"l00175"></a>00175 <span class=
"comment"> NOTE: P1003.1c/D10, p.
39 adds sigwait(). */
</span>
201 <a name=
"l00176"></a>00176
202 <a name=
"l00177"></a>00177 <span class=
"keywordtype">int
</span> _EXFUN(sigwaitinfo, (
<span class=
"keyword">const
</span> sigset_t *
<span class=
"keyword">set
</span>, siginfo_t *info));
203 <a name=
"l00178"></a>00178 <span class=
"keywordtype">int
</span> _EXFUN(sigtimedwait,
204 <a name=
"l00179"></a>00179 (
<span class=
"keyword">const
</span> sigset_t *
<span class=
"keyword">set
</span>, siginfo_t *info,
<span class=
"keyword">const
</span> <span class=
"keyword">struct
</span> timespec *timeout)
205 <a name=
"l00180"></a>00180 );
206 <a name=
"l00181"></a>00181 <span class=
"keywordtype">int
</span> _EXFUN(sigwait, (
<span class=
"keyword">const
</span> sigset_t *
<span class=
"keyword">set
</span>,
<span class=
"keywordtype">int
</span> *sig));
207 <a name=
"l00182"></a>00182
208 <a name=
"l00183"></a>00183 <span class=
"comment">/*
3.3.9 Queue a Signal to a Process, P1003.1b-
1993, p.
78 */
</span>
209 <a name=
"l00184"></a>00184 <span class=
"keywordtype">int
</span> _EXFUN(sigqueue, (pid_t pid,
<span class=
"keywordtype">int
</span> signo,
<span class=
"keyword">const
</span> <span class=
"keyword">union
</span> sigval value));
210 <a name=
"l00185"></a>00185
211 <a name=
"l00186"></a>00186 <span class=
"preprocessor">#endif
</span><span class=
"comment">/* defined(_POSIX_REALTIME_SIGNALS) */
</span>
212 <a name=
"l00187"></a>00187
213 <a name=
"l00188"></a>00188 <span class=
"preprocessor">#endif
</span><span class=
"comment">/* defined(__CYGWIN__) || defined(__rtems__) */
</span>
214 <a name=
"l00189"></a>00189
215 <a name=
"l00190"></a>00190 <span class=
"comment">/* #endif __STRICT_ANSI__ */
</span>
216 <a name=
"l00191"></a>00191
217 <a name=
"l00192"></a>00192 <span class=
"preprocessor">#if defined(___AM29K__)
</span>
218 <a name=
"l00193"></a>00193 <span class=
"preprocessor"></span><span class=
"comment">/* These all need to be defined for ANSI C, but I don't think they are
</span>
219 <a name=
"l00194"></a>00194 <span class=
"comment"> meaningful. */
</span>
220 <a name=
"l00195"></a>00195 <span class=
"preprocessor">#define SIGABRT
1</span>
221 <a name=
"l00196"></a>00196 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGFPE
1</span>
222 <a name=
"l00197"></a>00197 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGILL
1</span>
223 <a name=
"l00198"></a>00198 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGINT
1</span>
224 <a name=
"l00199"></a>00199 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGSEGV
1</span>
225 <a name=
"l00200"></a>00200 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGTERM
1</span>
226 <a name=
"l00201"></a>00201 <span class=
"preprocessor"></span><span class=
"comment">/* These need to be defined for POSIX, and some others do too. */
</span>
227 <a name=
"l00202"></a>00202 <span class=
"preprocessor">#define SIGHUP
1</span>
228 <a name=
"l00203"></a>00203 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGQUIT
1</span>
229 <a name=
"l00204"></a>00204 <span class=
"preprocessor"></span><span class=
"preprocessor">#define NSIG
2</span>
230 <a name=
"l00205"></a>00205 <span class=
"preprocessor"></span><span class=
"preprocessor">#elif defined(__GO32__)
</span>
231 <a name=
"l00206"></a>00206 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGINT
1</span>
232 <a name=
"l00207"></a>00207 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGKILL
2</span>
233 <a name=
"l00208"></a>00208 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGPIPE
3</span>
234 <a name=
"l00209"></a>00209 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGFPE
4</span>
235 <a name=
"l00210"></a>00210 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGHUP
5</span>
236 <a name=
"l00211"></a>00211 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGTERM
6</span>
237 <a name=
"l00212"></a>00212 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGSEGV
7</span>
238 <a name=
"l00213"></a>00213 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGTSTP
8</span>
239 <a name=
"l00214"></a>00214 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGQUIT
9</span>
240 <a name=
"l00215"></a>00215 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGTRAP
10</span>
241 <a name=
"l00216"></a>00216 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGILL
11</span>
242 <a name=
"l00217"></a>00217 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGEMT
12</span>
243 <a name=
"l00218"></a>00218 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGALRM
13</span>
244 <a name=
"l00219"></a>00219 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGBUS
14</span>
245 <a name=
"l00220"></a>00220 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGLOST
15</span>
246 <a name=
"l00221"></a>00221 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGSTOP
16</span>
247 <a name=
"l00222"></a>00222 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGABRT
17</span>
248 <a name=
"l00223"></a>00223 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGUSR1
18</span>
249 <a name=
"l00224"></a>00224 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGUSR2
19</span>
250 <a name=
"l00225"></a>00225 <span class=
"preprocessor"></span><span class=
"preprocessor">#define NSIG
20</span>
251 <a name=
"l00226"></a>00226 <span class=
"preprocessor"></span><span class=
"preprocessor">#elif !defined(SIGTRAP)
</span>
252 <a name=
"l00227"></a>00227 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGHUP
1 </span><span class=
"comment">/* hangup */
</span>
253 <a name=
"l00228"></a>00228 <span class=
"preprocessor">#define SIGINT
2 </span><span class=
"comment">/* interrupt */
</span>
254 <a name=
"l00229"></a>00229 <span class=
"preprocessor">#define SIGQUIT
3 </span><span class=
"comment">/* quit */
</span>
255 <a name=
"l00230"></a>00230 <span class=
"preprocessor">#define SIGILL
4 </span><span class=
"comment">/* illegal instruction (not reset when caught) */
</span>
256 <a name=
"l00231"></a>00231 <span class=
"preprocessor">#define SIGTRAP
5 </span><span class=
"comment">/* trace trap (not reset when caught) */
</span>
257 <a name=
"l00232"></a>00232 <span class=
"preprocessor">#define SIGIOT
6 </span><span class=
"comment">/* IOT instruction */
</span>
258 <a name=
"l00233"></a>00233 <span class=
"preprocessor">#define SIGABRT
6 </span><span class=
"comment">/* used by abort, replace SIGIOT in the future */
</span>
259 <a name=
"l00234"></a>00234 <span class=
"preprocessor">#define SIGEMT
7 </span><span class=
"comment">/* EMT instruction */
</span>
260 <a name=
"l00235"></a>00235 <span class=
"preprocessor">#define SIGFPE
8 </span><span class=
"comment">/* floating point exception */
</span>
261 <a name=
"l00236"></a>00236 <span class=
"preprocessor">#define SIGKILL
9 </span><span class=
"comment">/* kill (cannot be caught or ignored) */
</span>
262 <a name=
"l00237"></a>00237 <span class=
"preprocessor">#define SIGBUS
10 </span><span class=
"comment">/* bus error */
</span>
263 <a name=
"l00238"></a>00238 <span class=
"preprocessor">#define SIGSEGV
11 </span><span class=
"comment">/* segmentation violation */
</span>
264 <a name=
"l00239"></a>00239 <span class=
"preprocessor">#define SIGSYS
12 </span><span class=
"comment">/* bad argument to system call */
</span>
265 <a name=
"l00240"></a>00240 <span class=
"preprocessor">#define SIGPIPE
13 </span><span class=
"comment">/* write on a pipe with no one to read it */
</span>
266 <a name=
"l00241"></a>00241 <span class=
"preprocessor">#define SIGALRM
14 </span><span class=
"comment">/* alarm clock */
</span>
267 <a name=
"l00242"></a>00242 <span class=
"preprocessor">#define SIGTERM
15 </span><span class=
"comment">/* software termination signal from kill */
</span>
268 <a name=
"l00243"></a>00243
269 <a name=
"l00244"></a>00244 <span class=
"preprocessor">#if defined(__rtems__)
</span>
270 <a name=
"l00245"></a>00245 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGURG
16 </span><span class=
"comment">/* urgent condition on IO channel */
</span>
271 <a name=
"l00246"></a>00246 <span class=
"preprocessor">#define SIGSTOP
17 </span><span class=
"comment">/* sendable stop signal not from tty */
</span>
272 <a name=
"l00247"></a>00247 <span class=
"preprocessor">#define SIGTSTP
18 </span><span class=
"comment">/* stop signal from tty */
</span>
273 <a name=
"l00248"></a>00248 <span class=
"preprocessor">#define SIGCONT
19 </span><span class=
"comment">/* continue a stopped process */
</span>
274 <a name=
"l00249"></a>00249 <span class=
"preprocessor">#define SIGCHLD
20 </span><span class=
"comment">/* to parent on child stop or exit */
</span>
275 <a name=
"l00250"></a>00250 <span class=
"preprocessor">#define SIGCLD
20 </span><span class=
"comment">/* System V name for SIGCHLD */
</span>
276 <a name=
"l00251"></a>00251 <span class=
"preprocessor">#define SIGTTIN
21 </span><span class=
"comment">/* to readers pgrp upon background tty read */
</span>
277 <a name=
"l00252"></a>00252 <span class=
"preprocessor">#define SIGTTOU
22 </span><span class=
"comment">/* like TTIN for output if (tp-
>t_local
&LTOSTOP) */
</span>
278 <a name=
"l00253"></a>00253 <span class=
"preprocessor">#define SIGIO
23 </span><span class=
"comment">/* input/output possible signal */
</span>
279 <a name=
"l00254"></a>00254 <span class=
"preprocessor">#define SIGPOLL SIGIO
</span><span class=
"comment">/* System V name for SIGIO */
</span>
280 <a name=
"l00255"></a>00255 <span class=
"preprocessor">#define SIGWINCH
24 </span><span class=
"comment">/* window changed */
</span>
281 <a name=
"l00256"></a>00256 <span class=
"preprocessor">#define SIGUSR1
25 </span><span class=
"comment">/* user defined signal
1 */
</span>
282 <a name=
"l00257"></a>00257 <span class=
"preprocessor">#define SIGUSR2
26 </span><span class=
"comment">/* user defined signal
2 */
</span>
283 <a name=
"l00258"></a>00258
284 <a name=
"l00259"></a>00259 <span class=
"comment">/* Real-Time Signals Range, P1003.1b-
1993, p.
61</span>
285 <a name=
"l00260"></a>00260 <span class=
"comment"> NOTE: By P1003.1b-
1993, this should be at least RTSIG_MAX
</span>
286 <a name=
"l00261"></a>00261 <span class=
"comment"> (which is a minimum of
8) signals.
</span>
287 <a name=
"l00262"></a>00262 <span class=
"comment"> */
</span>
288 <a name=
"l00263"></a>00263 <span class=
"preprocessor">#define SIGRTMIN
27</span>
289 <a name=
"l00264"></a>00264 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGRTMAX
31</span>
290 <a name=
"l00265"></a>00265 <span class=
"preprocessor"></span><span class=
"preprocessor">#define __SIGFIRSTNOTRT SIGHUP
</span>
291 <a name=
"l00266"></a>00266 <span class=
"preprocessor"></span><span class=
"preprocessor">#define __SIGLASTNOTRT SIGUSR2
</span>
292 <a name=
"l00267"></a>00267 <span class=
"preprocessor"></span>
293 <a name=
"l00268"></a>00268 <span class=
"preprocessor">#define NSIG
32 </span><span class=
"comment">/* signal
0 implied */
</span>
294 <a name=
"l00269"></a>00269
295 <a name=
"l00270"></a>00270 <span class=
"preprocessor">#elif defined(__svr4__)
</span>
296 <a name=
"l00271"></a>00271 <span class=
"preprocessor"></span><span class=
"comment">/* svr4 specifics. different signals above
15, and sigaction. */
</span>
297 <a name=
"l00272"></a>00272 <span class=
"preprocessor">#define SIGUSR1
16</span>
298 <a name=
"l00273"></a>00273 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGUSR2
17</span>
299 <a name=
"l00274"></a>00274 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGCLD
18</span>
300 <a name=
"l00275"></a>00275 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGPWR
19</span>
301 <a name=
"l00276"></a>00276 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGWINCH
20</span>
302 <a name=
"l00277"></a>00277 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGPOLL
22 </span><span class=
"comment">/*
20 for x.out binaries!!!! */
</span>
303 <a name=
"l00278"></a>00278 <span class=
"preprocessor">#define SIGSTOP
23 </span><span class=
"comment">/* sendable stop signal not from tty */
</span>
304 <a name=
"l00279"></a>00279 <span class=
"preprocessor">#define SIGTSTP
24 </span><span class=
"comment">/* stop signal from tty */
</span>
305 <a name=
"l00280"></a>00280 <span class=
"preprocessor">#define SIGCONT
25 </span><span class=
"comment">/* continue a stopped process */
</span>
306 <a name=
"l00281"></a>00281 <span class=
"preprocessor">#define SIGTTIN
26 </span><span class=
"comment">/* to readers pgrp upon background tty read */
</span>
307 <a name=
"l00282"></a>00282 <span class=
"preprocessor">#define SIGTTOU
27 </span><span class=
"comment">/* like TTIN for output if (tp-
>t_local
&LTOSTOP) */
</span>
308 <a name=
"l00283"></a>00283 <span class=
"preprocessor">#define NSIG
28 </span>
309 <a name=
"l00284"></a>00284 <span class=
"preprocessor"></span><span class=
"preprocessor">#else
</span>
310 <a name=
"l00285"></a>00285 <span class=
"preprocessor"></span><span class=
"preprocessor">#define SIGURG
16 </span><span class=
"comment">/* urgent condition on IO channel */
</span>
311 <a name=
"l00286"></a>00286 <span class=
"preprocessor">#define SIGSTOP
17 </span><span class=
"comment">/* sendable stop signal not from tty */
</span>
312 <a name=
"l00287"></a>00287 <span class=
"preprocessor">#define SIGTSTP
18 </span><span class=
"comment">/* stop signal from tty */
</span>
313 <a name=
"l00288"></a>00288 <span class=
"preprocessor">#define SIGCONT
19 </span><span class=
"comment">/* continue a stopped process */
</span>
314 <a name=
"l00289"></a>00289 <span class=
"preprocessor">#define SIGCHLD
20 </span><span class=
"comment">/* to parent on child stop or exit */
</span>
315 <a name=
"l00290"></a>00290 <span class=
"preprocessor">#define SIGCLD
20 </span><span class=
"comment">/* System V name for SIGCHLD */
</span>
316 <a name=
"l00291"></a>00291 <span class=
"preprocessor">#define SIGTTIN
21 </span><span class=
"comment">/* to readers pgrp upon background tty read */
</span>
317 <a name=
"l00292"></a>00292 <span class=
"preprocessor">#define SIGTTOU
22 </span><span class=
"comment">/* like TTIN for output if (tp-
>t_local
&LTOSTOP) */
</span>
318 <a name=
"l00293"></a>00293 <span class=
"preprocessor">#define SIGIO
23 </span><span class=
"comment">/* input/output possible signal */
</span>
319 <a name=
"l00294"></a>00294 <span class=
"preprocessor">#define SIGPOLL SIGIO
</span><span class=
"comment">/* System V name for SIGIO */
</span>
320 <a name=
"l00295"></a>00295 <span class=
"preprocessor">#define SIGXCPU
24 </span><span class=
"comment">/* exceeded CPU time limit */
</span>
321 <a name=
"l00296"></a>00296 <span class=
"preprocessor">#define SIGXFSZ
25 </span><span class=
"comment">/* exceeded file size limit */
</span>
322 <a name=
"l00297"></a>00297 <span class=
"preprocessor">#define SIGVTALRM
26 </span><span class=
"comment">/* virtual time alarm */
</span>
323 <a name=
"l00298"></a>00298 <span class=
"preprocessor">#define SIGPROF
27 </span><span class=
"comment">/* profiling time alarm */
</span>
324 <a name=
"l00299"></a>00299 <span class=
"preprocessor">#define SIGWINCH
28 </span><span class=
"comment">/* window changed */
</span>
325 <a name=
"l00300"></a>00300 <span class=
"preprocessor">#define SIGLOST
29 </span><span class=
"comment">/* resource lost (eg, record-lock lost) */
</span>
326 <a name=
"l00301"></a>00301 <span class=
"preprocessor">#define SIGUSR1
30 </span><span class=
"comment">/* user defined signal
1 */
</span>
327 <a name=
"l00302"></a>00302 <span class=
"preprocessor">#define SIGUSR2
31 </span><span class=
"comment">/* user defined signal
2 */
</span>
328 <a name=
"l00303"></a>00303 <span class=
"preprocessor">#define NSIG
32 </span><span class=
"comment">/* signal
0 implied */
</span>
329 <a name=
"l00304"></a>00304 <span class=
"preprocessor">#endif
</span>
330 <a name=
"l00305"></a>00305 <span class=
"preprocessor"></span><span class=
"preprocessor">#endif
</span>
331 <a name=
"l00306"></a>00306 <span class=
"preprocessor"></span>
332 <a name=
"l00307"></a>00307 <span class=
"preprocessor">#ifdef __cplusplus
</span>
333 <a name=
"l00308"></a>00308 <span class=
"preprocessor"></span>}
334 <a name=
"l00309"></a>00309 <span class=
"preprocessor">#endif
</span>
335 <a name=
"l00310"></a>00310 <span class=
"preprocessor"></span>
336 <a name=
"l00311"></a>00311 <span class=
"preprocessor">#ifndef _SIGNAL_H_
</span>
337 <a name=
"l00312"></a>00312 <span class=
"preprocessor"></span><span class=
"comment">/* Some applications take advantage of the fact that
<sys/signal.h
></span>
338 <a name=
"l00313"></a>00313 <span class=
"comment"> * and
<signal.h
> are equivalent in glibc. Allow for that here. */
</span>
339 <a name=
"l00314"></a>00314 <span class=
"preprocessor">#include
<signal.h
></span>
340 <a name=
"l00315"></a>00315 <span class=
"preprocessor">#endif
</span>
341 <a name=
"l00316"></a>00316 <span class=
"preprocessor"></span><span class=
"preprocessor">#endif
</span><span class=
"comment">/* _SYS_SIGNAL_H */
</span>
345 <a href=
"http://code.google.com/policies.html#restrictions">noted
</a>,
346 the content of this page is licensed under a
347 <a href=
"http://www.google.com/url?sa=D&q=http%3A%2F%2Fcreativecommons.org/licenses/by/2.5/">Creative Commons
348 Attribution
2.5 license
</a>.
352 Generated
30 Mar
2009 by
<a href=
"http://www.doxygen.org/index.html">doxygen
</a> 1.5.7.1