Arc Forumnew | comments | leaders | submitlogin
1 point by Pauan 4973 days ago | link | parent

I'm trying to get a generic pipe function working... here's the gist of it:

  (w/pipe "grep 'other'"
    (prn "other")
    (readlines))
Should return "other", but instead it's hanging... gotta figure out why. In any case, both pipe-to and pipe-from are now defined in terms of pipe.

---

I've also changed w/pipe-from so it automatically redirects to stdin:

  (w/pipe-from "ls -l" (readlines))


1 point by Pauan 4973 days ago | link

"Should return "other", but instead it's hanging... gotta figure out why."

Ahhh, I got it... it's waiting for the pipe to close:

  (w/pipe "grep 'other'"
    (prn "other")
    (close stdout)
    (readlines))
That makes things trickier...

-----