in reply to Re^2: Setting up 2 way pipe for a command
in thread Setting up 2 way pipe for a command

Uh... "premature end error"? As in HTTP server error response? If this is indeed the case, try running the thing from the command line, or at least printing a text/plain header somewhere ahead of the block above.

Maybe on that iteration that didn't puke, the application being run via IPC::Run didn't output anything?

  • Comment on Re^3: Setting up 2 way pipe for a command

Replies are listed 'Best First'.
Re^4: Setting up 2 way pipe for a command
by gw1500se (Beadle) on Jul 03, 2008 at 23:19 UTC
    Thanks for the reply. Its the "process ended prematurely" error. Sorry I didn't take the time to look up the error rather than go from poor memory. Perhaps I am misunderstanding how this works but there indeed may not be any output on the first call to 'pump'. However, there is definitely input. I then try to drain any output in the 'pumpable' loop before going on to the next input string. Therefore the way I think it works this condition should never happen unless there is a bug in the 'pumpable' function. If I am misunderstanding, please correct me as that would be the solution to my problem.