[comp.lang.scheme] exit on Schemes for Unix

ramsdell@LINUS.MITRE.ORG (01/04/90)

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:

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

The rule will fail when the compiler detects an error.

John

gateley@m2.csc.ti.com (John Gateley) (01/06/90)

In article <9001041217.AA11268@huxley.mitre.org> ramsdell@LINUS.MITRE.ORG writes:
>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.

I agree except for one thing:
It should merely set the status bits to a non-zero value (or whatever
restriction Unix percieves as an error).
This allows the scheme program to return more useful error information:
(error 57) where 57 is the error number for directory not found,

John
gateley@m2.csc.ti.com