windows: (interactive-stream-p *standard-input*) crashes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I get an error for (interactive-
-------
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\
This is SBCL 1.0.29, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
This is experimental prerelease support for the Windows platform: use
at your own risk. "Your Kitten of Death awaits!"
* (interactive-
debugger invoked on a TYPE-ERROR: The value 64 is not of type BIT.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-IMPL:
#<SB-SYS:FD-STREAM for "standard input" {23B57679}>
:INTERACTIVE-P
NIL
#<unused argument>)
0] (quit)
Changed in sbcl: | |
importance: | Undecided → Medium |
Changed in sbcl: | |
status: | Confirmed → In Progress |
assignee: | nobody → Roman Marynchak (roman-marynchak) |
Also reproduced with SBCL 1.0.32.38 on WinXP.
POSIX says that isatty(3) returns 1 if the fd is a tty and 0 otherwise, while MSDN says "nonzero" if the fd is a tty (whether "tty"ness corresponds to being attached to a console handle is another matter). The fd-stream- misc-routine is very obviously using (= 1 (the (member 0 1) (isatty ...))). Perhaps this should be (not (zerop (the integer (isatty ...))))?
Calling interactive- stream- p on a stream for a file on disk works as expected.