Content deleted Content added
Mitch Ames (talk | contribs) →Standard signals: rm unnecessary bold - see MOS:NOBOLD |
m Bot: link syntax and minor changes |
||
(One intermediate revision by one other user not shown) | |||
Line 11:
*<code>SIGABRT</code> – "abort", abnormal termination.
*<code>SIGFPE</code> – [[
*<code>SIGILL</code> – "illegal", invalid instruction.
*<code>SIGINT</code> – "interrupt", interactive attention request sent to the program.
*<code>SIGSEGV</code> – "[[
*<code>SIGTERM</code> – "terminate", termination request sent to the program.
Line 54:
#include <stdio.h>
#include <stdlib.h>
volatile sig_atomic_t status = 0;
static void catch_function(int signo) {
status = signo;
puts("Interactive attention signal caught.");▼
}
Line 66 ⟶ 68:
}
puts("Raising the interactive attention signal.");
if (raise(SIGINT)
fputs("Error raising the signal.\n", stderr);
return EXIT_FAILURE;
}
▲ if (status == SIGINT) puts("Interactive attention signal caught.");
puts("Exiting.");
return EXIT_SUCCESS;
|