[darcs-users] darcs patch: shell_harness script in haskell
Eric Kow
kowey at darcs.net
Tue Nov 4 17:01:08 UTC 2008
On Tue, Nov 04, 2008 at 11:16:08 +0100, Christian Kellermann wrote:
> * David Roundy <droundy at darcs.net> [081102 12:53]:
> > > + forkIO (evaluate (length errput) >> putMVar errMVar ())
> > > + takeMVar outMVar
> > > + takeMVar errMVar
> > > + e <- catch
> > > + (waitForProcess pid)
> > > + (\_ -> return ExitSuccess)
> > > + hClose out >> hClose err
> > > + return (e, (output, errput))
> >
> > It'd be better to keep output and errput interleaved as closely as
> > possible. It's unfortunate that runInteractiveCommand doesn't support
> > this, but you could look at franchise for an attempt to get some semblance
> > of interleaving through use of threads. Without this, it's very hard to
> > figure out which error messages go with which output.
Would something like GHC.Handle.hDuplicate help at all? See the Exec
module for an example. Note the complaint that it is not available from
a standard place.
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081104/25c2c970/attachment.pgp
More information about the darcs-users
mailing list