]> git.eshelyaron.com Git - emacs.git/commit
PATH defaults now act more like GNU and POSIX
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Jul 2025 21:49:52 +0000 (14:49 -0700)
committerEshel Yaron <me@eshelyaron.com>
Fri, 25 Jul 2025 20:14:36 +0000 (22:14 +0200)
commit0d6661777cdae6b7223f64bcfa535f11fb98f545
tree7a8c636091bb718d509906ed3203c1977a5257df
parentd63342327c9d3e1d92718b7680b755c77218a816
PATH defaults now act more like GNU and POSIX

When PATH is unset or empty, use the system default,
to be consistent with GNU/Linux and with POSIX.
If there is no system default do not default to "."
as that can be dangerous.
* src/callproc.c (init_callproc_1, init_callproc):
Default PATH to the null pointer, not the empty string.
* src/emacs.c (default_PATH): New function.
(find_emacs_executable, decode_env_path): Be consistent with POSIX
and with glibc about what to do when PATH is unset or empty.

(cherry picked from commit eb9ec79c13f17d610fcb6de49628b8a7686fbab7)
doc/emacs/cmdargs.texi
doc/emacs/misc.texi
etc/NEWS
src/callproc.c
src/emacs.c