s6 service 'really up' clarification

From: Patrick Mahoney <pat_at_polycrystal.org>
Date: Mon, 12 Jan 2015 16:27:34 -0600

Hi,

I've just noticed this behavior around the "really up" state. Perhaps I
misunderstand the intent. Given a service (with no support for
s6-notifywhenup or anything else sending U events), the following
snippet prints DOWN then hangs as expected:

   $ s=/service/a; (sleep 2 && s6-svc -t $s); s6-svwait -d $s && echo
"DOWN" && s6-svwait -U $s && echo "UP"

(Manually running 's6-ftrig-notify $s/event U' causes the script to
print "UP")

However, after waiting for the service to be restarted, the following
prints the "up" status then does not hang (as I expected) but
immediately exits 0:

   $ s=/service/a; s6-svstat $s; s6-svwait -U $s

So, speculating, it seems that 's6-svwait -U' on a service that is
currently 'down' either waits forever, or returns when something sends a
'U' event. But when the service is 'up' (but no U event ever happened),
's6-svwait -U' returns immediately as if the service was 'really up'.

Thanks,

-- 
Patrick Mahoney <pat_at_polycrystal.org>
Received on Mon Jan 12 2015 - 22:27:34 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC