Ignore:
Timestamp:
Mar 4, 2012, 3:01:55 PM (8 years ago)
Author:
gb
Message:

(SAME-FD-P a b) returns true if it can tell that file descriptors
(file handles on Windows) a and b refer to the same underlying file
(socket, pipe, tty.)

Make *ERROR-OUTPUT* a synonym to CCL::*STDERR* if *batch-flag* or if
file descriptors 1 and 2 (or the Windows equivalents) don't refer
to the same file (handy for those who run interactively with whatever
line noise is required to redirect fd 2 ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-boot-2.lisp

    r15169 r15230  
    176176        (setq *standard-input* (make-synonym-stream '*terminal-io*)
    177177              *standard-output* (make-synonym-stream '*terminal-io*))))
    178     (setq *error-output* (if *batch-flag*
     178    (setq *error-output* (if (or *batch-flag*
     179                                 (not (same-fd-p (stream-device *stderr* :output)
     180                                                 (stream-device *stdout* :output))))
    179181                           (make-synonym-stream '*stderr*)
    180182                           (make-synonym-stream '*terminal-io*)))
Note: See TracChangeset for help on using the changeset viewer.