in reply to Re: Diagnosing blocking io (or: finding the WHY of my Open2 woes).
in thread Diagnosing blocking io (or: finding the WHY of my Open2 woes).

Sure, and if I'm out of luck, that's fine, but I'm also trying to increase my understanding here, so would there be any way to go about verifying that it's using block buffering? Also, aren't I sending it an end-of-line by using the newline character at the end of each print? As I said, it works if I don't enter the readline() loop via Javascript. I can issue other javascript commands perfectly fine.
  • Comment on Re^2: Diagnosing blocking io (or: finding the WHY of my Open2 woes).

Replies are listed 'Best First'.
Re^3: Diagnosing blocking io (or: finding the WHY of my Open2 woes).
by almut (Canon) on Nov 18, 2008 at 22:54 UTC

    Actually, on second thought, your problem might rather be that the subprocess' output buffer is filling up... so it stops processing anything (i.e. hangs/waits) before you get a chance to read/emtpy the buffer (as you're doing the reading after the writing).  Just another hypothesis, though :)

    How much output would you expect when things don't work?

    As to diagnosing what's going on, strace would probably be a good tool.

      I don't think that's the problem. The expected output from the test case is simply "No problems reported."