[PATCH v2 3/3] posix: New Linux posix_spawn{p} implementation

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Feb 2 13:31:00 GMT 2016



On 02-02-2016 11:05, Florian Weimer wrote:
> On 02/01/2016 05:21 PM, Adhemerval Zanella wrote:
> 
>> +  new_pid = CLONE (__spawni_child, STACK (stack, stack_size),
>> +		   CLONE_VM | CLONE_VFORK | SIGCHLD, &args);
> 
> Does this set up new per-thread variables?  Otherwise, errno in the
> parent and child will be same and the code still has races.
> 
> Florian
> 

Could you elaborate? In my understanding there is no requirement of
using CLONE_SETTLS to avoid races: CLONE_VFORK will suspend the 
calling process and even with child using the same TLS namespace as
the parent there will be no concurrent access between them.



More information about the Libc-alpha mailing list