[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
- Re: Introduce posix_spawn, (continued)
- Re: Introduce posix_spawn, Bruno Haible, 2018/09/07
- Re: Introduce posix_spawn, Eric Blake, 2018/09/07
- Re: Introduce posix_spawn, Bernhard Voelker, 2018/09/08
- Re: Introduce posix_spawn, Eric Blake, 2018/09/10
- Re: posix_spawn_file_actions_addchdir, Bruno Haible, 2018/09/07
- Re: posix_spawn_file_actions_addchdir, Eric Blake, 2018/09/07
- Re: posix_spawn_file_actions_addchdir, Bruno Haible, 2018/09/07
Re: Introduce posix_spawn,
Tavian Barnes <=