Gabriella439 / turtle

Shell programming, Haskell style

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Surprising Broken Pipe Error

skatenerd opened this issue · comments

This code is intended to cURL a URL and produce a Shell Line containing the tail of the contents at the URL.

let myurl="https://www2.census.gov/geo/relfiles/cdsld13/25/co_cd_25.txt"
in sh $ inproc "head" ["-n", "1"] $ inproc "curl" [myurl] empty

Maybe I'm abusing the library, but I like the idea of composing inproc calls, the same way I would pipe shells together in bash.

When I run the above, I often see:
*** Exception: fd:13: hClose: resource vanished (Broken pipe)

This isn't terrible, since I can just work around using limit. I was just wondering if I'm doing something wrong, or if this illustrates a bug somewhere.