[Haskell-cafe] System.Process.readProcess "yes" [] "" >>= return . take 100

Lukas Braun koomi at hackerspace-bamberg.de
Tue Sep 2 01:14:15 UTC 2014


No, that's not a bug. From the documentation on «readProcess»:

> readProcess forks an external process, reads its standard output
> strictly, blocking until the process terminates, and returns the
> output string.

Since «yes» never terminates, the call to «readProcess» will block
forever.


Lukas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140902/9444e23a/attachment.sig>


More information about the Haskell-Cafe mailing list