[pro] Default behavior of standard output streams

Didier Verna didier at lrde.epita.fr
Tue May 22 08:58:27 UTC 2012


  Hello,

there is a discrepancy amongst compilers on how the default output streams
behave in some situations. Consider the following test case:

(format *standard-output* "This goes to standard output.~%")
(format *error-output* "This goes to error output.~%")
(format *query-io* "This goes to query io.~%")


Now, launch you favorite Lisp on a terminal and load this file at
startup in 3 different ways:

myfavoritelisp --the-load-option test.lisp
myfavoritelisp --the-load-option test.lisp > log
myfavoritelisp --the-load-option test.lisp > log 2>&1


SBCL and CMUCL behave in a way which I think is right:
case #1: everything is printed on the terminal
case #2: stdout goes in the file
case #3: stdout and stderr go in the file (*query-io* stays on the tty)

ECL redirects the output of *query-io* in the file for cases #2 and #3.
The behavior of stdout and stderr is the same as in SBCL and CMUCL.

Finally, LW, ACL, CLISP, CCL and ABCL redirect everything in the file in
cases #2 and #3.


I'm ready to fill in bug reports for the last 6 compilers, but are these
really bugs? I'm convinced that it is for stderr, but it may be arguable
for *query-io*.

WDYT?

-- 
Resistance is futile. You will be jazzimilated.

Scientific site:   http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com




More information about the pro mailing list