Ticket #3139 try to detect if the popen is closed from an error