[pro] Default behavior of standard output streams

Jason S. Cornez jcornez at alum.mit.edu
Wed May 23 14:50:54 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

As others have pointed out, this does not appear to be a bug with
respect to the hyperspec.

But in my opinion, those implementations which send *error-output* to
the same place as *standard-output* on POSIX platforms do have a bug.
 There is a quite reasonable expectation for how stdout and stderr
should behave on those platforms, and if a language implementation
does not conform to that behavior, it seems like it can be considered
a bug.

Conformance with the hyperspec isn't the only standard for considering
if some behavior is a bug, is it?

- -Jason

On 05/22/2012 10:58 AM, Didier Verna wrote:
> 
> 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?
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+8+U4ACgkQQlm6HDTMLyMbHgCg0EUxEl8GG+cPuE615mAdBmtr
lxwAoPsYEW64qlmMHnvtyS0MDugKYlzV
=/EIh
-----END PGP SIGNATURE-----




More information about the pro mailing list