in src/main/connections.c, the function pipe_close does not capture the return value of its pclose call.
static void pipe_close(Rconnection con)
con->isopen = FALSE;
Because pclose returns the exit code of the subprocess, there is now no straightforward way to determine whether the subprocess succeeded.
Would it be possible to capture this value and do something along the lines of any of the following:
1) add some sort of field to the connection object that could be read with summary.connection, or
2) have the close.connection() R function return something other than NULL i.e. an object containing status information including this exit code.
3) have a separate function for closing a pipe that specifically returned the result of the pclose call.
Something like 2 has been done in R-devel.