From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Warren Harris Newsgroups: gmane.emacs.bugs Subject: bug#2653: shell terminates when cmd sets stdout to non-blocking Date: Thu, 12 Mar 2009 17:43:47 -0700 Message-ID: <4848E3AC-1F6F-4D1B-A12C-A60AAB0080E2@metaweb.com> Reply-To: Warren Harris , 2653@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1236916751 23645 80.91.229.12 (13 Mar 2009 03:59:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Mar 2009 03:59:11 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 13 05:00:28 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LhyZO-0007mZ-Nl for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Mar 2009 05:00:26 +0100 Original-Received: from localhost ([127.0.0.1]:43321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhyY2-00079v-Ri for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Mar 2009 23:59:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhvoU-00019p-AG for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 21:03:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhvoP-00014M-8D for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 21:03:49 -0400 Original-Received: from [199.232.76.173] (port=59378 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhvoO-000149-SI for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 21:03:44 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53572) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LhvoO-00069D-1s for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 21:03:44 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2D13fU6027483; Thu, 12 Mar 2009 18:03:42 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n2D0o4Qq023994; Thu, 12 Mar 2009 17:50:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Warren Harris Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 13 Mar 2009 00:50:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2653 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123690504722620 (code B ref -1); Fri, 13 Mar 2009 00:50:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 13 Mar 2009 00:44:07 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2D0i4n9022610 for ; Thu, 12 Mar 2009 17:44:05 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhvVM-0001K1-7o for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 20:44:04 -0400 Original-Received: from [199.232.76.173] (port=38666 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhvVL-0001Jt-Sz for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 20:44:03 -0400 Original-Received: from mx01.metaweb.com ([208.68.111.25]:38412) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LhvVL-0001QW-Fg for bug-gnu-emacs@gnu.org; Thu, 12 Mar 2009 20:44:03 -0400 Original-Received: from zimbra01.corp.sjc1.metaweb.com (localhost [127.0.0.1]) by mx01.metaweb.com (Spam Firewall) with ESMTP id 64EB311A0F3 for ; Thu, 12 Mar 2009 17:43:48 -0700 (PDT) Original-Received: from zimbra01.corp.sjc1.metaweb.com (zimbra01.corp.sjc1.metaweb.com [172.29.253.13]) by mx01.metaweb.com with ESMTP id qf7x7mtn1QAtog89 for ; Thu, 12 Mar 2009 17:43:48 -0700 (PDT) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra01.corp.sjc1.metaweb.com (Postfix) with ESMTP id 41C30160C07A for ; Thu, 12 Mar 2009 17:43:48 -0700 (PDT) X-Virus-Scanned: amavisd-new at Original-Received: from zimbra01.corp.sjc1.metaweb.com ([127.0.0.1]) by localhost (zimbra01.corp.sjc1.metaweb.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EEA+zNxueJRN for ; Thu, 12 Mar 2009 17:43:48 -0700 (PDT) Original-Received: from timesink.corp.631h.metaweb.com (timesink.corp.631h.metaweb.com [172.31.20.32]) by zimbra01.corp.sjc1.metaweb.com (Postfix) with ESMTP id 140C0160C05A for ; Thu, 12 Mar 2009 17:43:48 -0700 (PDT) X-Mailer: Apple Mail (2.930.3) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 12 Mar 2009 21:03:49 -0400 X-Mailman-Approved-At: Thu, 12 Mar 2009 23:58:40 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26286 Archived-At: 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.