I currently have some C code that uses sigaction to associate a handler to the SIGALRM signal. Then I do alarm(TIME_OUT_IN_SECONDS). Problem is, I need milliseconds, not seconds and alarm takes an integer. How can I set the signal to fire off in milliseconds?
Thanks, the examples I had seen with setitimer() were all associated with signal() and not sigaction so I wasn't sure if they were compatible. As you can tell, I'm a C newbie :)
Tim Merrifield
2009-03-02 01:51:03
Ah so... You shouldn't worry about this, signal() and sigactions() are just interfaces for the same function.
jpalecek
2009-03-02 01:53:59
But sigaction() should be preferred over signal() for portability issues.
Raim
2009-03-02 17:55:20
AFAIK, it's not for portability issues, but to avoid some races the use of the signal() function normally creates.
jpalecek
2009-03-03 00:34:36