From nobody Sat Apr 15 00:22:21 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PyvCK3pz5z457Qh for ; Sat, 15 Apr 2023 00:22:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PyvCK2ffmz3y9m for ; Sat, 15 Apr 2023 00:22:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681518141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gC1UT0WFOa4N5x+bYvAS7MgIttJukXI/KyKbaYBFuy4=; b=OOSu6YFZdVvpsFuCS8bK4kwoX7VeLiwjfNrskoEqL+x/dK3hvUlpw3z2t/itl3a+d3waGG p6VDfjw931tlRsE4cvPQiI45z4lkF8/AOuB+btE6BBNJgJ+T/DwoAbsRJ4RHu60AHoGuPD 4hbG4GOcY/dFyOqfSSopIzaugUtDpMXoDZ0oWpSZs6h6hZXFgsBxtqKvRqEitNZoSIh+YJ wTfQAn1+Dop6qqXhWxzI6C0ej7BqQJv3trlRRh8RD+/O0zJCfDIj2mKvrfWpy1BZSoJ1Bo tWkj8mH/1+2Ilq39T59aEy/Z9lPP8pGMJNg511wLlCD6fINI06ajOf2dAmy4Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681518141; a=rsa-sha256; cv=none; b=sAPGy2vclB2S8GJCDvuP6mI2Y0Y+C+Vx2fyk4IWRqFwIO27k+loMayTFNe4iFfDszHrTo5 zho42lU88FAGy57YBjsHiN55agDWFtvyiT1oGWk3/y+JRnWYHZKQVeOOdXPIYamaReLQ7G pQIPqoWP73sNRJIjGTMPPrePnrL+aT6c2phZMkOc5otnPtpw9uYYhMqorhp6leyK+Z1G85 J6qD7nTH49xTdQHyiISK1JgpaiGCX9uppeuLUDE/v+MCxO06+0aI+mMk5sycBLGC54d6yj 2+Nc6uVhI93qbEgaLqRdS94bHFC3f4bJwgUzQtzbvdwzOE6pwjv1V43a+SVJ4Q== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PyvCK1gjbzlVC for ; Sat, 15 Apr 2023 00:22:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 33F0MLK1006851 for ; Sat, 15 Apr 2023 00:22:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33F0MLWD006850 for bugs@FreeBSD.org; Sat, 15 Apr 2023 00:22:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 212829] daemon(8) using -P swallows signals such as SIGHUP instead of propagating them Date: Sat, 15 Apr 2023 00:22:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ihor@antonovs.family X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212829 --- Comment #8 from Ihor Antonov --- After reading all comments I take the side of Phillip R. Jaenke (prj) Different services expect different signals, so creating a mechanism to pass signals to a child leaves a question "how to signal daemon" open. It is obviously a bad design. The ideal solution would be to have a socket that daemon listens for various commands. I need to run this idea by kevans to make sure he has no objections for this work. This might or might not be considered a scope creep. And if it is - I am go= ing to spin off a new supervisor daemon. With sockets, config files, blackjack = and hookers :) In the meanwhile It is possible make `service` to send signal to the child. There are 2 ways: 1) In your rc script pidfile=3D/path/to/child/pid command=3D"/usr/sbin/daemon" command_args=3D"--child-pidfile $pidfile .... rc framework on `service foo reload` should send SIGHUP to the process identified by $pidfile 2) There is a way to add custom commands to the rc script: extra_commands=3D"foobarnate" pidfile=3D/path/to/child/pid command=3D"/usr/sbin/daemon" command_args=3D"--child-pidfile $pidfile .... myservice_foobarnate() { kill -SIGUSR1 $pidfile } So you can run `service myservice foobarnate` to execute completely custom logic. --=20 You are receiving this mail because: You are the assignee for the bug.=