unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: 白井彰 <okshirai@gmail.com>
To: 19191@debbugs.gnu.org
Cc: Akira Shirai <okshirai@gmail.com>
Subject: bug#19191: 24.4; su command in *shell* buffer does not work
Date: Tue, 14 Apr 2015 01:43:30 +0900	[thread overview]
Message-ID: <0624CCFB-D3BA-42DA-B2C8-FC755C3269AB@gmail.com> (raw)
In-Reply-To: <09A01C7C-6199-4883-84AC-2445080B3FBE@gmail.com>

"su: Sorry" also occurs on Emacs 24.5.

% gzcat emacs-24.3.tar.gz | tar xfp -
% (cd emacs-24.3; ./configure --with-jpeg=no --with-gif=no; make)

% gzcat emacs-24.5.tar.gz | tar xfp -
% (cd emacs-24.5; ./configure --with-jpeg=no --with-gif=no; 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 = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = 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 = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = 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
%
=> su command in *shell* buffer does not work.
   su does not ask for the password and exits with "su: Sorry".






      parent reply	other threads:[~2015-04-13 16:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 10:00 bug#19191: 24.4; su command in *shell* buffer does not work 白井彰
2014-11-26 11:13 ` Andreas Schwab
2014-11-27 16:33   ` 白井彰
2014-11-27 17:14     ` Andreas Schwab
2014-11-28  9:25       ` 白井彰
2014-12-06 11:15 ` 白井彰
2015-03-16 16:36 ` 白井彰
2015-03-30 17:08 ` 白井彰
2015-03-30 17:22   ` Eli Zaretskii
2015-04-01 11:54     ` 白井彰
2015-04-01 13:49       ` Wolfgang Jenkner
2015-04-02 16:56         ` 白井彰
2015-04-13 16:43 ` 白井彰 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0624CCFB-D3BA-42DA-B2C8-FC755C3269AB@gmail.com \
    --to=okshirai@gmail.com \
    --cc=19191@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).