From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 54205@debbugs.gnu.org, Attila Lendvai <attila@lendvai.name>
Subject: [bug#54205] [PATCH Shepherd] Factor out a public CALL-IN-FORK.
Date: Wed, 02 Mar 2022 17:05:26 +0100 [thread overview]
Message-ID: <87lexs1gs9.fsf_-_@gnu.org> (raw)
In-Reply-To: <cf4063f4844520b276e2ee51e375c036707cd265.camel@telenet.be> (Maxime Devos's message of "Tue, 01 Mar 2022 13:47:09 +0100")
Hi,
Maxime Devos <maximedevos@telenet.be> skribis:
> Attila Lendvai schreef op di 01-03-2022 om 08:06 [+0100]:
>> their service is started. One such example is calling setrlimit from a start
>> action to set NOFILE (the open files limit), before the service is exec'ed and
>> thus inherits this value from the parent process, i.e. from Shepherd.
>
> 'fork+exec-command' already accepts a 'environment-variables' and
> 'file-creation-mask', how about adding an 'open-file-limit' argument?
> To me, that seems more declarative and less fragile than having
> to call 'call-in-fork' manually in a 'start' procedure (*).
Seconded.
> Support for other rlimits can be added on an as-needed basis.
> Alternatively, the argument could be generalised to a more general
> 'rlimit' argument:
>
> #:rlimits
> `((,RLIMIT_AS ,SOFT ,HARD)
> (,RLIMIT_NPROC ,SOFT ,HARD)
> (,RLIMIT_NOFILE ,SOFT ,HARD))
>
> WDYT?
This interface brings more flexibility, I’m all for it.
> (*) E.g., one of the ideas for making shepherd faster, was using some
> kind of multi-threading. Forking when multi-threading is ill-defined
I think what we need is concurrency, not POSIX threads. IOW, we can
achieve the concurrency we need without resorting to POSIX threads, for
example using Fibers on a single POSIX thread.
Thanks,
Ludo’.
next prev parent reply other threads:[~2022-03-02 16:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 7:06 [bug#54205] [PATCH Shepherd] Factor out a public CALL-IN-FORK Attila Lendvai
2022-03-01 7:29 ` [bug#54205] [PATCH v2] Factor out a public FORK-AND-CALL Attila Lendvai
2022-03-01 12:01 ` Liliana Marie Prikler
2022-03-01 13:04 ` Attila Lendvai
2022-03-01 14:01 ` Liliana Marie Prikler
2022-03-01 17:14 ` Christine Lemmer-Webber
2022-03-01 12:47 ` [bug#54205] [PATCH Shepherd] Factor out a public CALL-IN-FORK Maxime Devos
2022-03-02 16:05 ` Ludovic Courtès [this message]
2022-03-02 18:21 ` Maxime Devos
2022-03-03 8:04 ` Attila Lendvai
2022-03-21 13:03 ` bug#54205: " Ludovic Courtès
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=87lexs1gs9.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=54205@debbugs.gnu.org \
--cc=attila@lendvai.name \
--cc=maximedevos@telenet.be \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).