Ah, I see: from your external script, you do not want to know*whether* a 
oneshot service has completed; you want to block*unless or until* it has 
completed?

In that case, I would use `s6-ftrig-notify` in the oneshot service, and both 
`s6-rc -a list` and `s6-ftrig-wait` in the external script:

in the oneshot, as the last action taken before quitting, use `s6-ftrig-notify` 
to send an event to a fifodir;
in the external script, `s6-rc -a list | grep -q $(oneshot_service_name)` to 
proceed if the oneshot is already up, and then if it is not up, `s6-ftrig-wait` 
to block until it is.

Or, as you say, you can use fifodirs directly without the convenience programs 
that interact with them already.

There might be a race condition there, but that's something you can surely work 
around if it's a concern.

Exactly!

Although it would be nicer to have a standard way to do this,
consistent with longruns, as described in my initial Mail.

Let's see what Laurent thinks of that.

Thanks and regards

Paul

Attachment: OpenPGP_0x71C7C85A2EA30F62.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to