From: Lars Ingebrigtsen Date: Sat, 12 Oct 2019 21:15:43 +0000 (+0200) Subject: Mention the Emacs exit code in batch mode X-Git-Tag: emacs-27.0.90~1122 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6c677a101d16cffd1e59acf090c4769561f82a53;p=emacs.git Mention the Emacs exit code in batch mode * doc/lispref/os.texi (Batch Mode): Mention what the exit code is if an error is signalled (bug#31552). --- diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 912d464b49b..93551cab0e5 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2595,6 +2595,15 @@ if it is non-@code{nil}; this can be overridden by binding This variable is non-@code{nil} when Emacs is running in batch mode. @end defvar +If Emacs exits due to signalling an error in batch mode, the exit +status of the Emacs command is non-zero: + +@example +$ emacs -Q --batch --eval '(error "foo")'; echo $? +foo +255 +@end example + @node Session Management @section Session Management @cindex session manager