[systemd-devel] How can you differentiate behavior between stop and stop as part of restart?

Brian Reichert reichert at numachi.com
Tue Oct 15 21:09:14 UTC 2024


On Mon, Oct 14, 2024 at 05:54:28PM -0700, Kelsey Cummings wrote:
> HOWEVER, I would like stop to wait for all of the children to gracefully 
> exit should stop be called explicitly and/or as part of system 
> shutdown/reboot.

I don't think I have the best grasp of your entire problem, but the
challenge of '... stop to wait for all of the children to gracefully
exit', is something I had needed to address in an earlier thread:

  https://marc.info/?l=systemd-devel&m=172790019413449&w=4

Basically, if you have the means to poll for 'children have exited' or
'prior PID has exited', then you can add that as a second command
in your ExecStop, to cause this stage to block until that has
occurred.

> -- 
> kelsey.cummings at sonic.com                 sonic.net, inc.
> System Architect                          2260 Apollo Way
> 707.522.1000                              Santa Rosa, CA

-- 
Brian Reichert				<reichert at numachi.com>
BSD admin/developer at large	


More information about the systemd-devel mailing list