[GHC] #2628: hIsTerminalDevice returns True for /dev/null (aka NUL) on Windows

GHC trac at galois.com
Mon Oct 20 06:21:16 EDT 2008


#2628: hIsTerminalDevice returns True for /dev/null (aka NUL) on Windows
----------------------------+-----------------------------------------------
 Reporter:  igloo           |          Owner:         
     Type:  bug             |         Status:  new    
 Priority:  normal          |      Milestone:  _|_    
Component:  libraries/base  |        Version:  6.8.3  
 Severity:  normal          |     Resolution:         
 Keywords:                  |     Difficulty:  Unknown
 Testcase:  2228            |   Architecture:  x86    
       Os:  Windows         |  
----------------------------+-----------------------------------------------
Changes (by simonmar):

  * summary:  isatty behaves unexpectedly on mingw => hIsTerminalDevice
              returns True for /dev/null (aka NUL) on Windows
  * milestone:  6.10.2 => _|_

Comment:

 `isatty` does indeed return non-zero for NUL on Windows.  In fact,
 `GetFileType` also returns `FILE_TYPE_CHAR` for NUL, so it seems hard to
 tell them apart.

 I'm not planning to do anything about this except for marking the bug as
 an expected failure, it's a fairly rare corner-case.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2628#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list