[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [Signal handler] Bug or feature ?
Pongthep Kulkrisada a écrit :
* BERTRAND Jol (joel.bertrand%systella.fr@localhost) wrote:
volatile int flag;
flag = 0;
code_retour = nanosleep(&temporisation,&temporisation);
erreur = errno;
if (flag == 1)
} while((code_retour == -1)&& (erreur == EINTR));
SIGINT signal handler is :
flag = 1;
I'm not sure what you are expecting to test.
But the code should look like the attached main.c.
Testing flag is redundant anyway.
No, testing flag isn't redundant as I have to catch SIGINT and SIGUSR1.
I have written a simple test to see what's happening with only one signal.
Main Index |
Thread Index |