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 Answers1

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.

plexar
  • 21