s6-rc blocks when oneshot service is still running

From: Alex Grabowski <hurufu_at_gmail.com>
Date: Wed, 13 May 2026 19:54:15 +0200

Hello Laurent,

 From what I understand after reading documentation it is considered a
bad idea to interrupt oneshot service (and any program for that matter
that uses sudod), because for example it can escape supervision or
potentially leave system in some undefined state. That's understandable,
but what if my oneshot script was carefully written and handles signals
correctly and always leaves system in a predictable state and can be
started multiple times (ie. it is idempotent)?

Buy this oneshot service can take a long time to complete – it does some
online check, but once it finished – there is no need to start it again.

The problem is that while such long oneshot script is running, s6-rc
blocks or fails (because main lock file is busy). Was it a conscious
choice to prevent any s6-rc command while oneshot service is running?

Obviously I can just run script in the background and call it a day, my
question is conceptual, do you think oneshot services are a good fit for
scripts that can take long time to execute?

Thanks for S6,
Best wishes

-- 
Alex
Received on Wed May 13 2026 - 19:54:15 CEST

This archive was generated by hypermail 2.4.0 : Wed May 13 2026 - 19:55:03 CEST