Commit a1eb9657 authored by sewardj's avatar sewardj
Browse files

[project @ 2001-09-14 14:12:00 by sewardj]

yet solaris bogons
parent 721d408d
Left resource busy
Action: openFile
Reason: file is locked
File: readFile001.out
-- !!! readFile test
import IO
source = "readFile001.hs"
filename = "readFile001.out"
main = do
s <- readFile source
h <- openFile filename WriteMode
hPutStrLn h s
hClose h
s <- readFile filename
-- This open should fail, because the readFile hasn't been forced
-- and the file is therefore still locked.
try (openFile filename WriteMode) >>= print
putStrLn s
-- should be able to open it for writing now, because we've forced the
-- whole file.
h <- openFile filename WriteMode
print h
{loc=readFile001.out,type=writable,binary=False,buffering=block (1024)}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment