diff options
author | Philipp Stephani <phst@google.com> | 2020-12-24 15:27:45 +0100 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2020-12-24 15:34:23 +0100 |
commit | bf7041a6f6ea2d57f842b9b2915cc58a90b01406 (patch) | |
tree | 30576ef17b8ab3ba1514fd67e303635d21fa286e /lib/malloc | |
parent | 3096437593ca6d1ea07809f7d0e2198705f20e55 (diff) | |
download | emacs-bf7041a6f6ea2d57f842b9b2915cc58a90b01406.tar.gz emacs-bf7041a6f6ea2d57f842b9b2915cc58a90b01406.tar.bz2 emacs-bf7041a6f6ea2d57f842b9b2915cc58a90b01406.zip |
Centralize subprocess creation in a single function.
Getting the vfork + execve combination right isn't easy, and the code
was partially duplicated between callproc.c and process.c. Centralize
the spawn operation in a single function that deals with the nasty
details. Going forward, we should be able to use posix_spawn from
either libc or Gnulib (or CreateProcessW on Windows) in the non-pty
case.
* src/callproc.c (emacs_spawn): New function to start an asynchronous
subprocess. Merge code from 'call_process' and 'create_process' into
this function.
(call_process): Use new 'emacs_spawn' function.
(child_setup): Make static, since there are no users outside this
compilation unit left.
(CHILD_SETUP_TYPE): Move from header file, since there are no users
outside this compilation unit left.
* src/process.c (create_process): Use new 'emacs_spawn' function.
Diffstat (limited to 'lib/malloc')
0 files changed, 0 insertions, 0 deletions