If a signal handler runs during select() loop in clixon_event_loop() and unless the signal handler sets clixon_exit, the select will be restarted.

This commit is contained in:
Olof hagsand 2021-02-25 22:35:13 +01:00
parent c509868345
commit d5edd64257
5 changed files with 40 additions and 5 deletions

View file

@ -68,7 +68,7 @@ set_signal(int signo,
snew.sa_handler = handler;
sigemptyset(&snew.sa_mask);
snew.sa_flags = 0;
snew.sa_flags = SA_RESTART;
if (sigaction(signo, &snew, &sold) < 0){
clicon_err(OE_UNIX, errno, "sigaction");
return -1;