[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

exit on Schemes for Unix

Please remember, Scheme is not always used interactively!!!

To: Implementors of Scheme on Unix
Subject: Let your Scheme's exit status reflect the current break level.

I would like to encourage all Scheme Implementors which target Unix to
add a fairly simple feature.  When the exit command is called with no
arguments, or when there is nothing more to read from standard input,
the Scheme interpreter process should set the status bits returned to
the parent process to the break level.  When there has been no errors,
that status should be set to zero, the Unix convention for successful
completion.  A non-zero break level indicates an error, and that state
should be reflected by a non-zero exit status.

For just one example of where this might be useful, consider the
writing of Makefiles.  Suppose we have the rule:

	echo "(compile-file \"$*.sobj\")" | scheme

The rule will fail when the compiler detects an error.