Subject: bug#2653: shell terminates when cmd sets stdout to non-blocking

From: Warren Harris <[email-masked]>
Date: Thu, 12 Mar 2009 17:43:47 -0700

If emacs runs an inferior sub-shell (e.g. bash), and a shell command  
is executed which sets its stdout to non-blocking, the inferior shell  
will terminate when the command terminates. On termination, the  
message is given:

Process shell finished

This happens regardless of the exit status of the command. The  
solution seems to be to rewrite the program to set its stdout to be  
blocking before exiting.