- {
- /* POSIX states that sigprocmask and signal are both
- async-signal-safe. This is not true of our
- implementation - there is a slight data race where an
- asynchronous interrupt on signal A can occur after we
- install blocked_handler but before we have updated
- old_handlers for signal B, such that handler A can see
- stale information if it calls signal(B). Oh well -
- signal handlers really shouldn't try to manipulate the
- installed handlers of unrelated signals. */
- handler_t result = old_handlers[sig];
- old_handlers[sig] = handler;
- return result;
- }
+ {
+ /* POSIX states that sigprocmask and signal are both
+ async-signal-safe. This is not true of our
+ implementation - there is a slight data race where an
+ asynchronous interrupt on signal A can occur after we
+ install blocked_handler but before we have updated
+ old_handlers for signal B, such that handler A can see
+ stale information if it calls signal(B). Oh well -
+ signal handlers really shouldn't try to manipulate the
+ installed handlers of unrelated signals. */
+ handler_t result = old_handlers[sig];
+ old_handlers[sig] = handler;
+ return result;
+ }