Way too many ways to wait on a child process with a timeout
⏴ Back to all articles
Published on 2024-11-10
Table of contents
What are we building?
First way: old-school sigsuspend
Second way: sigtimedwait
Third approach: Self-pipe trick
A simpler self-pipe trick
Fourth approach: Linux's signalfd
Fifth approach: process descriptors
Sixth approach: MacOS's and BSD's kqueue
A parenthesis: libkqueue
Another parenthesis: Solaris/Illumos's ports
Seventh approach: Linux's io_uring
Conclusion
Addendum: The code
Windows is not covered at all in this article.
Disc...
Read more at gaultier.github.io