Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2024 16:28:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 282694] utility `daemon(8)` never exits (process SIGTERM) if child process restarts indefinitely
Message-ID:  <bug-282694-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282694

            Bug ID: 282694
           Summary: utility `daemon(8)` never exits (process SIGTERM) if
                    child process restarts indefinitely
           Product: Base System
           Version: 14.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: freebsd@vlapan.com

Created attachment 255099
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=255099&action=edit
basic minimal rc.d script for illustration purposes

Hi there,
attachment `testd.sh` minimal rc.d script that starts `daemon` for `env` which
always exits (just to illustrate), `-r` restarts `env` but `daemon` doesn't
reacts to SIGTERM in that mode which is the signal sent on `service testd
stop`, so it's hanging on waiting for PID indefinite:
```
~# service testd onestop
Stopping testd.
Waiting for PIDS: 19035^C
```

think there is a race condition for when `daemon` receives SIGTERM but in a
state when there is no child yet

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

help

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