From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YAnIGb9wjF/reAAA0tVLHw (envelope-from ) for ; Sun, 18 Oct 2020 16:43:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6DGeFb9wjF++HgAAB5/wlQ (envelope-from ) for ; Sun, 18 Oct 2020 16:43:43 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CB2DF9402DD for ; Sun, 18 Oct 2020 16:43:42 +0000 (UTC) Received: from localhost ([::1]:43206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUBmW-0007c6-HA for larch@yhetil.org; Sun, 18 Oct 2020 12:43:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUBmO-0007bx-L0 for help-guix@gnu.org; Sun, 18 Oct 2020 12:43:32 -0400 Received: from flashner.co.il ([178.62.234.194]:60596) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUBmL-0000xb-GQ for help-guix@gnu.org; Sun, 18 Oct 2020 12:43:32 -0400 Received: from localhost (unknown [141.226.13.8]) by flashner.co.il (Postfix) with ESMTPSA id 7F4A34024B; Sun, 18 Oct 2020 16:43:27 +0000 (UTC) Date: Sun, 18 Oct 2020 19:42:52 +0300 From: Efraim Flashner To: divoplade Subject: Re: How do you define a service? Message-ID: <20201018164252.GJ974@E5400> References: <69eea6b79a4850a66adc24a067ebba0d98c33c58.camel@divoplade.fr> <84f1892bab3645699c82a64ae313bd367bfe947d.camel@divoplade.fr> <827aaf9922289ecec2233540e99e09896946846a.camel@divoplade.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kr14OxHsRwZHHqxS" Content-Disposition: inline In-Reply-To: <827aaf9922289ecec2233540e99e09896946846a.camel@divoplade.fr> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/18 12:36:27 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.61 X-TUID: 2SgFE/uqdE6K --kr14OxHsRwZHHqxS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 18, 2020 at 04:53:17PM +0200, divoplade wrote: > Thank you for your responses. I reduced down the problem further. >=20 > The following program, as run in a service, creates an *empty* file > "/tmp/wtf", and runs for a minute: >=20 > (format (open-output-file "/tmp/wtf") "WTF???\n") >=20 > (sleep 60) >=20 > The following program, as run in the same condition, create an *empty* > file and fails immediately: >=20 > (with-output-to-file "/tmp/wtf" > (display "WTF???\n")) >=20 > (sleep 60) >=20 > 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=C2=B9. 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? >=20 > Best regards, >=20 > divoplade =C2=B9 https://www.gnu.org/software/shepherd/manual/html_node/Service-De_00= 2d-and-Constructors.html#Service-De_002d-and-Constructors --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --kr14OxHsRwZHHqxS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl+McIwACgkQQarn3Mo9 g1GnxxAArMst2bG5mMfFMeND4HWwJukzV4riUcbTaP9aMzDE729ZZfZGJKxok7jS db0THosYGXLp9aj1Iy119iTH3G6r5J+Z12h7mJrB7jq2N+VAxLCoP8DQG2jQCrrJ N3LQJFdYmzrWOD8vfk9IrpMSilH1bMZv+r+g2gUJvgsHubFY3tfIEE1szqva2cfO lVYMy/NMxAHKtepTjVCgDHmcjd8trNYYLfh5LD/125rqPTv19gPe6wYr7XCvjY+0 4U/+3B4+dy88yEgDf+peaAc+fkSNVQsHbydhmlb/U/5955Q7COtIMDwSfUyFShFA vpHvN3ShBIkvltY2aiJoQRgBi5VciSlea4Xt3ethlq1IDCLMk63hc+0zYy5HcVM8 0kttVLNmfKw77XzRY0u7upn3iMnJPgGVpY2Gvy3u9lb2Cqjfkpzp3oqitXW165DM ipip3nEMlK5/635yGT63EHMwDS5vXHeRdznY7oHNnGEU9iegKJDFsvnj9a6gW1eg fLdF6YamC6ly3jdl91e3bNEAO4nNIUwSe5LHRLUsUext7VP/prUqlPn2z2v7YzE8 FgmF9CGQ/59ZDWWCW77hFtIY/QfrzG+D2j9+VsgVTslFFT92+STiZZ6WnR6Z9IPh LKfgbWEOAmyjYRfMEKWwB+ZMaqAu+dvjPYmUU3mSiP0Ie4EUQMM= =isl4 -----END PGP SIGNATURE----- --kr14OxHsRwZHHqxS--