| @@ -125,26 +125,27 @@ quit(int status) | | | @@ -125,26 +125,27 @@ quit(int status) |
125 | } | | 125 | } |
126 | | | 126 | |
127 | /* | | 127 | /* |
128 | * signal handlers | | 128 | * signal handlers |
129 | */ | | 129 | */ |
130 | | | 130 | |
131 | static void | | 131 | static void |
132 | set_signal(int sig, RETSIGTYPE (*handler)(int)) | | 132 | set_signal(int sig, RETSIGTYPE (*handler)(int)) |
133 | | | 133 | |
134 | { | | 134 | { |
135 | #ifdef HAVE_SIGACTION | | 135 | #ifdef HAVE_SIGACTION |
136 | struct sigaction action; | | 136 | struct sigaction action; |
137 | | | 137 | |
| | | 138 | sigemptyset(&action.sa_mask); |
138 | action.sa_handler = handler; | | 139 | action.sa_handler = handler; |
139 | action.sa_flags = 0; | | 140 | action.sa_flags = 0; |
140 | (void) sigaction(sig, &action, NULL); | | 141 | (void) sigaction(sig, &action, NULL); |
141 | #else | | 142 | #else |
142 | (void) signal(sig, handler); | | 143 | (void) signal(sig, handler); |
143 | #endif | | 144 | #endif |
144 | } | | 145 | } |
145 | | | 146 | |
146 | static void | | 147 | static void |
147 | release_signal(int sig) | | 148 | release_signal(int sig) |
148 | | | 149 | |
149 | { | | 150 | { |
150 | #ifdef HAVE_SIGACTION | | 151 | #ifdef HAVE_SIGACTION |