From: Maxime Devos <maximedevos@telenet.be>
To: Attila Lendvai <attila@lendvai.name>, 54205@debbugs.gnu.org
Subject: [bug#54205] [PATCH Shepherd] Factor out a public CALL-IN-FORK.
Date: Tue, 01 Mar 2022 13:47:09 +0100 [thread overview]
Message-ID: <cf4063f4844520b276e2ee51e375c036707cd265.camel@telenet.be> (raw)
In-Reply-To: <20220301070615.21028-1-attila@lendvai.name>
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
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 (*).
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?
Greetings,
Maxime.
(*) E.g., one of the ideas for making shepherd faster, was using some
kind of multi-threading. Forking when multi-threading is ill-defined
(see POSIX) though, so some kind of zygote process + IPC might be
necessary
(http://neugierig.org/software/chromium/notes/2011/08/zygote.html has a
nice explanation on zygote processes, the bits about software updates
can be ignored here).
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2022-03-01 12:51 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 ` Maxime Devos [this message]
2022-03-02 16:05 ` [bug#54205] [PATCH Shepherd] Factor out a public CALL-IN-FORK Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf4063f4844520b276e2ee51e375c036707cd265.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=54205@debbugs.gnu.org \
--cc=attila@lendvai.name \
/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.