From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#29454: wait_reading_process_output duplication Date: Sun, 26 Nov 2017 20:44:27 +0100 Message-ID: References: <83h8th6non.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1511725592 31459 195.159.176.226 (26 Nov 2017 19:46:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Nov 2017 19:46:32 +0000 (UTC) Cc: 29454-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 26 20:46:24 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ2sd-0007KO-KA for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 20:46:20 +0100 Original-Received: from localhost ([::1]:57826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ2sh-0000UC-Pd for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 14:46:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJ2qV-0006ta-3Q for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 14:44:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJ2qQ-0004HI-6G for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 14:44:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50968) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJ2qQ-0004Gw-2H for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 14:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJ2qP-0003oY-Qu for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 14:44:01 -0500 Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Nov 2017 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 29454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 29454@debbugs.gnu.org, charles@aurox.ch, charles@aurox.ch Original-Received: via spool by 29454-done@debbugs.gnu.org id=D29454.151172539214582 (code D ref 29454); Sun, 26 Nov 2017 19:44:01 +0000 Original-Received: (at 29454-done) by debbugs.gnu.org; 26 Nov 2017 19:43:12 +0000 Original-Received: from localhost ([127.0.0.1]:59647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ2pb-0003n7-MX for submit@debbugs.gnu.org; Sun, 26 Nov 2017 14:43:11 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:53704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ2pY-0003mp-Gs for 29454-done@debbugs.gnu.org; Sun, 26 Nov 2017 14:43:10 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id F038C225D8 for <29454-done@debbugs.gnu.org>; Sun, 26 Nov 2017 19:35:40 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:subject:subject:in-reply-to:to:from:from:message-id :date:date; s=dkim; t=1511724939; x=1512588940; bh=ywnOT2mrXcGyY ZStOchr81Di9ZofRCluQEN6vATb6rA=; b=ML6AuyPz/OwG9j4syWFMMQ+Mdm2Oe ZdWPJTFP0erl8LNv3Z8f9Mjm1a9TpjbTOnVeCoUmjXfVYc9v+af1T0LwkzORyoj0 DDBbPNm9eydudGwWrqXnzocidzDzNLHLSIiC5X1AidmhvorAnXPGW53z2ddxtBr3 cfcD5mRZi8ju/0= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rGjEA9m-MzcS for <29454-done@debbugs.gnu.org>; Sun, 26 Nov 2017 19:35:39 +0000 (UTC) Original-Received: from gray (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id B083E225C8; Sun, 26 Nov 2017 19:35:38 +0000 (UTC) In-reply-to: <83h8th6non.fsf@gnu.org> (message from Eli Zaretskii on Sun, 26 Nov 2017 17:54:00 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140424 Archived-At: > Date: Sun, 26 Nov 2017 17:54:00 +0200 > From: Eli Zaretskii > CC: 29454@debbugs.gnu.org > Reply-to: Eli Zaretskii > > > Date: Sun, 26 Nov 2017 10:45:53 +0100 > > From: charles@aurox.ch (Charles A. Roelli) > > > > Looks like these two blocks are duplicated in > > wait_reading_process_output in process.c: > > > > 5628 #ifdef WINDOWSNT > > 5629 /* FIXME: Is this special case still needed? */ > > 5630 /* Note that we cannot distinguish between no input > > 5631 available now and a closed pipe. > > 5632 With luck, a closed pipe will be accompanied by > > 5633 subprocess termination and SIGCHLD. */ > > 5634 else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) > > 5635 && !PIPECONN_P (proc)) > > 5636 ; > > 5637 #endif > > > > 5664 /* If we can detect process termination, don't consider the > > 5665 process gone just because its pipe is closed. */ > > 5666 else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) > > 5667 && !PIPECONN_P (proc)) > > 5668 ; > > > > Can the first be deleted? > > Yes. (The second was originally conditioned on SIGCHLD, which is why > it was separate.) > > Thanks. Thanks, it's pushed to master. commit 6ec5d497b6623e612ca6936ac848234725d4fc61 Date: Sun Nov 26 20:18:54 2017 +0100 * src/process.c (wait_reading_process_output): Deduplicate check. (Bug#29454)