From fe3535dbeec8f3f0fca9e6b895c993e59846e103 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 18 May 2025 18:23:25 +0300 Subject: allow process exit status to be determined by macros * Any value left on the numeric stack now determines the exit code. This ensures you can call n^C as the SciTECO version of exit(n). It will also work with n$$ in the top level macro. But you don't necessarily need any of these commands. * Could be useful in shell scripting as in `sciteco -e "@EB/file/ :@S/foo/\"F1'"` to fail `foo` is not found. --- doc/sciteco.1.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in index f57415c..c7ad1a9 100644 --- a/doc/sciteco.1.in +++ b/doc/sciteco.1.in @@ -223,7 +223,12 @@ Execute \(lqsciteco --help\(rq for more details. .SCITECO_TOPIC status . \*(ST will return a non-null exit code if an error occurred during -batch mode processing. +batch mode processing \(em usually 1 on UNIX. +Otherwise the top value on the numeric stack will determine +the process' exit code as if passed to libc's +.BR exit (3) +function. +On UNIX systems only numbers between 0 and 255 may be meaningfull. . . .SH ENVIRONMENT -- cgit v1.2.3