From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=E7=99=BD=E4=BA=95=E5=BD=B0?= Newsgroups: gmane.emacs.bugs Subject: bug#19191: 24.4; su command in *shell* buffer does not work Date: Tue, 14 Apr 2015 01:43:30 +0900 Message-ID: <0624CCFB-D3BA-42DA-B2C8-FC755C3269AB@gmail.com> References: <09A01C7C-6199-4883-84AC-2445080B3FBE@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1428943461 10570 80.91.229.3 (13 Apr 2015 16:44:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Apr 2015 16:44:21 +0000 (UTC) Cc: Akira Shirai To: 19191@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 13 18:44:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YhhSy-0001HH-T8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Apr 2015 18:44:09 +0200 Original-Received: from localhost ([::1]:52777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhhSy-0005RT-Di for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Apr 2015 12:44:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhhSv-0005RM-PS for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 12:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhhSs-0003kd-Gt for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 12:44:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhhSs-0003kT-DE for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 12:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YhhSr-0007Wq-WE for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 12:44:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <09A01C7C-6199-4883-84AC-2445080B3FBE@gmail.com> Resent-From: =?UTF-8?Q?=E7=99=BD=E4=BA=95=E5=BD=B0?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Apr 2015 16:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19191 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19191-submit@debbugs.gnu.org id=B19191.142894342528911 (code B ref 19191); Mon, 13 Apr 2015 16:44:01 +0000 Original-Received: (at 19191) by debbugs.gnu.org; 13 Apr 2015 16:43:45 +0000 Original-Received: from localhost ([127.0.0.1]:55144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhhSa-0007WD-NG for submit@debbugs.gnu.org; Mon, 13 Apr 2015 12:43:45 -0400 Original-Received: from mail-pa0-f54.google.com ([209.85.220.54]:35782) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhhSY-0007W0-DT for 19191@debbugs.gnu.org; Mon, 13 Apr 2015 12:43:43 -0400 Original-Received: by pabtp1 with SMTP id tp1so107517241pab.2 for <19191@debbugs.gnu.org>; Mon, 13 Apr 2015 09:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; bh=WhMAsrG9HyCEPGlNUOuzpHpzJK2+fBs81w1z4hJHiww=; b=sPRlvUPgKPOxK50YWWTLHbN/hVah3Srw9kAz9dBmD47DUuJ3+1av1/8j6KY4otg/CF dxmS55GxDn/KaFycO19gafRXlWj0mc+97H4Yr5abPQIk+hYkklsHiSp0+eeijfq/kHUT TbFKQydcaiQn9DZGyKNySSv+IzRtVFOdFpd5It/xu7/pjNAPh2K8DvH7lhttRZSS4DWG RzXCGQnyNXMJm4F3WVx2ff84JFzp87nfgEBUGN7odqSVHnGlN4rcXmKyVQxa0zCf/8qt j8VE6OQ4n3CVKIQ4RAidItNLwt5JP6w82fBhHtmb9P5qm952uH2sheMQ9vGDsOBA9yGH hQ4g== X-Received: by 10.70.88.203 with SMTP id bi11mr27283957pdb.121.1428943416333; Mon, 13 Apr 2015 09:43:36 -0700 (PDT) Original-Received: from [172.20.10.11] (pw126205207089.3.panda-world.ne.jp. [126.205.207.89]) by mx.google.com with ESMTPSA id nb10sm7791967pdb.76.2015.04.13.09.43.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Apr 2015 09:43:35 -0700 (PDT) X-Mailer: Apple Mail (2.2098) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101484 Archived-At: "su: Sorry" also occurs on Emacs 24.5. % gzcat emacs-24.3.tar.gz | tar xfp - % (cd emacs-24.3; ./configure --with-jpeg=3Dno --with-gif=3Dno; make) % gzcat emacs-24.5.tar.gz | tar xfp - % (cd emacs-24.5; ./configure --with-jpeg=3Dno --with-gif=3Dno; make) % grep '#.*PTY' emacs-24.3/src/config.h > /tmp/config.h_PTY_emacs-24.3 % grep '#.*PTY' emacs-24.5/src/config.h > /tmp/config.h_PTY_emacs-24.5 % diff /tmp/config.h_PTY_emacs-24.3 /tmp/config.h_PTY_emacs-24.5 9c9 < #define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int = grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset = (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); = grantpt_result =3D grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, = 0); if (grantpt_result =3D=3D -1 || unlockpt (fd) =3D=3D -1 || !(ptyname = =3D ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, = sizeof pty_name, "%s", ptyname); } --- > #define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int = grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset = (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); = grantpt_result =3D grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, = 0); if (grantpt_result =3D=3D -1 || unlockpt (fd) =3D=3D -1 || !(ptyname = =3D ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, = PTY_NAME_SIZE, "%s", ptyname); } % cat /tmp/config.h_PTY_emacs-24.3 | grep PTY_TTY_NAME_SPRINTF | sed = 's/#define//' | indent -st > /tmp/config.h_PTY_emacs-24.3_indent-st % cat /tmp/config.h_PTY_emacs-24.5 | grep PTY_TTY_NAME_SPRINTF | sed = 's/#define//' | indent -st > /tmp/config.h_PTY_emacs-24.5_indent-st % diff /tmp/config.h_PTY_emacs-24.3_indent-st = /tmp/config.h_PTY_emacs-24.5_indent-st 6c6 < sigaddset(&blocked, SIGCLD); --- > sigaddset(&blocked, SIGCHLD); 13c13 < } snprintf(pty_name, sizeof pty_name, "%s", ptyname); --- > } snprintf(pty_name, PTY_NAME_SIZE, "%s", ptyname); % (cd emacs-24.5/src; ./emacs -Q) M-x shell Warning: no access to tty; thus no job control in this shell... % su su: Sorry % =3D> su command in *shell* buffer does not work. su does not ask for the password and exits with "su: Sorry".