HomeFreeBSD

daemon: use kqueue for all events

Description

daemon: use kqueue for all events

Refactor daemon to use kqueue/kevent instead of signals.

This changes allows to simplify the code in several ways:

  • the execution flow is now linear, no async events.
  • several variables became redundant and got removed.
  • all event handling is now concentrated inside of the event loop, which makes code reading and comprehension easier.
  • new kqueuex(2) call is used for CLOEXEC, but maintained closing the kq fd prior to execve() to ease later MFC

No UX/API changes are intended.

Reviewed by: kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/701

Details

Provenance
ihor_antonovs.familyAuthored on Apr 14 2023, 5:10 AM
kevansCommitted on Apr 14 2023, 5:12 AM
Parents
rGec671f498043: loader: comconsole: don't unconditionally wipe out hw.uart.console
Branches
Unknown
Tags
Unknown