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.
