Sven Panne <[EMAIL PROTECTED]> writes: > ... > * hClose on a semi-closed handle fails (4.02 has this bug, too): > > import IO > main = do > h <- openFile "/etc/passwd" ReadMode > c <- hGetContents h > putStr c > hClose h > > Transcript: > > root:x:0:0:root:/root:/bin/bash > bin:x:1:1:bin:/bin:/bin/bash > [...] > Fail: illegal operation > Action: hClose > Handle: {closed} > Reason: handle is closed > > According to the library report, closing a semi-closed handle > should be allowed. > But that's not the case here. By the time you get around to doing the 'hClose', you've read to the end of the file and the semi-closed handle has been closed for you (cf. report.) --Sigbjorn
RE: fromInteger/hClose bugs in 4.03
Sigbjorn Finne (Intl Vendor) Mon, 22 Feb 1999 16:39:35 +0100 (MET)
- fromInteger/hClose bugs in 4.03 Sven Panne
- Re: fromInteger/hClose bugs in 4.03 Sven Panne
- Re: fromInteger/hClose bugs in 4.03 Sigbjorn Finne (Intl Vendor)
- Re: fromInteger/hClose bugs in 4.03 Hannah Schroeter
- RE: fromInteger/hClose bugs in 4.03 Simon Marlow
- RE: fromInteger/hClose bugs in 4.03 Sigbjorn Finne (Intl Vendor)