bug-findutils
[Top][All Lists]
Advanced

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

Re: Introduce posix_spawn


From: Tavian Barnes
Subject: Re: Introduce posix_spawn
Date: Mon, 10 Sep 2018 12:09:03 -0400

> 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

The glibc implementation uses clone() on Linux regardless of whether
there are file actions, which should give performance closer to
vfork() than fork().

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/spawni.c

-- 
Tavian Barnes



reply via email to

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