aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2026-02-28 16:10:08 +0200
committerEli Zaretskii2026-02-28 16:10:08 +0200
commitb540c45bc53d66c3869e049e6577b275c446a87f (patch)
tree31f3c335094eec487dc5ef02b0753900de32cc5f
parenta9a03cf35ef4f4bb3a75daffaa93e620f808db0f (diff)
downloademacs-master.tar.gz
emacs-master.zip
Document that string ARG of 'kill-emacs' might not workHEADmaster
* src/emacs.c (Fkill_emacs): * doc/lispref/os.texi (Killing Emacs): Document that EXIT-DATA being a string doesn't always work. (Bug#80435)
-rw-r--r--doc/lispref/os.texi5
-rw-r--r--src/emacs.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index ccc0f69a12d..bb768fe2da8 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -713,7 +713,10 @@ the Emacs process. (This is useful primarily in batch operation; see
713 713
714If @var{exit-data} is a string, its contents are stuffed into the 714If @var{exit-data} is a string, its contents are stuffed into the
715terminal input buffer so that the shell (or whatever program next reads 715terminal input buffer so that the shell (or whatever program next reads
716input) can read them. 716input) can read them. This is only possible on some systems. Note that
717recent versions of GNU/Linux disable the system API required for
718stuffing the string into the terminal input, so this might not work on
719your system without special privileges.
717 720
718If @var{exit-data} is neither an integer nor a string, or is omitted, 721If @var{exit-data} is neither an integer nor a string, or is omitted,
719that means to use the (system-specific) exit status which indicates 722that means to use the (system-specific) exit status which indicates
diff --git a/src/emacs.c b/src/emacs.c
index 17c56986083..777ade9d825 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2947,7 +2947,9 @@ sort_args (int argc, char **argv)
2947DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 2, "P", 2947DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 2, "P",
2948 doc: /* Exit the Emacs job and kill it. 2948 doc: /* Exit the Emacs job and kill it.
2949If ARG is an integer, return ARG as the exit program code. 2949If ARG is an integer, return ARG as the exit program code.
2950If ARG is a string, stuff it as keyboard input. 2950If ARG is a string, stuff it as keyboard input. (This might
2951not work on modern systems due to security considerations, or
2952not at all.)
2951Any other value of ARG, or ARG omitted, means return an 2953Any other value of ARG, or ARG omitted, means return an
2952exit code that indicates successful program termination. 2954exit code that indicates successful program termination.
2953 2955