3 ms·
And if you are on a BSD/OSX, use kqueue(2). There is no reason to deal with the traditional signal interface the old way any more, just convert signals into eve
by justincormack 12y ago
And if you are on a BSD/OSX, use kqueue(2). There is no reason to deal with the traditional signal interface the old way any more, just convert signals into event streams with file descriptor readiness like (almost) everything else.
(The almost is processes; Capsicum which is in FreeBSD and being ported to Linux lets you get a file descriptor for a process via pdfork(2) which you can poll too. Normally this doesnt matter as you can wait on the SIGCHLD anyway, but you can pass non child process file descriptors via unix sockets allowing waiting on other processes too).