[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you define a service?
From: |
divoplade |
Subject: |
Re: How do you define a service? |
Date: |
Sun, 18 Oct 2020 17:43:13 +0200 |
User-agent: |
Evolution 3.34.2 |
Sorry, answering my own questions here...
Le dimanche 18 octobre 2020 à 16:53 +0200, divoplade a écrit :
> Thank you for your responses. I reduced down the problem further.
>
> The following program, as run in a service, creates an *empty* file
> "/tmp/wtf", and runs for a minute:
>
> (format (open-output-file "/tmp/wtf") "WTF???\n")
>
> (sleep 60)
>
> The following program, as run in the same condition, create an
> *empty*
> file and fails immediately:
>
> (with-output-to-file "/tmp/wtf"
> (display "WTF???\n"))
>
> (sleep 60)
>
> So I think the question is rather, whether Guile can actually work in
> a
> shepherd forkexec environment: I guess the standard ports are closed,
> so maybe guile panics when it is time to flush the data, even if the
> ports are redirected.
If the script is a shell script doing I/O with redirection, it works,
so it's definitely a guile problem.
> Do you have an example of a service written in guile that works in
> this
> context?
Looking at cuirass, it executes a shell script that runs guile. That's
what I will be doing I think.