Hi , I have a doubt with signals and sleep function.
In a program i have this
while(1)
{
//do some work
sleep(1);
}
And in a thread i have something like this
union sigval data;
char message[1024];
char msg[1024];
data.sival_int=0;
while(1)
{
message[0]='\0';
//Do some work and wait for some events
strcpy(msg,message);
datos.sival_ptr=msg;
sigqueue(getpid(),SIGUSR1,data);
}
But for some reason , when i send the signal sometimes sleep(1) not execute!
Anybody knows why this happen? Or this shouldn' t happen?
Thanks and bye!