diff options
author | Philipp Stephani <phst@google.com> | 2020-12-23 15:55:23 +0100 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2020-12-23 15:55:23 +0100 |
commit | 95334ee79ab60c0910a5528e586a24d11f91743b (patch) | |
tree | 2938b1215c75c61cdead9a29d6bea6fd8ae54585 /test/lisp/emacs-lisp | |
parent | 3cbd4169d6dd370b4fa8180fc2adfbf426f57837 (diff) | |
download | emacs-95334ee79ab60c0910a5528e586a24d11f91743b.tar.gz emacs-95334ee79ab60c0910a5528e586a24d11f91743b.tar.bz2 emacs-95334ee79ab60c0910a5528e586a24d11f91743b.zip |
Allocate environment block before forking.
While 'child_setup' carefully avoids calls to async-signal-unsafe
functions like 'malloc', it seems simpler and less brittle to use
normal allocation outside the critical section between 'fork' and
'exec'.
* src/callproc.c (make_environment_block): New function to create the
environment block for subprocesses. Code largely extracted from
'child_setup' and adapted to use 'xmalloc' instead of 'alloca'.
(child_setup): Remove environment block allocation in favor of
passing the environment block as command-line argument.
(call_process): Adapt to new calling convention.
* src/process.c (create_process): Adapt to new calling convention.
Diffstat (limited to 'test/lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions