[Haskell-cafe] How to Hijack stdin,err,out, thread safely?
Hiromi ISHII
konn.jinro at gmail.com
Tue Jun 30 18:27:46 UTC 2015
Hi,
I'm currently writing a web app to check the spec of input code
usging QuickCheck.
quickCheck* functions writes results to stderr & stdout, but I
don't want them written to the app's original stdout/err.
(I'm using SafeHaskell features to avoid malicious code executed,
so don't worry about that :-))
So I want to execute I/O action hijacking stdout/err in a thread-safe manner.
For example, I need function like below:
censorHandles :: IO a -> IO (a, String, String)
censorHandles = ...
or
withStd :: Handle -> Handle -> Handle -> IO a -> IO a
withStd = ...
-- Hiromi ISHII
konn.jinro at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150701/4165a063/attachment.sig>
More information about the Haskell-Cafe
mailing list