Bug in IO libraries when sending data through a pipe?
Volker Wysk
post at volker-wysk.de
Fri Mar 15 13:05:37 EST 2002
On Fre, 2002-03-15 at 15:05, Volker Stolz wrote:
> Am 15. Mar 2002 um 14:39 MET schrieb Volker Wysk:
> > - If instead the child's child (echo.c) closes stdin immediately after
> > being executed, some data is lost.
>
> Where's the use in closing stdin when you're passing arguments as
> parameters? This is effectively a NOP and shouldn't influence the result,
> so I'd expect the same "missing" data as in your original case.
Yes, it's a NOP (just to be sure). The difference is in child.hs:
callIO (\ps -> "Kommando fehlgeschlagen mit " ++ show ps
++ ":\n" ++ kommando prog par)
(executeFile' prog True par Nothing)
-- instead, to avoid bug:
-- (hClose stdin >> executeFile' prog True par Nothing)
If you use the commented out line instead of the one in effect
("(executeFile' prog..."), you get the first behaviour, which is, the
problem doesn't occur.
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20020315/2af07092/attachment.bin
More information about the Glasgow-haskell-bugs
mailing list