views:

13

answers:

0

Hi,

I'm using proc_open to run a filter on some output from a database, potentially a large number of lines. Do I need to handle the potential for blocking specially, i.e. is it likely that sending a large chunk of data to the filter and not reading from it's stdout will cause it to block it's stdin, preventing my script from writing until it reads. If so, how can I detect this situation. The contents of the filter are not known in advance.

I'm thinking that if the filter is written within certain constraints (e.g. read first, write only after reading is complete) then things should be hunky dory.