diff options
| author | Philipp Stephani | 2020-12-30 14:42:01 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2021-11-13 16:45:19 +0100 |
| commit | cc4edea872ca653f3e0631ce50e47b5260c6773a (patch) | |
| tree | 1687f6dc24ee03aade146c749504d3b8d7b9e73f /lib/malloc/dynarray.h | |
| parent | a56dd60d2fba9d873748ca3831ba61711628f698 (diff) | |
| download | emacs-cc4edea872ca653f3e0631ce50e47b5260c6773a.tar.gz emacs-cc4edea872ca653f3e0631ce50e47b5260c6773a.zip | |
Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux. Use
it if we don't need to configure a pseudoterminal.
Backported from commit a60053f8368e058229721f1bf1567c2b1676b239.
Unlike that commit, only define USABLE_POSIX_SPAWN on macOS, because
there posix_spawn is much faster than vfork.
Don't merge to master.
* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.
(cherry picked from commit a60053f8368e058229721f1bf1567c2b1676b239)
Diffstat (limited to 'lib/malloc/dynarray.h')
0 files changed, 0 insertions, 0 deletions