[Haskell-cafe] How to Hijack stdin,err,out, thread safely?

Brandon Allbery allbery.b at gmail.com
Tue Jun 30 19:00:52 UTC 2015


On Tue, Jun 30, 2015 at 2:27 PM, Hiromi ISHII <konn.jinro at gmail.com> wrote:

> 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:
>

Handles are process level, not thread level, in all supported operating
systems. If something is writing to stderr then it is writing to a process
level entity and there is no way to capture it at the level of a thread.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150630/8070ac1f/attachment.html>


More information about the Haskell-Cafe mailing list