That is what I ended up doing, but without an `-wu` part, thanks for the tip.
What concerned me at first is that s6-svwait page explicitly states that "s6-svwait only waits for notifications; it never polls.", which might mean that if service went down before s6-svwait started, then it can't wait forever for "down" notification. I then checked with two consecutive `s6-svwait -D` calls and both detected that service already down and exited, so s6-svwait is actually level-triggered, not edge triggered. On 20 May 2016 at 15:00, Laurent Bercot <[email protected]> wrote: > On 20/05/2016 13:28, Max Ivanov wrote: >> >> Hi All, >> >> is it a bug or design decision that when requesting service to go up, >> s6-svc can't wait for service to go down? > > > Design decision. You can't wait for the service to go down at this > point because it is *already* down, so the "wait for it to be down" part > immediately succeeds. What you are trying to do is wait for the service > to go down _after it has gone up_. > > >> For instance `s6-svc -o -wD` exits without waiting for `finish` >> script to execute. > > > Try "s6-svc -o -wu service ; s6-svwait -D service". That should do what > you want. > > -- > Laurent
