guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Shepherd on Fibers


From: Maxime Devos
Subject: Re: The Shepherd on Fibers
Date: Tue, 29 Mar 2022 12:40:58 +0200
User-agent: Evolution 3.38.3-1

Zhu Zihao schreef op di 29-03-2022 om 18:13 [+0800]:
> IMO the problem is not fork, you can't do anything useful to create
> subprocess without fork on *NIX systems.
> 
> fork is allowed to execute in multi-thread environment. It just don't
> care about other threads, it's safe and recommended if you only call
> execv after fork.
> 
> The problem is, Shepherd is too flexible and people can do so many
> things other than fork+exec in the startup of Shepherd service
> (unlike
> systemd, only create subprocess is allowed). So Shepherd has to be
> conservative.
> 

Being conservative is not sufficient.  What if, in-between 'fork' and
'exec', some memory is allocated (and hence, in typical 'malloc'
implementations, locking happens)?

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]