I am migrating a LynxOS program to an ubuntu distribution and gcc 4.1.3
I am almost done but I have a problem, I am receiving SIGALRM signal which forces my program to exit. I dont know why I am receiving this signals if I am not calling to alarm(x).
I roundabouted this with a sigaction, but my program is not working properly mq_receive is failing every time this SIGALRM is received.
I wonder if it could be because of this code translation:
#include <events.h>
#include <timers.h>
evtset_t EvtMask;
struct timespec Time;
Time.tv_sec = 2;
Time.tv_nsec = 0;
evtsuspend (&EvtMask, &Time);
would now be
sleep(2);
This is the info about evtsuspend given by LynxOS:
evtsuspend (cant insert the image because of my lack of reputation)
Do you think they work the same? (without specifying an event mask) sleep() also waits for a SIGALRM to continue.
Thanks and regards