[Top][All Lists]

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

Re: Introduce posix_spawn

From: Bruno Haible
Subject: Re: Introduce posix_spawn
Date: Sat, 08 Sep 2018 00:06:37 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; )

Eric Blake wrote:
> Although it gets prohibitively expensive in a multi-threaded process to 
> ensure proper locking between all threads that might want to use 
> posix_spawn

Why locking? posix_spawn uses fork() - the vfork() optimization is not
possible in the case when there are file actions -, which creates a
child process with a single thread. So, in the child, there are no
other threads until the exec() call, and the condition variables,
mutexes, etc. are just inactive memory regions.


reply via email to

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