GNU bug report logs -
#54205
[PATCH Shepherd] Factor out a public CALL-IN-FORK.
Previous Next
Reported by: Attila Lendvai <attila <at> lendvai.name>
Date: Tue, 1 Mar 2022 07:08:01 UTC
Severity: normal
Tags: patch, wontfix
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 54205 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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).
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years and 148 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.