Page MenuHomeFreeBSD

signalfd: Add native support for Linux's signalfd
Needs ReviewPublic

Authored by jfree on Jun 28 2023, 7:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 26, 12:11 AM
Unknown Object (File)
May 22 2024, 4:03 PM
Unknown Object (File)
May 22 2024, 3:18 AM
Unknown Object (File)
May 19 2024, 1:51 AM
Unknown Object (File)
Jan 19 2024, 10:02 PM
Unknown Object (File)
Dec 21 2023, 4:14 PM
Unknown Object (File)
Dec 20 2023, 7:14 AM
Unknown Object (File)
Nov 4 2023, 10:11 PM
Subscribers

Details

Summary
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.
Test Plan

This implementation passes all of epoll-shim's signalfd tests:
https://github.com/jiixyj/epoll-shim/blob/master/test/signalfd-test.c

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped