[Bug 268580] Add shutdown delay to daemon(8)

2023-04-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

Nathan Huff  changed:

   What|Removed |Added

 Resolution|--- |Overcome By Events
 Status|Open|Closed

--- Comment #7 from Nathan Huff  ---
I'm going to close this as Ihor's changes should cover everything and switching
to kqueue is better than the current signal handling.

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


[Bug 268580] Add shutdown delay to daemon(8)

2023-04-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

--- Comment #6 from Ihor Antonov  ---
Sorry, disregard my previous comment. SIGKILL after delay is planned. 
I will use EVFILT_TIMER for this.

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


[Bug 268580] Add shutdown delay to daemon(8)

2023-04-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

--- Comment #5 from Ihor Antonov  ---
We can add sleep before sending SITERM to the child, but why is this needed?

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


[Bug 268580] Add shutdown delay to daemon(8)

2023-04-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

--- Comment #4 from Nathan Huff  ---
I think the only thing the kqueue version doesn't do that my patch does is send
SIGKILL to the supervised process after the delay.  I see there is a TODO in
the kqueue version to do something like that, but it isn't implemented.

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


[Bug 268580] Add shutdown delay to daemon(8)

2023-04-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

--- Comment #3 from Ihor Antonov  ---
Nathan's motivation for  the shutdown delay is to avoid race conditions caused
by asynchronous signal processing. 

After https://reviews.freebsd.org/rG8935a3993219be76c7ea03e9ad4509657d08af6c
was merged none of the described situations are possible.

1. Upon receiving SIGTERM daemon will propagate it to the child, then wait for
child to exit and then read everything until EOF from the pipe.

2. Same with the pid file: Child's pidfile cleanup happens only after child
reported SIGCHILD, all the data was read from the pipe.

At this point I do not see a compelling usecase for shutdown delay feature.

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


[Bug 268580] Add shutdown delay to daemon(8)

2023-04-14 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

Mina Galić  changed:

   What|Removed |Added

 CC||free...@igalic.co

--- Comment #2 from Mina Galić  ---
I think it would make sense to have a shutdown delay, whenever there's a
restart delay. Which under supervision is at least one second

so i don't think we need a new parameter.

What'd y'all think?

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


[Bug 268580] Add shutdown delay to daemon(8)

2023-03-05 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

Ihor Antonov  changed:

   What|Removed |Added

 CC||ihor@antonovs.family

--- Comment #1 from Ihor Antonov  ---
I am working on daemon improvements and this feature is planned to be added
once transition to kqueue is finished.

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


[Bug 268580] Add shutdown delay to daemon(8)

2022-12-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268580

Graham Perrin  changed:

   What|Removed |Added

Summary|[PATCH] Add shutdown delay  |Add shutdown delay to
   |to daemon(8)|daemon(8)
URL||https://www.freebsd.org/cgi
   ||/man.cgi?query=daemon
   ||on=8=FreeBSD
 Status|New |Open
 CC||grahamper...@freebsd.org
   Keywords||feature

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