emacs-devel
[Top][All Lists]
Advanced

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

Re: master 2c79a8f 2/2: Use posix_spawn if possible.


From: YAMAMOTO Mitsuharu
Subject: Re: master 2c79a8f 2/2: Use posix_spawn if possible.
Date: Fri, 29 Oct 2021 18:46:47 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

On Sat, 02 Jan 2021 17:56:58 +0900,
Andreas Schwab wrote:
> 
> On Jan 02 2021, Eli Zaretskii wrote:
> 
> >> From: Andy Moreton <andrewjmoreton@gmail.com>
> >> Date: Sat, 02 Jan 2021 01:12:36 +0000
> >> 
> >> > posix_spawn is supposed to be significantly faster than fork/exec on
> >> > macOS and Cygwin.
> >> 
> >> Thanks Alan, useful info. However Philipp started with Linux, so there
> >> ought to also be something useful there that motivated these patches. I
> >> would be interested to learn what helps on Linux.
> >
> > AFAIK, the speedup also happens on GNU/Linux.
> 
> Emacs already uses vfork, what else does posix_spawn give?  Nothing,
> AFAICS.

According to the vfork man page below on macOS 12.0 released this
week, it is deprecating vfork.

                                     YAMAMOTO Mitsuharu
                                mituharu@math.s.chiba-u.ac.jp

NAME
     vfork – deprecated system call to create a new process

SYNOPSIS
     #include <unistd.h>

     pid_t
     vfork(void);

DESCRIPTION
     The vfork system call can be used to create new processes. As of macOS
     12.0, this system call behaves identically to the fork(2) system call,
     except without calling any handlers registered with pthread_atfork(2).

     This system call is deprecated. In a future release, it may begin to return
     errors in all cases, or may be removed entirely.  It is extremely strongly
     recommended to replace all uses with fork(2) or, ideally, posix_spawn(3).

reply via email to

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