Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Apr 2026 09:56:59 +0000
From:      Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: bc249f68c569 - stable/14 - syslogd: Allow killing when in foreground
Message-ID:  <69ce3d6b.3aced.18c72e5a@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=bc249f68c569efee2ba70319e5bcfe942fd7620e

commit bc249f68c569efee2ba70319e5bcfe942fd7620e
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-03-24 10:58:53 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-04-02 09:56:10 +0000

    syslogd: Allow killing when in foreground
    
    Normally, syslogd reacts only to SIGTERM, and ignores SIGINT and SIGQUIT
    unless in debug mode.  Extend that to also apply when running in the
    foreground.
    
    MFC after:      1 week
    Reviewed by:    jfree
    Differential Revision:  https://reviews.freebsd.org/D55886
    
    (cherry picked from commit 828de702ada854b5f09f447ba06e4e08e976ba07)
---
 usr.sbin/syslogd/syslogd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 7356fb3fa43f..be12e8db7b85 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -781,8 +781,8 @@ main(int argc, char *argv[])
 	    sizeof(consfile.fu_fname));
 	(void)strlcpy(bootfile, getbootfile(), sizeof(bootfile));
 	(void)signal(SIGTERM, dodie);
-	(void)signal(SIGINT, Debug ? dodie : SIG_IGN);
-	(void)signal(SIGQUIT, Debug ? dodie : SIG_IGN);
+	(void)signal(SIGINT, (Foreground || Debug) ? dodie : SIG_IGN);
+	(void)signal(SIGQUIT, (Foreground || Debug) ? dodie : SIG_IGN);
 	(void)signal(SIGHUP, sighandler);
 	(void)signal(SIGCHLD, sighandler);
 	(void)signal(SIGALRM, domark);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ce3d6b.3aced.18c72e5a>