From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#30762: 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: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520655492 24262 195.159.176.226 (10 Mar 2018 04:18:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Mar 2018 04:18:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Paul Eggert To: 30762@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 10 05:18:08 2018 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 1euVxO-0006DE-MZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Mar 2018 05:18:06 +0100 Original-Received: from localhost ([::1]:49140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euVzR-0002zV-Bn for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Mar 2018 23:20:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euVzK-0002x8-Sg for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:20:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euVzG-0007LX-T7 for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:20:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45140) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euVzG-0007LO-OY for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1euVzG-0007tV-4k for bug-gnu-emacs@gnu.org; Fri, 09 Mar 2018 23:20:02 -0500 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152065554930270 (code B ref -1); Sat, 10 Mar 2018 04:20:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Mar 2018 04:19:09 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) 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-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:144092 Archived-At: 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