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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to