Document that string ARG of 'kill-emacs' might not work

* src/emacs.c (Fkill_emacs):
* doc/lispref/os.texi (Killing Emacs): Document that EXIT-DATA
being a string doesn't always work.  (Bug#80435)
This commit is contained in:
Eli Zaretskii 2026-02-28 16:10:08 +02:00
parent a9a03cf35e
commit b540c45bc5
2 changed files with 7 additions and 2 deletions

View file

@ -713,7 +713,10 @@ the Emacs process. (This is useful primarily in batch operation; see
If @var{exit-data} is a string, its contents are stuffed into the
terminal input buffer so that the shell (or whatever program next reads
input) can read them.
input) can read them. This is only possible on some systems. Note that
recent versions of GNU/Linux disable the system API required for
stuffing the string into the terminal input, so this might not work on
your system without special privileges.
If @var{exit-data} is neither an integer nor a string, or is omitted,
that means to use the (system-specific) exit status which indicates

View file

@ -2947,7 +2947,9 @@ sort_args (int argc, char **argv)
DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 2, "P",
doc: /* Exit the Emacs job and kill it.
If ARG is an integer, return ARG as the exit program code.
If ARG is a string, stuff it as keyboard input.
If ARG is a string, stuff it as keyboard input. (This might
not work on modern systems due to security considerations, or
not at all.)
Any other value of ARG, or ARG omitted, means return an
exit code that indicates successful program termination.