From: Efraim Flashner <efraim@flashner.co.il>
To: divoplade <d@divoplade.fr>
Cc: help-guix@gnu.org
Subject: Re: How do you define a service?
Date: Sun, 18 Oct 2020 19:42:52 +0300 [thread overview]
Message-ID: <20201018164252.GJ974@E5400> (raw)
In-Reply-To: <827aaf9922289ecec2233540e99e09896946846a.camel@divoplade.fr>
[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]
On Sun, Oct 18, 2020 at 04:53:17PM +0200, divoplade wrote:
> 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.
forkexec does close the standard ports. Unfortunately I don't see that
mentioned in the manual¹. I know it's mentioned somewhere in the code
but I can't find it anywhere right now.
> Do you have an example of a service written in guile that works in this
> context?
>
> Best regards,
>
> divoplade
¹ https://www.gnu.org/software/shepherd/manual/html_node/Service-De_002d-and-Constructors.html#Service-De_002d-and-Constructors
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-10-18 16: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
2020-10-18 16:42 ` Efraim Flashner [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201018164252.GJ974@E5400 \
--to=efraim@flashner.co.il \
--cc=d@divoplade.fr \
--cc=help-guix@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.