That seems like a lot of brain surgery for this essential feature.
My users are CSS experts.
I think I'll spawn such a background process from my framework by default
if ./check exists.

I suppose you have no inkling of making ./check an s6 feature?

On Wed, Sep 2, 2015 at 3:07 PM, Laurent Bercot <[email protected]>
wrote:

> On 02/09/2015 23:14, Buck Evan wrote:
>
>> Given a daemon that doesn't have a readyfile feature, I'd like to write a
>> `check` script and hook it up to s6's readiness notification
>> <http://skarnet.org/software/s6/notifywhenup.html>.
>>
>
> echo 3 > notification-fd
>
> mv run run.real
>
> cat > run <<EOF
> #!/command/execlineb -P
> background -d
> {
>   fdmove 1 3
>   forx -x 0 dummy { 1 2 3 4 5 6 7 }
>   ifelse { ./check } { echo }
>   foreground { sleep 1 }
>   exit 1
> }
> fdclose 3
> ./run.real
> EOF
>
> chmod 755 run
>
>  Untested, but that should report readiness if ./check succeeds
> within 7 attempts at running it, with 1 second between attempts.
> How it works is left as an exercise to the reader. %-P
>
> --
>  Laurent
>
>

Reply via email to