To implement a timer, I’m currently forking a process that uses SIGALRM to periodically wake it and write a byte into a pipe. I’m aware of signalfd for receiving signals on a file descriptor and I’d like to do the same with a timer, but all of the timer mechanisms I’m aware of use signals. Does Linux provide a mechanism to provide a timer via a file descriptor?
To implement a timer, I’m currently forking a process that uses SIGALRM to periodically
Share
You could use timerfd_create and friends. It is a linux specific syscall.