* bug#19191: 24.4; su command in *shell* buffer does not work
@ 2014-11-26 10:00 白井彰
2014-11-26 11:13 ` Andreas Schwab
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: 白井彰 @ 2014-11-26 10:00 UTC (permalink / raw)
To: 19191; +Cc: Akira Shirai
su command in *shell* buffer does not work.
su does not ask for the password and exits with "su: Sorry".
/* *shell* buffer (24.4) */
Warning: no access to tty; thus no job control in this shell...
yokohama% su
su: Sorry
yokohama%
su in *shell* buffer works well on emacs-24.3.
/* *shell* buffer (24.3) */
yokohama% su
Password:
# exit
yokohama%
In GNU Emacs 24.4.1 (i386-pc-solaris2.10, X toolkit, Xaw scroll bars)
of 2014-10-23 on yokohama
Windowing system distributor `Sun Microsystems, Inc.', version 11.0.6410
Configured using:
`configure --prefix=/Users/shiraiakira/i386/emacs-24.4 --with-x
--x-includes=/usr/dt/include:/usr/openwin/include:/Users/shiraiakira/xpm/i386/include:/Users/shiraiakira/i386/jpeg/include:/Users/shiraiakira/i386/zlib/include:/Users/shiraiakira/i386/libpng/include:/Users/shiraiakira/i386/libungif/include:/Users/shiraiakira/i386/tiff/libtiff
--x-libraries=/usr/dt/lib:/usr/openwin/lib:/Users/shiraiakira/xpm/i386/lib:/Users/shiraiakira/i386/jpeg/lib:/Users/shiraiakira/i386/zlib/lib:/Users/shiraiakira/i386/libpng/lib:/Users/shiraiakira/i386/libungif/lib:/Users/shiraiakira/i386/tiff/libtiff
--without-compress-install'
Important settings:
value of $LANG: C
locale-coding-system: nil
Major mode: Shell
Minor modes in effect:
shell-dirtrack-mode: t
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x s h e l l <return> s u <return> M-x r e p o r t
<return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils shell pcomplete comint ansi-color
ring time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dynamic-setting
x-toolkit x multi-tty emacs)
Memory information:
((conses 8 77649 4073)
(symbols 24 17821 0)
(miscs 20 43 185)
(strings 16 13260 3813)
(string-bytes 1 362635)
(vectors 8 9635)
(vector-slots 4 388469 2228)
(floats 8 61 197)
(intervals 28 976 1434)
(buffers 512 12))
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
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-12-06 11:15 ` 白井彰
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2014-11-26 11:13 UTC (permalink / raw)
To: 白井彰; +Cc: 19191
白井彰 <okshirai@gmail.com> writes:
> /* *shell* buffer (24.4) */
> Warning: no access to tty; thus no job control in this shell...
This is likely your problem. What do you get if you execute this
command in this shell:
ls -l $(tty)
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 13+ messages in thread
* 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
0 siblings, 1 reply; 13+ messages in thread
From: 白井彰 @ 2014-11-27 16:33 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Akira Shirai, 19191
echo $(tty) says:
not a tty /* 24.4 */
/dev/pts/15 /* 24.3 */
/* 24.4 */
oomiya% telnet yokohama
yokohama% setenv DISPLAY oomiya:0.0
yokohama% i386/emacs-24.4/bin/emacs &
M-x shell
/* *shell* buffer (24.4) */
yokohama% ls -l $(tty)
not: No such file or directory
a: No such file or directory
tty: No such file or directory
yokohama% echo $(tty)
not a tty
yokohama% who am i
Must be attached to terminal for 'am I' option
yokohama% w
9:26am up 115 day(s), 32 min(s), 8 users, load average: 3.02, 3.04, 3.06
User tty login@ idle JCPU PCPU what
shirai pts/17 9:13am 13 38 38 w
yokohama% ps -ef | grep emacs
shirai 3308 3285 0 09:14:19 pts/17 0:39 i386/emacs-24.4/bin/emacs
shirai 3178 1 0 09:11:12 ? 0:15 i386/emacs-24.3/src/emacs
shirai 3670 3410 0 09:27:19 ? 0:00 grep emacs
yokohama% ptree 3308
360 /usr/lib/inet/inetd start
3259 /usr/sbin/in.telnetd
3262 -csh
3285 csh
3308 i386/emacs-24.4/bin/emacs
3410 /bin/zsh -i
3672 ptree 3308
yokohama% ps -efl | sort | nawk '{if ($4 ~ /360|3259|3262|3285|3308|3410|3672/) {print $0}}'
0 S root 360 1 0 40 20 ? 2183 ? Aug 04 ? 0:49 /usr/lib/inet/inetd start
0 S root 3259 360 0 40 20 ? 936 ? 09:13:52 ? 0:00 /usr/sbin/in.telnetd
0 S shirai 3262 3259 0 40 20 ? 1140 ? 09:13:52 pts/17 0:00 -csh
0 S shirai 3285 3262 0 40 20 ? 597 ? 09:14:05 pts/17 0:00 csh
0 O shirai 3308 3285 0 40 20 ? 18970 09:14:19 pts/17 0:39 i386/emacs-24.4/bin/emacs
0 S shirai 3410 3308 0 70 20 ? 927 ? 09:17:45 ? 0:00 /bin/zsh -i
yokohama% tail -1 /var/adm/messages
Nov 27 11:59:20 yokohama su: [ID 810491 auth.crit] 'su root' failed for shirai on /dev/???
/* 24.3 */
oomiya% telnet yokohama
yokohama% setenv DISPLAY oomiya:0.0
yokohama% i386/emacs-24.3/src/emacs &
M-x shell
/* *shell* buffer (24.3) */
yokohama% ls -l $(tty)
lrwxrwxrwx 1 root root 29 Jul 26 2012 /dev/pts/15 -> ../../devices/pseudo/pts@0:15
yokohama% echo $(tty)
/dev/pts/15
yokohama% who am i
shirai /dev/pts/15 Nov 27 09:29
yokohama% w
9:29am up 115 day(s), 35 min(s), 8 users, load average: 3.02, 3.03, 3.05
User tty login@ idle JCPU PCPU what
shirai pts/9 Tue 6pm 31:30 49:47 csh
yokohama% ps -ef | grep emacs
shirai 3308 3285 0 09:14:19 pts/17 0:39 i386/emacs-24.4/bin/emacs
shirai 3178 1 0 09:11:12 ? 0:15 i386/emacs-24.3/src/emacs
shirai 3727 3198 0 09:30:12 pts/15 0:00 grep emacs
yokohama% ptree 3178
3178 i386/emacs-24.3/src/emacs
3198 /bin/zsh -i
3740 ptree 3178
yokohama% ps -efl | sort | nawk '{if ($4 ~ /3178|3198|3740/) {print $0}}'
0 O shirai 3178 1 0 40 20 ? 19270 09:11:12 ? 0:15 i386/emacs-24.3/src/emacs
0 S shirai 3198 3178 0 70 20 ? 927 ? 09:11:35 pts/15 0:00 /bin/zsh -i
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2014-11-27 16:33 ` 白井彰
@ 2014-11-27 17:14 ` Andreas Schwab
2014-11-28 9:25 ` 白井彰
0 siblings, 1 reply; 13+ messages in thread
From: Andreas Schwab @ 2014-11-27 17:14 UTC (permalink / raw)
To: 白井彰; +Cc: 19191
白井彰 <okshirai@gmail.com> writes:
> echo $(tty) says:
>
> not a tty /* 24.4 */
That's your problem. What is the value of the process-connection-type
variable?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2014-11-27 17:14 ` Andreas Schwab
@ 2014-11-28 9:25 ` 白井彰
0 siblings, 0 replies; 13+ messages in thread
From: 白井彰 @ 2014-11-28 9:25 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Akira Shirai, 19191
Its value is t
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
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-12-06 11:15 ` 白井彰
2015-03-16 16:36 ` 白井彰
` (2 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: 白井彰 @ 2014-12-06 11:15 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Akira Shirai, 19191
"su: Sorry" occurs on my Solaris 10 and Solaris 8 machine even when
emacs -Q and zsh without .zshenv, .zprofile, .zshrc, .zlogin, and
.zlogout, csh without .cshrc and .login.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
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-12-06 11:15 ` 白井彰
@ 2015-03-16 16:36 ` 白井彰
2015-03-30 17:08 ` 白井彰
2015-04-13 16:43 ` 白井彰
4 siblings, 0 replies; 13+ messages in thread
From: 白井彰 @ 2015-03-16 16:36 UTC (permalink / raw)
To: 19191; +Cc: Akira Shirai
"su: Sorry" also occurs on Emacs 24.4.91.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2014-11-26 10:00 bug#19191: 24.4; su command in *shell* buffer does not work 白井彰
` (2 preceding siblings ...)
2015-03-16 16:36 ` 白井彰
@ 2015-03-30 17:08 ` 白井彰
2015-03-30 17:22 ` Eli Zaretskii
2015-04-13 16:43 ` 白井彰
4 siblings, 1 reply; 13+ messages in thread
From: 白井彰 @ 2015-03-30 17:08 UTC (permalink / raw)
To: 19191; +Cc: Akira Shirai
"su: Sorry" also occurs on emacs-24.5-rc1.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2015-03-30 17:08 ` 白井彰
@ 2015-03-30 17:22 ` Eli Zaretskii
2015-04-01 11:54 ` 白井彰
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2015-03-30 17:22 UTC (permalink / raw)
To: 白井彰; +Cc: 19191
> From: 白井彰 <okshirai@gmail.com>
> Date: Tue, 31 Mar 2015 02:08:51 +0900
> Cc: Akira Shirai <okshirai@gmail.com>
>
> "su: Sorry" also occurs on emacs-24.5-rc1.
You need to find out why the shell's TTY is not a PTY device on your
system. As Andreas pointed out, this is the reason for the problem.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2015-03-30 17:22 ` Eli Zaretskii
@ 2015-04-01 11:54 ` 白井彰
2015-04-01 13:49 ` Wolfgang Jenkner
0 siblings, 1 reply; 13+ messages in thread
From: 白井彰 @ 2015-04-01 11:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Akira Shirai, 19191
Today I tried to find out why the shell's TTY is not a PTY device on
my system. I tried the following:
1. Remove my .cshrc and .login.
2. Logout and login, and launch a terminal emulator (dtterm)
on X Window System in my Solaris 10 system (i386-pc-solaris2.10).
3. On the terminal emulator, I type the following:
set path = (/usr/bin . /usr/ccs/bin)
gzcat emacs-24.3.tar.gz | tar xfp -
(cd emacs-24.3; ./configure --with-jpeg=no --with-gif=no; make)
(cd emacs-24.3/src; ./emacs -Q)
M-x shell
% su
Password: ********
#
=> su command in *shell* buffer works well.
C-x C-c
4. Then I type the following on the same terminal emulator:
gzcat emacs-24.4.tar.gz | tar xfp -
(cd emacs-24.4; ./configure --with-jpeg=no --with-gif=no; make)
(cd emacs-24.4/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".
I would like to know how I can proceed.
Thanks.
> 2015/03/31 2:22、Eli Zaretskii <eliz@gnu.org> のメール:
>
>> From: 白井彰 <okshirai@gmail.com>
>> Date: Tue, 31 Mar 2015 02:08:51 +0900
>> Cc: Akira Shirai <okshirai@gmail.com>
>>
>> "su: Sorry" also occurs on emacs-24.5-rc1.
>
> You need to find out why the shell's TTY is not a PTY device on your
> system. As Andreas pointed out, this is the reason for the problem.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2015-04-01 11:54 ` 白井彰
@ 2015-04-01 13:49 ` Wolfgang Jenkner
2015-04-02 16:56 ` 白井彰
0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Jenkner @ 2015-04-01 13:49 UTC (permalink / raw)
To: 白井彰; +Cc: 19191
On Wed, Apr 01 2015, 白井彰 wrote:
> (cd emacs-24.3; ./configure --with-jpeg=no --with-gif=no; make)
[...]
> (cd emacs-24.4; ./configure --with-jpeg=no --with-gif=no; make)
Perhaps the output of the following two commands shows significant
differences?
grep '#.*PTY' emacs-24.3/src/config.h
grep '#.*PTY' emacs-24.4/src/config.h
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2015-04-01 13:49 ` Wolfgang Jenkner
@ 2015-04-02 16:56 ` 白井彰
0 siblings, 0 replies; 13+ messages in thread
From: 白井彰 @ 2015-04-02 16:56 UTC (permalink / raw)
To: Wolfgang Jenkner; +Cc: Akira Shirai, 19191
[-- Attachment #1: Type: text/plain, Size: 4216 bytes --]
Today I tried what you had suggested, but I could not find significant
differences.
% grep '#.*PTY' emacs-24.3/src/config.h > /tmp/config.h_PTY_emacs-24.3
% grep '#.*PTY' emacs-24.4/src/config.h > /tmp/config.h_PTY_emacs-24.4
% cat /tmp/config.h_PTY_emacs-24.3
/* #undef BROKEN_PTY_READ_AFTER_EAGAIN */
/* #undef DONT_REOPEN_PTY */
#define FIRST_PTY_LETTER 'z'
#define HAVE_PTYS 1
/* #undef HAVE_PTY_H */
/* #undef PTY_ITERATION */
#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
/* #undef PTY_OPEN */
#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 SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, "ptem") == -1) fatal ("ioctl I_PUSH ptem"); if (ioctl (xforkin, I_PUSH, "ldterm") == -1) fatal ("ioctl I_PUSH ldterm"); if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) fatal ("ioctl I_PUSH ttcompat");
/* #undef UNIX98_PTYS */
% cat /tmp/config.h_PTY_emacs-24.4
/* #undef BROKEN_PTY_READ_AFTER_EAGAIN */
/* #undef DONT_REOPEN_PTY */
#define FIRST_PTY_LETTER 'z'
#define HAVE_PTYS 1
/* #undef HAVE_PTY_H */
/* #undef PTY_ITERATION */
#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
/* #undef PTY_OPEN */
#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); }
#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, "ptem") == -1) fatal ("ioctl I_PUSH ptem"); if (ioctl (xforkin, I_PUSH, "ldterm") == -1) fatal ("ioctl I_PUSH ldterm"); if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) fatal ("ioctl I_PUSH ttcompat");
/* #undef UNIX98_PTYS */
% diff /tmp/config.h_PTY_emacs-24.3 /tmp/config.h_PTY_emacs-24.4
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.4 | grep PTY_TTY_NAME_SPRINTF | sed 's/#define//' | indent -st > /tmp/config.h_PTY_emacs-24.4_indent-st
% diff /tmp/config.h_PTY_emacs-24.3_indent-st /tmp/config.h_PTY_emacs-24.4_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);
And I replaced the definition of PTY_TTY_NAME_SPRINTF in
emacs-24.4/src/config.h with the definition of PTY_TTY_NAME_SPRINTF in
emacs-24.3/src/config.h and typed "make" and "emacs -Q", the emacs
(almost emacs-24.4 except PTY_TTY_NAME_SPRINTF) still said "Warning:
no access to tty; thus no job control in this shell...".
> 2015/04/01 22:49、Wolfgang Jenkner <wjenkner@inode.at> のメール:
>
>
[-- Attachment #2: Type: text/html, Size: 6205 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19191: 24.4; su command in *shell* buffer does not work
2014-11-26 10:00 bug#19191: 24.4; su command in *shell* buffer does not work 白井彰
` (3 preceding siblings ...)
2015-03-30 17:08 ` 白井彰
@ 2015-04-13 16:43 ` 白井彰
4 siblings, 0 replies; 13+ messages in thread
From: 白井彰 @ 2015-04-13 16:43 UTC (permalink / raw)
To: 19191; +Cc: Akira Shirai
"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".
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-04-13 16:43 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` 白井彰
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.