An exec script that outputs more data than the default
OS buffer size for a pipe will block, waiting for the
buffer to empty so it can write more data.
Unfortunately, the agent waits for the exec to complete
before attempting to read the output, causing a deadlock.
This patch reads data from the pipe periodically, thus
preventing the deadlock.
patch for exec deadlock
Logged In: YES
user_id=76148
second version of patch, which handles one more bad input
case, applied for 5.3 and 5.2.1.
Logged In: YES
user_id=76148
also applied for 5.1.3