I'm new to Linux signals. If a process initializes multiple timers,
then how does a process know which SIGALRM
belongs to which timer?
Asked
Active
Viewed 2,002 times
1

Flying Swissman
- 818
- 2
- 14
- 39

marry
- 307
- 2
- 7
- 20
1 Answers
1
It depends how you set up your SIGALRM
handler.
Consider also using not alarm
but timer_create or even timerfd_create(2) (with poll
).
If you call sigaction(2) with the SA_SIGINFO
you get the siginfo_t
which indirectly gives you the timer information.
Read also all about linux signals, and Advanced Linux Programming

Semanual
- 53
- 7

Basile Starynkevitch
- 223,805
- 18
- 296
- 547