From unknown Mon Jun 23 18:31:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30762: 27.0.50; Apparent regression in process.c caused by checking pty_flag before calling setsid Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Mar 2018 04:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 30762@debbugs.gnu.org Cc: Paul Eggert X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.152065554930270 (code B ref -1); Sat, 10 Mar 2018 04:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Mar 2018 04:19:09 +0000 Received: from localhost ([127.0.0.1]:53037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euVyO-0007sA-Mk for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euVyM-0007rl-Rh for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euVyG-000768-LW for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57515) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euVyG-000762-H2 for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euVyF-0002ob-6t for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:19:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euVyB-00074g-7U for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:18:59 -0500 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:36037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euVyA-00074H-Vl for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:18:55 -0500 Received: by mail-io0-x22e.google.com with SMTP id e30so5749217ioc.3 for ; Fri, 09 Mar 2018 20:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=cPUw/BU05+q9VYqYnC2v7XROI1AzOpiyzrasdRHWBtw=; b=W2UF/pS1PpJ5m40E7/C6OpFuUFqCFPyyc6wVLTkrVlY6st4PRYWuSIf93iX/UljELP 7m0NR8M1oMPrGZ7xV+XxVqhqpi8dC1L09EuaRekBrCMRcSFsLgdykRJIsi2JStbUHFkw AkjtCa2/enDZhTvYkuH3S9RsDjYTUupzRQ4NePIykMNPB/V3vU+KTU0GJhUI2ID1SsW0 PtwBgUVaZu7uWelFJRartmrFczAL48tvg0NuLEn6jOeed1cDXqHptnB5eAV82Bv0bJd8 10QocNSQ5nWKvT1SMLcaasTs/QBBCVNBJeMdQmGpHDAMGTLjgO6aaSuc2r2SSUdD5HJL OHNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=cPUw/BU05+q9VYqYnC2v7XROI1AzOpiyzrasdRHWBtw=; b=Pb+SPobpDtEfvaXv6wP4oEcOSj0/ju0+kxoTueVU0NEmm+w3cUfwci8ISRh/C0+T5L WYOKmTEe9phhHXwBRgRoEiZArZGfRJ1YzRV0pIqrbpamkGIuJQbL9/7U33iVICWN7u1I 0F1CpVhgjPZaQci6UUFUu3UGj07ScGuXAhsQo1GoGkgj2Fxn/smc0ewgR4uVuTS2pej3 qmyjs+cgV34huytUZUhoAagFTImq5wyroRWLfOc7UBlTMH9gkttVAn0mMC7kpOzk+QWO nkxzohkrO7td3b0VLXaoWPRwsWPg9UxD1G3/QhFqHSBssTfhPFsYYLiL6qaLIMAEJcX0 WORw== X-Gm-Message-State: AElRT7EMhE8MjYdKCqux/nUu/WIxvVHWEYxHYaaIxq4iYxDTDv83Vcb/ Q6+aTuw6GetypAenbK3paMiG3w== X-Google-Smtp-Source: AG47ELtcovUswXIoFQcdVWtSCNHNezgKcU4DPZQWsNKUrX/0MJtv7YlPzRQpPtHwoecC1CZLWkW1lA== X-Received: by 10.107.147.135 with SMTP id v129mr874785iod.172.1520655533895; Fri, 09 Mar 2018 20:18:53 -0800 (PST) Received: from hp-dv5t (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id k12sm144614iti.32.2018.03.09.20.18.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 20:18:52 -0800 (PST) From: Thomas Fitzsimmons Date: Fri, 09 Mar 2018 23:18:51 -0500 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, On x86_64, CentOS 7.3.1611, I noticed that on master tip (I tested 461e6818...), eudc-expand-inline was hanging. It calls the ldapsearch command line utility (by way of ldap-search-internal) using start-process, and waits for a password prompt: (let* ((process-connection-type nil) (proc-args (append arglist ldap-ldapsearch-args filter)) (proc (apply #'start-process "ldapsearch" buf ldap-ldapsearch-prog proc-args))) (while (null (progn (goto-char (point-min)) (re-search-forward ldap-ldapsearch-password-prompt-regexp (point-max) t))) (accept-process-output proc 1)) [...]) master tip gets stuck in that while loop, whereas Emacs 25.1 is fine. If I print the contents of the buffer within the loop, it shows: Process ldapsearch stopped (tty output) I isolated the working-to-non-working transition to this commit: commit 8e5a769965313a7a1c42b5992ed24e8b0ea71ead Author: Paul Eggert Date: Tue Dec 6 23:41:45 2016 -0800 Clean out some IRIX cruft * etc/MACHINES: Remove obsolete discussion of IRIX. * src/process.c (allocate_pty) [__sgi]: Remove SGI-specific code. (create_process) [HAVE_PTYS]: Don't worry about IRIX. * src/syntax.c (scan_sexps_forward): Remove obsolete comment. * src/unexelf.c [__sgi]: Don't include . (unexec) [__sgi]: Remove SGI-specific code. and specifically the addition of this check in src/process.c: - /* We tried doing setsid only if pty_flag, but it caused - process_set_signal to fail on SGI when using a pipe. */ - setsid (); + if (pty_flag) + setsid (); If I remove the if (pty_flag) line, then eudc-expand-inline works again. It may be that ldap-search-internal should change how it's invoking ldapsearch, but I thought I would report the change in process.c behavior anyway. Thomas From unknown Mon Jun 23 18:31:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#30762: 27.0.50; Apparent regression in process.c caused by checking pty_flag before calling setsid Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Mar 2018 08:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Thomas Fitzsimmons Cc: 30762@debbugs.gnu.org, eggert@cs.ucla.edu Reply-To: Eli Zaretskii Received: via spool by 30762-submit@debbugs.gnu.org id=B30762.152067099123689 (code B ref 30762); Sat, 10 Mar 2018 08:37:01 +0000 Received: (at 30762) by debbugs.gnu.org; 10 Mar 2018 08:36:31 +0000 Received: from localhost ([127.0.0.1]:53064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euZzT-0006A1-HZ for submit@debbugs.gnu.org; Sat, 10 Mar 2018 03:36:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euZzS-00069n-3X for 30762@debbugs.gnu.org; Sat, 10 Mar 2018 03:36:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euZzM-0003Zw-2x for 30762@debbugs.gnu.org; Sat, 10 Mar 2018 03:36:24 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euZzF-0003Wt-Q3; Sat, 10 Mar 2018 03:36:17 -0500 Received: from [176.228.60.248] (port=2531 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1euZzD-0005n7-P6; Sat, 10 Mar 2018 03:36:16 -0500 Date: Sat, 10 Mar 2018 10:36:15 +0200 Message-Id: <83fu58uy2o.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Thomas Fitzsimmons on Fri, 09 Mar 2018 23:18:51 -0500) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Thomas Fitzsimmons > Date: Fri, 09 Mar 2018 23:18:51 -0500 > Cc: Paul Eggert > > master tip gets stuck in that while loop, whereas Emacs 25.1 is fine. > > If I print the contents of the buffer within the loop, it shows: > > Process ldapsearch stopped (tty output) > > I isolated the working-to-non-working transition to this commit: > > commit 8e5a769965313a7a1c42b5992ed24e8b0ea71ead > Author: Paul Eggert > Date: Tue Dec 6 23:41:45 2016 -0800 > > Clean out some IRIX cruft > > * etc/MACHINES: Remove obsolete discussion of IRIX. > * src/process.c (allocate_pty) [__sgi]: Remove SGI-specific code. > (create_process) [HAVE_PTYS]: Don't worry about IRIX. > * src/syntax.c (scan_sexps_forward): Remove obsolete comment. > * src/unexelf.c [__sgi]: Don't include . > (unexec) [__sgi]: Remove SGI-specific code. > > and specifically the addition of this check in src/process.c: > > - /* We tried doing setsid only if pty_flag, but it caused > - process_set_signal to fail on SGI when using a pipe. */ > - setsid (); > + if (pty_flag) > + setsid (); > > If I remove the if (pty_flag) line, then eudc-expand-inline works again. This change is on the emacs-26 branch as well, so if we want to restore previous code, we should do it on emacs-26, not only on master. Thanks. From unknown Mon Jun 23 18:31:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Thomas Fitzsimmons Subject: bug#30762: closed (Re: bug#30762: 27.0.50; Apparent regression in process.c caused by checking pty_flag before calling setsid) Message-ID: References: X-Gnu-PR-Message: they-closed 30762 X-Gnu-PR-Package: emacs Reply-To: 30762@debbugs.gnu.org Date: Sun, 11 Mar 2018 02:34:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1520735641-6922-1" This is a multi-part message in MIME format... ------------=_1520735641-6922-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #30762: 27.0.50; Apparent regression in process.c caused by checking pty_fl= ag before calling setsid which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 30762@debbugs.gnu.org. --=20 30762: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30762 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1520735641-6922-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 30762-done) by debbugs.gnu.org; 11 Mar 2018 02:33:15 +0000 Received: from localhost ([127.0.0.1]:54607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euqnS-0001mZ-R5 for submit@debbugs.gnu.org; Sat, 10 Mar 2018 21:33:14 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euqnR-0001mL-40 for 30762-done@debbugs.gnu.org; Sat, 10 Mar 2018 21:33:13 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0D4B9161611; Sat, 10 Mar 2018 18:33:07 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id t4mhFVYFU1gW; Sat, 10 Mar 2018 18:33:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 567601616A0; Sat, 10 Mar 2018 18:33:06 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id s8yqQleqDq9d; Sat, 10 Mar 2018 18:33:06 -0800 (PST) Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 32FD8161611; Sat, 10 Mar 2018 18:33:06 -0800 (PST) Subject: Re: bug#30762: 27.0.50; Apparent regression in process.c caused by checking pty_flag before calling setsid To: Eli Zaretskii , Thomas Fitzsimmons References: <83fu58uy2o.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sat, 10 Mar 2018 18:33:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <83fu58uy2o.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 30762-done Cc: 30762-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii wrote: > This change is on the emacs-26 branch as well, so if we want to > restore previous code, we should do it on emacs-26, not only on > master. I installed the fix into emacs-26 and merged it into master. Thanks, Thomas, for reporting it and for tracking down the fix. ------------=_1520735641-6922-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Mar 2018 04:19:09 +0000 Received: from localhost ([127.0.0.1]:53037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euVyO-0007sA-Mk for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:08 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1euVyM-0007rl-Rh for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euVyG-000768-LW for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57515) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1euVyG-000762-H2 for submit@debbugs.gnu.org; Fri, 09 Mar 2018 23:19:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euVyF-0002ob-6t for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:19:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euVyB-00074g-7U for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:18:59 -0500 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:36037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euVyA-00074H-Vl for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:18:55 -0500 Received: by mail-io0-x22e.google.com with SMTP id e30so5749217ioc.3 for ; Fri, 09 Mar 2018 20:18:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=cPUw/BU05+q9VYqYnC2v7XROI1AzOpiyzrasdRHWBtw=; b=W2UF/pS1PpJ5m40E7/C6OpFuUFqCFPyyc6wVLTkrVlY6st4PRYWuSIf93iX/UljELP 7m0NR8M1oMPrGZ7xV+XxVqhqpi8dC1L09EuaRekBrCMRcSFsLgdykRJIsi2JStbUHFkw AkjtCa2/enDZhTvYkuH3S9RsDjYTUupzRQ4NePIykMNPB/V3vU+KTU0GJhUI2ID1SsW0 PtwBgUVaZu7uWelFJRartmrFczAL48tvg0NuLEn6jOeed1cDXqHptnB5eAV82Bv0bJd8 10QocNSQ5nWKvT1SMLcaasTs/QBBCVNBJeMdQmGpHDAMGTLjgO6aaSuc2r2SSUdD5HJL OHNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=cPUw/BU05+q9VYqYnC2v7XROI1AzOpiyzrasdRHWBtw=; b=Pb+SPobpDtEfvaXv6wP4oEcOSj0/ju0+kxoTueVU0NEmm+w3cUfwci8ISRh/C0+T5L WYOKmTEe9phhHXwBRgRoEiZArZGfRJ1YzRV0pIqrbpamkGIuJQbL9/7U33iVICWN7u1I 0F1CpVhgjPZaQci6UUFUu3UGj07ScGuXAhsQo1GoGkgj2Fxn/smc0ewgR4uVuTS2pej3 qmyjs+cgV34huytUZUhoAagFTImq5wyroRWLfOc7UBlTMH9gkttVAn0mMC7kpOzk+QWO nkxzohkrO7td3b0VLXaoWPRwsWPg9UxD1G3/QhFqHSBssTfhPFsYYLiL6qaLIMAEJcX0 WORw== X-Gm-Message-State: AElRT7EMhE8MjYdKCqux/nUu/WIxvVHWEYxHYaaIxq4iYxDTDv83Vcb/ Q6+aTuw6GetypAenbK3paMiG3w== X-Google-Smtp-Source: AG47ELtcovUswXIoFQcdVWtSCNHNezgKcU4DPZQWsNKUrX/0MJtv7YlPzRQpPtHwoecC1CZLWkW1lA== X-Received: by 10.107.147.135 with SMTP id v129mr874785iod.172.1520655533895; Fri, 09 Mar 2018 20:18:53 -0800 (PST) Received: from hp-dv5t (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id k12sm144614iti.32.2018.03.09.20.18.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 20:18:52 -0800 (PST) From: Thomas Fitzsimmons To: bug-gnu-emacs@gnu.org Subject: 27.0.50; Apparent regression in process.c caused by checking pty_flag before calling setsid Date: Fri, 09 Mar 2018 23:18:51 -0500 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, On x86_64, CentOS 7.3.1611, I noticed that on master tip (I tested 461e6818...), eudc-expand-inline was hanging. It calls the ldapsearch command line utility (by way of ldap-search-internal) using start-process, and waits for a password prompt: (let* ((process-connection-type nil) (proc-args (append arglist ldap-ldapsearch-args filter)) (proc (apply #'start-process "ldapsearch" buf ldap-ldapsearch-prog proc-args))) (while (null (progn (goto-char (point-min)) (re-search-forward ldap-ldapsearch-password-prompt-regexp (point-max) t))) (accept-process-output proc 1)) [...]) master tip gets stuck in that while loop, whereas Emacs 25.1 is fine. If I print the contents of the buffer within the loop, it shows: Process ldapsearch stopped (tty output) I isolated the working-to-non-working transition to this commit: commit 8e5a769965313a7a1c42b5992ed24e8b0ea71ead Author: Paul Eggert Date: Tue Dec 6 23:41:45 2016 -0800 Clean out some IRIX cruft * etc/MACHINES: Remove obsolete discussion of IRIX. * src/process.c (allocate_pty) [__sgi]: Remove SGI-specific code. (create_process) [HAVE_PTYS]: Don't worry about IRIX. * src/syntax.c (scan_sexps_forward): Remove obsolete comment. * src/unexelf.c [__sgi]: Don't include . (unexec) [__sgi]: Remove SGI-specific code. and specifically the addition of this check in src/process.c: - /* We tried doing setsid only if pty_flag, but it caused - process_set_signal to fail on SGI when using a pipe. */ - setsid (); + if (pty_flag) + setsid (); If I remove the if (pty_flag) line, then eudc-expand-inline works again. It may be that ldap-search-internal should change how it's invoking ldapsearch, but I thought I would report the change in process.c behavior anyway. Thomas ------------=_1520735641-6922-1--