I've a problem with a Solaris program implementation: My code uses a timer procedure and when i try to execute date -a XXXX or rdate, my aplication stops. I can't use ntp and need to set the machine time. Here is my procedure. If you know how you can help me, please, do it. static void handlerDelay() { siglongjmp( env, 1 ); }
int XoPortUtilDelay( unsigned int milissec ) {
int houveTemporizacao = 0; int segundos; int microSeg; struct itimerval tempoSleep; void (*handlerAnterior)();
/* The first call to sigsetjmp show the point where the next siglongjmp will return. Return always 0 at first time. When siglongjmp is called (no signal handler), execution return to the call point to sigsetjmp and the returned value are the specified as second argument in siglongjmp. */