Skip to content

Commit

Permalink
Follow-up to 912a281: let s6 services use oneshot 'ready' condition
Browse files Browse the repository at this point in the history
Since the s6 readiness notification mechanism closes the notification
socket to Finit (as per s6 spec.) the 'ready' condition should then
always be asserted, even across system reconfiguration events.

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Nov 9, 2022
1 parent f26009e commit 505c370
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,10 @@ void service_ready(svc_t *svc)
return;

snprintf(buf, sizeof(buf), "service/%s/ready", svc_ident(svc, NULL, 0));
cond_set(buf);
if (svc->notify == 2)
cond_set_oneshot(buf); /* exception for s6 */
else
cond_set(buf);

if (svc_has_ready(svc))
service_ready_script(svc);
Expand Down

0 comments on commit 505c370

Please sign in to comment.