Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Apr 2024 05:44:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 278342] daemon(8): -R doesn't restart supervised process
Message-ID:  <bug-278342-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278342

            Bug ID: 278342
           Summary: daemon(8): -R doesn't restart supervised process
           Product: Base System
           Version: 14.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: sigsys@gmail.com

When certain other options are also specified it might work correctly, but =
with
-R alone, "supervise mode" doesn't kick in. Using -R alone used to work on
previous versions.

diff --git i/usr.sbin/daemon/daemon.c w/usr.sbin/daemon/daemon.c
index da8e4895e19b..52fbfca1dcd2 100644
--- i/usr.sbin/daemon/daemon.c
+++ w/usr.sbin/daemon/daemon.c
@@ -240,12 +240,13 @@ main(int argc, char *argv[])
                case 'R':
                        state.restart_enabled =3D true;
                        state.restart_delay =3D strtol(optarg, &p, 0);
                        if (p =3D=3D optarg || state.restart_delay < 1) {
                                errx(6, "invalid restart delay");
                        }
+                       state.mode =3D MODE_SUPERVISE;
                        break;
                case 's':
                        state.syslog_priority =3D get_log_mapping(optarg,
                            prioritynames);
                        if (state.syslog_priority =3D=3D -1) {
                                errx(4, "unrecognized syslog priority");

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278342-227>