[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;
When this process receives SIGINT, it doesn't exit. I have verified
that signal handler is called and it is.
If there is nothing wrong, it is very strange.
I tried coding exactly what you did.
On my 6.0_RC2 (i386), it does ``exit'' after SIGINT delivered to the process.
I have tested on 5.1.2 (amd64) and this test program is linked with
But nanosleep() returns with EINTR error before signal handler is called.
On my machine, I can verify that signal handler is called before nanosleep()
Not on mine. Even thread id is different between signal handler and
I have found a workaround. Thus I consider this post closed.
Thanks a lot,
Main Index |
Thread Index |