pacman: set SA_RESTART for signal handler
Calling a signal handler interrupts some functions, most notably read() and therefore fgets(). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
parent
c792262b13
commit
24e0bd215c
1 changed files with 1 additions and 1 deletions
|
@ -1029,7 +1029,7 @@ int main(int argc, char *argv[])
|
||||||
/* Set up the structure to specify the new action. */
|
/* Set up the structure to specify the new action. */
|
||||||
new_action.sa_handler = handler;
|
new_action.sa_handler = handler;
|
||||||
sigemptyset(&new_action.sa_mask);
|
sigemptyset(&new_action.sa_mask);
|
||||||
new_action.sa_flags = 0;
|
new_action.sa_flags = SA_RESTART;
|
||||||
|
|
||||||
/* assign our handler to any signals we care about */
|
/* assign our handler to any signals we care about */
|
||||||
for(i = 0; i < sizeof(signals) / sizeof(signals[0]); i++) {
|
for(i = 0; i < sizeof(signals) / sizeof(signals[0]); i++) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue