2

I do understand that both are used to raise a signal according to the time elapsed… But what’s the difference then ?

In my case, I want to raise such signal against specific thread time where the time counter is suspended if the process is suspended or not existing (something which can happen if killed then restored later through criu for example).

1 Answer 1

2

According to wikipedia https://en.wikipedia.org/wiki/Signal_(IPC) SIGVTALRM is sent after the CPU time (i.e. the "working time") of the process has elapsed. Instead SIGALRM counts the real time as measured by a stop watch:

The SIGALRM, SIGVTALRM and SIGPROF signal is sent to a process when the time limit specified in a call to a preceding alarm setting function (such as setitimer) elapses. SIGALRM is sent when real or clock time elapses. SIGVTALRM is sent when CPU time used by the process elapses. SIGPROF is sent when CPU time used by the process and by the system on behalf of the process elapses.

1
  • But then it means If I'm having multiple threads, does it also that the time will elapse more quickly ? May 21, 2020 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.