I'm trying to write a bunch of data to a process, then read out the result. 
Replaced the process here with `cat -` because that's close enough.

function bloop(size)
      data = "f" ^ size

      print("start")
      (pout, pin, p) = readandwrite(`cat -`)
      print("write")
      write(pin, data)
      print("flush")
      flush(pin)
      print("close")
      close(pin)
      print("read")
      output = read(pout)
      print("close")
      close(p)

      println()

      output
end

If `size <= 146944`, this succeeds. If `146944 < size <= 147456`, Julia 
blocks forever at the `read` call in a `kevent` system call. If `size > 
147456`, Julia blocks forever at the `write` call in a `write` system call.

How can I make this work?

Reply via email to