unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: divoplade <d@divoplade.fr>
To: Julien Lepiller <julien@lepiller.eu>, help-guix@gnu.org
Subject: Re: How do you define a service?
Date: Sun, 18 Oct 2020 17:43:13 +0200	[thread overview]
Message-ID: <f3a92eac148f876559d906d81dbc53309c9121ba.camel@divoplade.fr> (raw)
In-Reply-To: <827aaf9922289ecec2233540e99e09896946846a.camel@divoplade.fr>

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.



  reply	other threads:[~2020-10-18 15:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17 15:07 How do you define a service? divoplade
2020-10-17 15:58 ` Wiktor Żelazny
2020-10-17 19:47   ` divoplade
2020-10-17 20:55     ` Julien Lepiller
2020-10-17 21:08       ` divoplade
2020-10-17 21:42 ` divoplade
2020-10-17 22:18   ` Julien Lepiller
2020-10-18  9:49 ` divoplade
2020-10-18 12:12   ` Julien Lepiller
2020-10-18 14:53     ` divoplade
2020-10-18 15:43       ` divoplade [this message]
2020-10-18 16:42       ` Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3a92eac148f876559d906d81dbc53309c9121ba.camel@divoplade.fr \
    --to=d@divoplade.fr \
    --cc=help-guix@gnu.org \
    --cc=julien@lepiller.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).