MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / sig_set

Function sig_set

extern/editline/src/sig.c:157–178  ·  view source on GitHub ↗

sig_set(): * set all the signal handlers */

Source from the content-addressed store, hash-verified

155 * set all the signal handlers
156 */
157protected void
158sig_set(EditLine *el)
159{
160 size_t i;
161 sigset_t oset;
162 struct sigaction osa, nsa;
163
164 nsa.sa_handler = sig_handler;
165 nsa.sa_flags = 0;
166 sigemptyset(&nsa.sa_mask);
167
168 (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset);
169
170 for (i = 0; sighdl[i] != -1; i++) {
171 /* This could happen if we get interrupted */
172 if (sigaction(sighdl[i], &nsa, &osa) != -1 &&
173 osa.sa_handler != sig_handler)
174 el->el_signal->sig_action[i] = osa;
175 }
176 sel = el;
177 (void) sigprocmask(SIG_SETMASK, &oset, NULL);
178}
179
180
181/* sig_clr():

Callers 2

read_charFunction · 0.85
read_prepareFunction · 0.85

Calls 1

sigactionClass · 0.70

Tested by

no test coverage detected