| www.delorie.com/gnu/docs/glibc/libc_504.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Blocking a signal means telling the operating system to hold it and
deliver it later. Generally, a program does not block signals
indefinitely--it might as well ignore them by setting their actions to
SIG_IGN. But it is useful to block signals briefly, to prevent
them from interrupting sensitive operations. For instance:
sigprocmask function to block signals while you
modify global variables that are also modified by the handlers for these
signals.
sa_mask in your sigaction call to block
certain signals while a particular signal handler runs. This way, the
signal handler can run without being interrupted itself by signals.
24.7.1 Why Blocking Signals is Useful The purpose of blocking signals. 24.7.2 Signal Sets How to specify which signals to block. 24.7.3 Process Signal Mask Blocking delivery of signals to your process during normal execution. 24.7.4 Blocking to Test for Delivery of a Signal 24.7.5 Blocking Signals for a Handler Blocking additional signals while a handler is being run. 24.7.6 Checking for Pending Signals 24.7.7 Remembering a Signal to Act On Later How you can get almost the same effect as blocking a signal, by handling it and setting a flag to be tested later.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |