signalfd: Add native support for Linux's signalfd The signalfd system call handles signals using a special signalfd file descriptor. The caller may specify a mask of signals for signalfd to catch. When the desciptor is read, it will return a signalfd_siginfo structure populated with signal information from the sigqueue, similar to sigwaitinfo(2). The signalfd descriptor maintains traditional file descriptor semantics, so it may be passed to other processes, preserved across fork(2), and monitored via kevent(2), poll(2), or select(2). This signalfd interface is based on the behavior of Linux's signalfd implementation. It was designed to be drop-in compatible with existing Linux signalfd code.
Details
Details
- Reviewers
markj imp kib val_packett.cool brooks
This implementation passes all of epoll-shim's signalfd tests:
https://github.com/jiixyj/epoll-shim/blob/master/test/signalfd-test.c
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped