Stop ns builds polluting the environment with EMACSDATA, EMACSDOC
authorGlenn Morris <rgm@gnu.org>
Mon, 9 Jul 2012 07:07:24 +0000 (00:07 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 9 Jul 2012 07:07:24 +0000 (00:07 -0700)
commitd01ba2f14965203aef327c2cebf1474af0f12f90
tree713be84a86219010d326af47bde19f0e267f5331
parent61a116066f7e8c58ece6aaa09aa245ff32764a02
Stop ns builds polluting the environment with EMACSDATA, EMACSDOC

It's bad form for one part of a program to communicate with another
part by making persistent changes to the environment of all subsequent
child processes.  For example, it can cause odd bugs when building
Emacs from within Emacs (eg bug#6401, maybe).

* nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
(ns_init_paths): Do not set EMACSDATA, EMACSDOC.
* nsterm.h (ns_etc_directory): Add it.
* callproc.c [HAVE_NS]: Include nsterm.h.
(init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
src/ChangeLog
src/callproc.c
src/nsterm.h
src/nsterm.m