* doc/lispref/os.texi (Batch Mode): Mention what the exit code is
if an error is signalled (bug#31552).
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