1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-1998. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @chapter Signal Manager |
---|
10 | |
---|
11 | @section Introduction |
---|
12 | |
---|
13 | The signal manager ... |
---|
14 | |
---|
15 | The directives provided by the signal manager are: |
---|
16 | |
---|
17 | @itemize @bullet |
---|
18 | @item @code{sigaddset} - Add a Signal to a Signal Set |
---|
19 | @item @code{sigdelset} - Delete a Signal from a Signal Set |
---|
20 | @item @code{sigfillset} - Fill a Signal Set |
---|
21 | @item @code{sigismember} - Is Signal a Member of a Signal Set |
---|
22 | @item @code{sigemptyset} - Empty a Signal Set |
---|
23 | @item @code{sigaction} - Examine and Change Signal Action |
---|
24 | @item @code{pthread_kill} - Send a Signal to a Thread |
---|
25 | @item @code{sigprocmask} - Examine and Change Process Blocked Signals |
---|
26 | @item @code{pthread_sigmask} - Examine and Change Thread Blocked Signals |
---|
27 | @item @code{kill} - Send a Signal to a Process |
---|
28 | @item @code{sigpending} - Examine Pending Signals |
---|
29 | @item @code{sigsuspend} - Wait for a Signal |
---|
30 | @item @code{pause} - Suspend Process Execution |
---|
31 | @item @code{sigwait} - Synchronously Accept a Signal |
---|
32 | @item @code{sigwaitinfo} - Synchronously Accept a Signal |
---|
33 | @item @code{sigtimedwait} - Synchronously Accept a Signal with Timeout |
---|
34 | @item @code{sigqueue} - Queue a Signal to a Process |
---|
35 | @item @code{alarm} - Schedule Alarm |
---|
36 | @end itemize |
---|
37 | |
---|
38 | @section Background |
---|
39 | |
---|
40 | @subsection Signal Delivery |
---|
41 | |
---|
42 | Signals directed at a thread are delivered to the specified thread. |
---|
43 | |
---|
44 | Signals directed at a process are delivered to a thread which is selected |
---|
45 | based on the following algorithm: |
---|
46 | |
---|
47 | @enumerate |
---|
48 | @item If the action for this signal is currently @code{SIG_IGN}, |
---|
49 | then the signal is simply ignored. |
---|
50 | |
---|
51 | @item If the currently executing thread has the signal unblocked, then |
---|
52 | the signal is delivered to it. |
---|
53 | |
---|
54 | @item If any threads are currently blocked waiting for this signal |
---|
55 | (@code{sigwait()}), then the signal is delivered to the highest priority |
---|
56 | thread waiting for this signal. |
---|
57 | |
---|
58 | @item If any other threads are willing to accept delivery of the signal, then |
---|
59 | the signal is delivered to the highest priority thread of this set. In the |
---|
60 | event, multiple threads of the same priority are willing to accept this |
---|
61 | signal, then priority is given first to ready threads, then to threads |
---|
62 | blocked on calls which may be interrupted, and finally to threads blocked |
---|
63 | on non-interruptible calls. |
---|
64 | |
---|
65 | @item In the event the signal still can not be delivered, then it is left |
---|
66 | pending. The first thread to unblock the signal (@code{sigprocmask()} or |
---|
67 | @code{pthread_sigprocmask()}) or to wait for this signal |
---|
68 | (@code{sigwait()}) will be the recipient of the signal. |
---|
69 | |
---|
70 | @end enumerate |
---|
71 | |
---|
72 | @section Operations |
---|
73 | |
---|
74 | There is currently no text in this section. |
---|
75 | |
---|
76 | @section Directives |
---|
77 | |
---|
78 | This section details the signal manager's directives. |
---|
79 | A subsection is dedicated to each of this manager's directives |
---|
80 | and describes the calling sequence, related constants, usage, |
---|
81 | and status codes. |
---|
82 | |
---|
83 | @page |
---|
84 | @subsection sigaddset - Add a Signal to a Signal Set |
---|
85 | |
---|
86 | @subheading CALLING SEQUENCE: |
---|
87 | |
---|
88 | @example |
---|
89 | #include <signal.h> |
---|
90 | |
---|
91 | int sigaddset( |
---|
92 | sigset_t *set, |
---|
93 | int signo |
---|
94 | ); |
---|
95 | @end example |
---|
96 | |
---|
97 | @subheading STATUS CODES: |
---|
98 | |
---|
99 | @table @b |
---|
100 | @item EINVAL |
---|
101 | Invalid argument passed. |
---|
102 | |
---|
103 | @end table |
---|
104 | |
---|
105 | @subheading DESCRIPTION: |
---|
106 | |
---|
107 | This function adds the @code{signo} to the specified signal @code{set}. |
---|
108 | |
---|
109 | @subheading NOTES: |
---|
110 | |
---|
111 | @page |
---|
112 | @subsection sigdelset - Delete a Signal from a Signal Set |
---|
113 | |
---|
114 | @subheading CALLING SEQUENCE: |
---|
115 | |
---|
116 | @example |
---|
117 | #include <signal.h> |
---|
118 | |
---|
119 | int sigdelset( |
---|
120 | sigset_t *set, |
---|
121 | int signo |
---|
122 | ); |
---|
123 | @end example |
---|
124 | |
---|
125 | @subheading STATUS CODES: |
---|
126 | |
---|
127 | @table @b |
---|
128 | @item EINVAL |
---|
129 | Invalid argument passed. |
---|
130 | |
---|
131 | @end table |
---|
132 | |
---|
133 | @subheading DESCRIPTION: |
---|
134 | |
---|
135 | This function deletes the @code{signo} to the specified signal @code{set}. |
---|
136 | |
---|
137 | @subheading NOTES: |
---|
138 | |
---|
139 | NONE |
---|
140 | |
---|
141 | @page |
---|
142 | @subsection sigfillset - Fill a Signal Set |
---|
143 | |
---|
144 | @subheading CALLING SEQUENCE: |
---|
145 | |
---|
146 | @example |
---|
147 | #include <signal.h> |
---|
148 | |
---|
149 | int sigfillset( |
---|
150 | sigset_t *set |
---|
151 | ); |
---|
152 | @end example |
---|
153 | |
---|
154 | @subheading STATUS CODES: |
---|
155 | |
---|
156 | @table @b |
---|
157 | |
---|
158 | @item EINVAL |
---|
159 | Invalid argument passed. |
---|
160 | |
---|
161 | @end table |
---|
162 | |
---|
163 | @subheading DESCRIPTION: |
---|
164 | |
---|
165 | This function fills the specified signal @code{set} such that all |
---|
166 | signals are set. |
---|
167 | |
---|
168 | @subheading NOTES: |
---|
169 | |
---|
170 | NONE |
---|
171 | |
---|
172 | @page |
---|
173 | @subsection sigismember - Is Signal a Member of a Signal Set |
---|
174 | |
---|
175 | @subheading CALLING SEQUENCE: |
---|
176 | |
---|
177 | @example |
---|
178 | #include <signal.h> |
---|
179 | |
---|
180 | int sigismember( |
---|
181 | const sigset_t *set, |
---|
182 | int signo |
---|
183 | ); |
---|
184 | @end example |
---|
185 | |
---|
186 | @subheading STATUS CODES: |
---|
187 | |
---|
188 | @table @b |
---|
189 | |
---|
190 | @item EINVAL |
---|
191 | Invalid argument passed. |
---|
192 | |
---|
193 | @end table |
---|
194 | |
---|
195 | @subheading DESCRIPTION: |
---|
196 | |
---|
197 | This function returns returns 1 if @code{signo} is a member of @code{set} |
---|
198 | and 0 otherwise. |
---|
199 | |
---|
200 | @subheading NOTES: |
---|
201 | |
---|
202 | NONE |
---|
203 | |
---|
204 | @page |
---|
205 | @subsection sigemptyset - Empty a Signal Set |
---|
206 | |
---|
207 | @subheading CALLING SEQUENCE: |
---|
208 | |
---|
209 | @example |
---|
210 | #include <signal.h> |
---|
211 | |
---|
212 | int sigemptyset( |
---|
213 | sigset_t *set |
---|
214 | ); |
---|
215 | @end example |
---|
216 | |
---|
217 | @subheading STATUS CODES: |
---|
218 | |
---|
219 | @table @b |
---|
220 | |
---|
221 | @item EINVAL |
---|
222 | Invalid argument passed. |
---|
223 | |
---|
224 | @end table |
---|
225 | |
---|
226 | @subheading DESCRIPTION: |
---|
227 | |
---|
228 | This function fills the specified signal @code{set} such that all |
---|
229 | signals are cleared. |
---|
230 | |
---|
231 | @subheading NOTES: |
---|
232 | |
---|
233 | NONE |
---|
234 | |
---|
235 | @page |
---|
236 | @subsection sigaction - Examine and Change Signal Action |
---|
237 | |
---|
238 | @subheading CALLING SEQUENCE: |
---|
239 | |
---|
240 | @example |
---|
241 | #include <signal.h> |
---|
242 | |
---|
243 | int sigaction( |
---|
244 | int sig, |
---|
245 | const struct sigaction *act, |
---|
246 | struct sigaction *oact |
---|
247 | ); |
---|
248 | @end example |
---|
249 | |
---|
250 | @subheading STATUS CODES: |
---|
251 | |
---|
252 | @table @b |
---|
253 | @item EINVAL |
---|
254 | Invalid argument passed. |
---|
255 | |
---|
256 | @item ENOTSUP |
---|
257 | Realtime Signals Extension option not supported. |
---|
258 | |
---|
259 | @end table |
---|
260 | |
---|
261 | @subheading DESCRIPTION: |
---|
262 | |
---|
263 | This function is used to change the action taken by a process on |
---|
264 | receipt of the specfic signal @code{sig}. The new action is |
---|
265 | specified by @code{act} and the previous action is returned |
---|
266 | via @code{oact}. |
---|
267 | |
---|
268 | @subheading NOTES: |
---|
269 | |
---|
270 | The signal number cannot be SIGKILL. |
---|
271 | |
---|
272 | @page |
---|
273 | @subsection pthread_kill - Send a Signal to a Thread |
---|
274 | |
---|
275 | @subheading CALLING SEQUENCE: |
---|
276 | |
---|
277 | @example |
---|
278 | #include <signal.h> |
---|
279 | |
---|
280 | int pthread_kill( |
---|
281 | pthread_t thread, |
---|
282 | int sig |
---|
283 | ); |
---|
284 | @end example |
---|
285 | |
---|
286 | @subheading STATUS CODES: |
---|
287 | |
---|
288 | @table @b |
---|
289 | |
---|
290 | @item ESRCH |
---|
291 | The thread indicated by the parameter thread is invalid. |
---|
292 | |
---|
293 | @item EINVAL |
---|
294 | Invalid argument passed. |
---|
295 | |
---|
296 | @end table |
---|
297 | |
---|
298 | @subheading DESCRIPTION: |
---|
299 | |
---|
300 | This functions sends the specified signal @code{sig} to @code{thread}. |
---|
301 | |
---|
302 | @subheading NOTES: |
---|
303 | |
---|
304 | NONE |
---|
305 | |
---|
306 | @page |
---|
307 | @subsection sigprocmask - Examine and Change Process Blocked Signals |
---|
308 | |
---|
309 | @subheading CALLING SEQUENCE: |
---|
310 | |
---|
311 | @example |
---|
312 | #include <signal.h> |
---|
313 | |
---|
314 | int sigprocmask( |
---|
315 | int how, |
---|
316 | const sigset_t *set, |
---|
317 | sigset_t *oset |
---|
318 | ); |
---|
319 | @end example |
---|
320 | |
---|
321 | @subheading STATUS CODES: |
---|
322 | |
---|
323 | @table @b |
---|
324 | |
---|
325 | @item EINVAL |
---|
326 | Invalid argument passed. |
---|
327 | |
---|
328 | @end table |
---|
329 | |
---|
330 | @subheading DESCRIPTION: |
---|
331 | |
---|
332 | This function is used to alter the set of currently blocked signals |
---|
333 | on a process wide basis. A blocked signal will not be received by the |
---|
334 | process. The behavior of this function is dependent on the value of |
---|
335 | @code{how} which may be one of the following: |
---|
336 | |
---|
337 | @itemize @code |
---|
338 | @item SIG_BLOCK |
---|
339 | The set of blocked signals is set to the union of @code{set} and |
---|
340 | those signals currently blocked. |
---|
341 | |
---|
342 | @item SIG_UNBLOCK |
---|
343 | The signals specific in @code{set} are removed from the currently |
---|
344 | blocked set. |
---|
345 | |
---|
346 | @item SIG_SETMASK |
---|
347 | The set of currently blocked signals is set to @code{set}. |
---|
348 | |
---|
349 | @end itemize |
---|
350 | |
---|
351 | If @code{oset} is not @code{NULL}, then the set of blocked signals |
---|
352 | prior to this call is returned in @code{oset}. |
---|
353 | |
---|
354 | @subheading NOTES: |
---|
355 | |
---|
356 | It is not an error to unblock a signal which is not blocked. |
---|
357 | |
---|
358 | @page |
---|
359 | @subsection pthread_sigmask - Examine and Change Thread Blocked Signals |
---|
360 | |
---|
361 | @subheading CALLING SEQUENCE: |
---|
362 | |
---|
363 | @example |
---|
364 | #include <signal.h> |
---|
365 | |
---|
366 | int pthread_sigmask( |
---|
367 | int how, |
---|
368 | const sigset_t *set, |
---|
369 | sigset_t *oset |
---|
370 | ); |
---|
371 | @end example |
---|
372 | |
---|
373 | @subheading STATUS CODES: |
---|
374 | @table @b |
---|
375 | @item EINVAL |
---|
376 | Invalid argument passed. |
---|
377 | |
---|
378 | @end table |
---|
379 | |
---|
380 | @subheading DESCRIPTION: |
---|
381 | |
---|
382 | This function is used to alter the set of currently blocked signals |
---|
383 | for the calling thread. A blocked signal will not be received by the |
---|
384 | process. The behavior of this function is dependent on the value of |
---|
385 | @code{how} which may be one of the following: |
---|
386 | |
---|
387 | @table @code |
---|
388 | @item SIG_BLOCK |
---|
389 | The set of blocked signals is set to the union of @code{set} and |
---|
390 | those signals currently blocked. |
---|
391 | |
---|
392 | @item SIG_UNBLOCK |
---|
393 | The signals specific in @code{set} are removed from the currently |
---|
394 | blocked set. |
---|
395 | |
---|
396 | @item SIG_SETMASK |
---|
397 | The set of currently blocked signals is set to @code{set}. |
---|
398 | |
---|
399 | @end table |
---|
400 | |
---|
401 | If @code{oset} is not @code{NULL}, then the set of blocked signals |
---|
402 | prior to this call is returned in @code{oset}. |
---|
403 | |
---|
404 | @subheading NOTES: |
---|
405 | |
---|
406 | It is not an error to unblock a signal which is not blocked. |
---|
407 | |
---|
408 | |
---|
409 | @page |
---|
410 | @subsection kill - Send a Signal to a Process |
---|
411 | |
---|
412 | @subheading CALLING SEQUENCE: |
---|
413 | |
---|
414 | @example |
---|
415 | #include <sys/types.h> |
---|
416 | #include <signal.h> |
---|
417 | |
---|
418 | int kill( |
---|
419 | pid_t pid, |
---|
420 | int sig |
---|
421 | ); |
---|
422 | @end example |
---|
423 | |
---|
424 | @subheading STATUS CODES: |
---|
425 | @table @b |
---|
426 | @item EINVAL |
---|
427 | Invalid argument passed. |
---|
428 | |
---|
429 | @item EPERM |
---|
430 | Process does not have permission to send the signal to any receiving process. |
---|
431 | |
---|
432 | @item ESRCH |
---|
433 | The process indicated by the parameter pid is invalid. |
---|
434 | |
---|
435 | @end table |
---|
436 | |
---|
437 | @subheading DESCRIPTION: |
---|
438 | |
---|
439 | This function sends the signal @code{sig} to the process @code{pid}. |
---|
440 | |
---|
441 | @subheading NOTES: |
---|
442 | |
---|
443 | NONE |
---|
444 | |
---|
445 | @page |
---|
446 | @subsection sigpending - Examine Pending Signals |
---|
447 | |
---|
448 | @subheading CALLING SEQUENCE: |
---|
449 | |
---|
450 | @example |
---|
451 | #include <signal.h> |
---|
452 | |
---|
453 | int sigpending( |
---|
454 | const sigset_t *set |
---|
455 | ); |
---|
456 | @end example |
---|
457 | |
---|
458 | @subheading STATUS CODES: |
---|
459 | |
---|
460 | On error, this routine returns -1 and sets errno to one of the following: |
---|
461 | |
---|
462 | @table @b |
---|
463 | |
---|
464 | @item EFAULT |
---|
465 | Invalid address for set. |
---|
466 | |
---|
467 | @end table |
---|
468 | |
---|
469 | @subheading DESCRIPTION: |
---|
470 | |
---|
471 | This function allows the caller to examine the set of currently pending |
---|
472 | signals. A pending signal is one which has been raised but is currently |
---|
473 | blocked. The set of pending signals is returned in @code{set}. |
---|
474 | |
---|
475 | @subheading NOTES: |
---|
476 | |
---|
477 | NONE |
---|
478 | |
---|
479 | @page |
---|
480 | @subsection sigsuspend - Wait for a Signal |
---|
481 | |
---|
482 | @subheading CALLING SEQUENCE: |
---|
483 | |
---|
484 | @example |
---|
485 | #include <signal.h> |
---|
486 | |
---|
487 | int sigsuspend( |
---|
488 | const sigset_t *sigmask |
---|
489 | ); |
---|
490 | @end example |
---|
491 | |
---|
492 | @subheading STATUS CODES: |
---|
493 | |
---|
494 | @table @b |
---|
495 | Returns -1 and sets errno. |
---|
496 | |
---|
497 | @item EINTR |
---|
498 | Signal interrupted this function. |
---|
499 | |
---|
500 | @end table |
---|
501 | |
---|
502 | @subheading DESCRIPTION: |
---|
503 | |
---|
504 | This function temporarily replaces the signal mask for the process |
---|
505 | with that specified by @code{sigmask} and blocks the calling thread |
---|
506 | until the signal is raised. |
---|
507 | |
---|
508 | @subheading NOTES: |
---|
509 | |
---|
510 | NONE |
---|
511 | |
---|
512 | @page |
---|
513 | @subsection pause - Suspend Process Execution |
---|
514 | |
---|
515 | @subheading CALLING SEQUENCE: |
---|
516 | |
---|
517 | @example |
---|
518 | #include <signal.h> |
---|
519 | |
---|
520 | int pause( void ); |
---|
521 | @end example |
---|
522 | |
---|
523 | @subheading STATUS CODES: |
---|
524 | |
---|
525 | @table @b |
---|
526 | Returns -1 and sets errno. |
---|
527 | |
---|
528 | @item EINTR |
---|
529 | Signal interrupted this function. |
---|
530 | |
---|
531 | @end table |
---|
532 | |
---|
533 | @subheading DESCRIPTION: |
---|
534 | |
---|
535 | This function causes the calling thread to be blocked until the signal |
---|
536 | is received. |
---|
537 | |
---|
538 | @subheading NOTES: |
---|
539 | |
---|
540 | NONE |
---|
541 | |
---|
542 | @page |
---|
543 | @subsection sigwait - Synchronously Accept a Signal |
---|
544 | |
---|
545 | @subheading CALLING SEQUENCE: |
---|
546 | |
---|
547 | @example |
---|
548 | #include <signal.h> |
---|
549 | |
---|
550 | int sigwait( |
---|
551 | const sigset_t *set, |
---|
552 | int *sig |
---|
553 | ); |
---|
554 | @end example |
---|
555 | |
---|
556 | @subheading STATUS CODES: |
---|
557 | @table @b |
---|
558 | @item EINVAL |
---|
559 | Invalid argument passed. |
---|
560 | |
---|
561 | @item EINTR |
---|
562 | Signal interrupted this function. |
---|
563 | |
---|
564 | @end table |
---|
565 | |
---|
566 | @subheading DESCRIPTION: |
---|
567 | |
---|
568 | This function selects a pending signal based on the set specified in |
---|
569 | @code{set}, atomically clears it from the set of pending signals, and |
---|
570 | returns the signal number for that signal in @code{sig}. |
---|
571 | |
---|
572 | |
---|
573 | @subheading NOTES: |
---|
574 | |
---|
575 | NONE |
---|
576 | |
---|
577 | @page |
---|
578 | @subsection sigwaitinfo - Synchronously Accept a Signal |
---|
579 | |
---|
580 | @subheading CALLING SEQUENCE: |
---|
581 | |
---|
582 | @example |
---|
583 | #include <signal.h> |
---|
584 | |
---|
585 | int sigwaitinfo( |
---|
586 | const sigset_t *set, |
---|
587 | siginfo_t *info |
---|
588 | ); |
---|
589 | @end example |
---|
590 | |
---|
591 | @subheading STATUS CODES: |
---|
592 | @table @b |
---|
593 | @item EINTR |
---|
594 | Signal interrupted this function. |
---|
595 | |
---|
596 | @end table |
---|
597 | |
---|
598 | @subheading DESCRIPTION: |
---|
599 | |
---|
600 | This function selects a pending signal based on the set specified in |
---|
601 | @code{set}, atomically clears it from the set of pending signals, and |
---|
602 | returns information about that signal in @code{info}. |
---|
603 | |
---|
604 | @subheading NOTES: |
---|
605 | |
---|
606 | NONE |
---|
607 | |
---|
608 | @page |
---|
609 | @subsection sigtimedwait - Synchronously Accept a Signal with Timeout |
---|
610 | |
---|
611 | @subheading CALLING SEQUENCE: |
---|
612 | |
---|
613 | @example |
---|
614 | #include <signal.h> |
---|
615 | |
---|
616 | int sigtimedwait( |
---|
617 | const sigset_t *set, |
---|
618 | siginfo_t *info, |
---|
619 | const struct timespec *timeout |
---|
620 | ); |
---|
621 | @end example |
---|
622 | |
---|
623 | @subheading STATUS CODES: |
---|
624 | @table @b |
---|
625 | @item EAGAIN |
---|
626 | Timed out while waiting for the specified signal set. |
---|
627 | |
---|
628 | @item EINVAL |
---|
629 | Nanoseconds field of the timeout argument is invalid. |
---|
630 | |
---|
631 | @item EINTR |
---|
632 | Signal interrupted this function. |
---|
633 | |
---|
634 | @end table |
---|
635 | |
---|
636 | @subheading DESCRIPTION: |
---|
637 | |
---|
638 | This function selects a pending signal based on the set specified in |
---|
639 | @code{set}, atomically clears it from the set of pending signals, and |
---|
640 | returns information about that signal in @code{info}. The calling thread |
---|
641 | will block up to @code{timeout} waiting for the signal to arrive. |
---|
642 | |
---|
643 | @subheading NOTES: |
---|
644 | |
---|
645 | If @code{timeout} is NULL, then the calling thread will wait forever for |
---|
646 | the specified signal set. |
---|
647 | |
---|
648 | @page |
---|
649 | @subsection sigqueue - Queue a Signal to a Process |
---|
650 | |
---|
651 | @subheading CALLING SEQUENCE: |
---|
652 | |
---|
653 | @example |
---|
654 | #include <signal.h> |
---|
655 | |
---|
656 | int sigqueue( |
---|
657 | pid_t pid, |
---|
658 | int signo, |
---|
659 | const union sigval value |
---|
660 | ); |
---|
661 | @end example |
---|
662 | |
---|
663 | @subheading STATUS CODES: |
---|
664 | |
---|
665 | @table @b |
---|
666 | |
---|
667 | @item EAGAIN |
---|
668 | No resources available to queue the signal. The process has already |
---|
669 | queued SIGQUEUE_MAX signals that are still pending at the receiver |
---|
670 | or the systemwide resource limit has been exceeded. |
---|
671 | |
---|
672 | @item EINVAL |
---|
673 | The value of the signo argument is an invalid or unsupported signal |
---|
674 | number. |
---|
675 | |
---|
676 | @item EPERM |
---|
677 | The process does not have the appropriate privilege to send the signal |
---|
678 | to the receiving process. |
---|
679 | |
---|
680 | @item ESRCH |
---|
681 | The process pid does not exist. |
---|
682 | |
---|
683 | @end table |
---|
684 | |
---|
685 | @subheading DESCRIPTION: |
---|
686 | |
---|
687 | This function sends the signal specified by @code{signo} to the |
---|
688 | process @code{pid} |
---|
689 | |
---|
690 | @subheading NOTES: |
---|
691 | |
---|
692 | NONE |
---|
693 | |
---|
694 | @page |
---|
695 | @subsection alarm - Schedule Alarm |
---|
696 | |
---|
697 | @subheading CALLING SEQUENCE: |
---|
698 | |
---|
699 | @example |
---|
700 | #include <signal.h> |
---|
701 | |
---|
702 | unsigned int alarm( |
---|
703 | unsigned int seconds |
---|
704 | ); |
---|
705 | @end example |
---|
706 | |
---|
707 | @subheading STATUS CODES: |
---|
708 | |
---|
709 | This call always succeeds. |
---|
710 | |
---|
711 | @subheading DESCRIPTION: |
---|
712 | |
---|
713 | If there was a previous @code{alarm()} request with time remaining, |
---|
714 | then this routine returns the number of seconds until that outstanding |
---|
715 | alarm would have fired. If no previous @code{alarm()} request was |
---|
716 | outstanding, then zero is returned. |
---|
717 | |
---|
718 | @subheading NOTES: |
---|
719 | |
---|
720 | NONE |
---|