Date: Fri, 14 Apr 2023 10:43:19 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Kyle Evans <kevans@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8935a3993219 - main - daemon: use kqueue for all events Message-ID: <ZDkEF3ODocUAmKQL@kib.kiev.ua> In-Reply-To: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> References: <202304140513.33E5DsXL019547@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 14, 2023 at 05:13:54AM +0000, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8935a3993219be76c7ea03e9ad4509657d08af6c > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c > Author: Ihor Antonov <ihor@antonovs.family> > AuthorDate: 2023-04-14 05:10:29 +0000 > Commit: Kyle Evans <kevans@FreeBSD.org> > CommitDate: 2023-04-14 05:12:21 +0000 > > 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 > + /* Signals are processed via kqueue */ > + signal(SIGHUP, SIG_IGN); > + signal(SIGTERM, SIG_IGN); Are you sure that this works? When a signal disposition is set to 'ignore', the signal delivery drops the signal immediately without queuing/notifying the victim. I very much doubt that you would get any kqueue event for HUP or TERM after the calls.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ZDkEF3ODocUAmKQL>