|
[ ghc-Bugs-734716 ] ghc-5.05: handle closed by hselect: msg#00009lang.haskell.glasgow.bugs
Bugs item #734716, was opened at 2003-05-08 17:52 Message generated for change (Comment added) made by volkersf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=734716&group_id=8032 Category: hslibs/util Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: ghc-5.05: handle closed by hselect Initial Comment: The included program, compiled with ghc-5.05 fails with the error Fail: illegal operation Action: hGetChar Handle: {loc=<socket: 4>,type=duplex (read- write),binary=True,buffering=none} Reason: handle is closed File: <socket: 4> The error occurs on both Mac OS X 10.2.6 and FreeBSD 4.7. The program works as expected when compiled with ghc-5.04.2. module Main where import Select import Network import Network.Socket import IO portId = (PortNumber portNum) portNum = 9099 main = do sock <- listenOn portId (handle,_,_) <- Network.accept sock putStrLn ("Read") c <- (hGetChar handle) putStrLn ("Got: " ++ show c) ---------------------------------------------------------------------- Comment By: Volker Stolz (volkersf) Date: 2003-05-10 17:22 Message: Logged In: YES user_id=126328 Do you mean hGetChar instead of hSelect? The Select-module is in the deprecated hslibs-branch and you do not use it in your program. It works fine with recent ghc-5.05 from CVS on FreeBSD 4.8-STABLE if I comment out the 'import Select' and compile with -package network. Maybe you should update your snapshot and try again. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=734716&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-734716 ] ghc-5.05: handle closed by hselect, SourceForge.net |
|---|---|
| Next by Date: | ghc-pkg and -l, Axel Simon |
| Previous by Thread: | [ ghc-Bugs-734716 ] ghc-5.05: handle closed by hselect, SourceForge.net |
| Next by Thread: | [ ghc-Bugs-734716 ] ghc-5.05: handle closed by hselect, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |