[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hack the (init) system!
From: |
Ludovic Courtès |
Subject: |
Re: Hack the (init) system! |
Date: |
Fri, 04 Sep 2015 14:08:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> address@hidden (Ludovic Courtès) writes:
[...]
>> I’m tempted to just commit that. There are shortcomings: (1) the REPL
>> server runs in a thread and threads + fork don’t go together well
>> (although in practice dmd only does fork followed by exec, so it’s OK),
>
> Unfortunately, it's only okay if the code between fork and exec in the
> child process is carefully written to execute only "async-signal-safe"
> operations.
Right (I was not suggesting that the hack is robus, rather that it’s
kinda OK “in practice”, notably because I would only start it once all
the ‘fork’ calls have been made.)
> So, I think we have two choices:
>
> 1. Avoid threads in dmd, i.e. either refrain from adding this REPL
> server feature, or re-implement it in a way that avoids threads.
>
> 2. Avoid 'primitive-fork' in dmd, which means reimplementing
> 'fork+exec-command' in C; reimplementing the code where we currently
> use 'primitive-fork' within various guix service definitions; and
> documenting that users should never use 'primitive-fork' in their
> services. If we choose this route, we should probably disable
> 'primitive-fork' somehow, or at least have it issue a stern warning.
>
> I don't think that we should add a set of features to dmd that will make
> it fundamentally unreliable in a way that cannot be fixed.
>
> What do you think?
Agreed, of course. I think #1 is the way to go.
Thanks,
Ludo’.
- Hack the (init) system!, Ludovic Courtès, 2015/09/03
- Re: Hack the (init) system!, Thompson, David, 2015/09/03
- Re: Hack the (init) system!, Thompson, David, 2015/09/03
- Re: Hack the (init) system!, Mark H Weaver, 2015/09/03
- Re: Hack the (init) system!,
Ludovic Courtès <=
- Re: Hack the (init) system!, Andy Wingo, 2015/09/28
- Re: Hack the (init) system!, Taylan Ulrich Bayırlı/Kammer, 2015/09/29
- Re: Hack the (init) system!, Thompson, David, 2015/09/29
- Re: Hack the (init) system!, Christopher Allan Webber, 2015/09/29