diff options
| author | Eli Zaretskii | 2026-02-28 16:10:08 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2026-02-28 16:10:08 +0200 |
| commit | b540c45bc53d66c3869e049e6577b275c446a87f (patch) | |
| tree | 31f3c335094eec487dc5ef02b0753900de32cc5f | |
| parent | a9a03cf35ef4f4bb3a75daffaa93e620f808db0f (diff) | |
| download | emacs-master.tar.gz emacs-master.zip | |
* 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.texi | 5 | ||||
| -rw-r--r-- | src/emacs.c | 4 |
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 | ||
| 714 | If @var{exit-data} is a string, its contents are stuffed into the | 714 | If @var{exit-data} is a string, its contents are stuffed into the |
| 715 | terminal input buffer so that the shell (or whatever program next reads | 715 | terminal input buffer so that the shell (or whatever program next reads |
| 716 | input) can read them. | 716 | input) can read them. This is only possible on some systems. Note that |
| 717 | recent versions of GNU/Linux disable the system API required for | ||
| 718 | stuffing the string into the terminal input, so this might not work on | ||
| 719 | your system without special privileges. | ||
| 717 | 720 | ||
| 718 | If @var{exit-data} is neither an integer nor a string, or is omitted, | 721 | If @var{exit-data} is neither an integer nor a string, or is omitted, |
| 719 | that means to use the (system-specific) exit status which indicates | 722 | that 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) | |||
| 2947 | DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 2, "P", | 2947 | DEFUN ("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. |
| 2949 | If ARG is an integer, return ARG as the exit program code. | 2949 | If ARG is an integer, return ARG as the exit program code. |
| 2950 | If ARG is a string, stuff it as keyboard input. | 2950 | If ARG is a string, stuff it as keyboard input. (This might |
| 2951 | not work on modern systems due to security considerations, or | ||
| 2952 | not at all.) | ||
| 2951 | Any other value of ARG, or ARG omitted, means return an | 2953 | Any other value of ARG, or ARG omitted, means return an |
| 2952 | exit code that indicates successful program termination. | 2954 | exit code that indicates successful program termination. |
| 2953 | 2955 | ||