GNU bug report logs - #54205
[PATCH Shepherd] Factor out a public CALL-IN-FORK.

Previous Next

Package: guix-patches;

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


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 54205 <at> debbugs.gnu.org, Attila Lendvai <attila <at> lendvai.name>
Subject: [bug#54205] [PATCH Shepherd] Factor out a public CALL-IN-FORK.
Date: Wed, 02 Mar 2022 17:05:26 +0100
Hi,

Maxime Devos <maximedevos <at> 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’.




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.