]> git.eshelyaron.com Git - emacs.git/commitdiff
Mention the Emacs exit code in batch mode
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 12 Oct 2019 21:15:43 +0000 (23:15 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 12 Oct 2019 21:15:43 +0000 (23:15 +0200)
* doc/lispref/os.texi (Batch Mode): Mention what the exit code is
if an error is signalled (bug#31552).

doc/lispref/os.texi

index 912d464b49be27bd76eee4a3129fd075862821c3..93551cab0e5dad4510f15482f3e07eee956beba3 100644 (file)
@@ -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