Fabian Schuiki
Fabian Schuiki

Reputation: 1308

Alternative to signalfd

Is there an alternative to signalfd (not available on Mac OS X)? I'm multiplexing I/O using select and would like to receive signals in some synchronized fashion.

Upvotes: 7

Views: 2285

Answers (1)

Dummy00001
Dummy00001

Reputation: 17430

man kqueue and look for EVFILT_SIGNAL there.

The descriptor returned by kqueue() should be poll()able/select()able. Events can be registered and read out using the kevent() call.

Original kqueue paper

P.S. I hope I'm not off by much, had no chance to use the kqueue myself yet.

Upvotes: 6

Related Questions