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
Event Timeline
Comment Actions
This has come up in the context of Linux-compatibility jails with musl libc distributions. Could someone please review this?
For example in context:
Feb 17 18:51:12 myhost kernel: linux: jid 7 pid 54884 (node): syscall membarrier not implemented
Feb 17 18:57:33 myhost kernel: linux: jid 8 pid 56301 (postgres): syscall signalfd4 not implemented
Feb 17 18:57:33 myhost kernel: linux: jid 8 pid 56301 (postgres): syscall signalfd not implemented