[ ghc-Bugs-1187295 ] runProcess hangs with duplicate handles
SourceForge.net
noreply at sourceforge.net
Thu Apr 21 07:11:46 EDT 2005
Bugs item #1187295, was opened at 2005-04-21 11:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1187295&group_id=8032
Category: libraries/base
Group: 6.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Roman Leshchinskiy (romanle)
Assigned to: Nobody/Anonymous (nobody)
Summary: runProcess hangs with duplicate handles
Initial Comment:
runProcess doesn't seem to allow the same handle to be
used for redirecting stdout and stderr. Thus,
main =
do
h <- openFile "output" WriteMode
ph <- runProcess "/bin/ls" [] Nothing Nothing
Nothing (Just h) (Just h)
waitForProcess ph
return ()
hangs in ghci and aborts with "thread blocked
indefinitely" if compiled. This isn't documented and
I hope this is not the intended behaviour as
redirecting stdout and stderr (and stdin in the case of
ptys) to the same file/pipe is quite common.
System is Linux 2.4.20-8 #1 Thu Mar 13 17:54:28 EST
2003 i686
ghc is vanilla 6.4
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1187295&group_id=8032
More information about the Glasgow-haskell-bugs
mailing list