* ^L showing up in Emacs M-x shell-mode, with ksh but not bash
@ 2019-11-05 0:19 Nicholas Papadonis
2019-11-05 0:30 ` Nicholas Papadonis
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Nicholas Papadonis @ 2019-11-05 0:19 UTC (permalink / raw
To: Korn Shell, help-gnu-emacs
When Emacs is invoked in an X-session and when I resize a M-x shell-mode
*shell* window by more then a single line of text, $PS2 is being output in
the shell mode window. When I type <return> then a number of "^L"s are
also output in the shell mode window.
I'm using /bin/ksh93 in Debian.
This behavior does not occur with bash.
Does anyone know why this is happening? Also, more ways to debug it?
Thank you
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 0:19 ^L showing up in Emacs M-x shell-mode, with ksh but not bash Nicholas Papadonis
@ 2019-11-05 0:30 ` Nicholas Papadonis
2019-11-05 1:00 ` Nicholas Papadonis
2019-11-05 1:56 ` Kurtis Rader
2019-11-06 2:17 ` Nicholas Papadonis
2 siblings, 1 reply; 10+ messages in thread
From: Nicholas Papadonis @ 2019-11-05 0:30 UTC (permalink / raw
To: Korn Shell, help-gnu-emacs
I added a video showing the issue at:
https://youtu.be/oPERMapfapo
On Mon, Nov 4, 2019 at 7:19 PM Nicholas Papadonis <
nick.papadonis.ml@gmail.com> wrote:
> When Emacs is invoked in an X-session and when I resize a M-x shell-mode
> *shell* window by more then a single line of text, $PS2 is being output in
> the shell mode window. When I type <return> then a number of "^L"s are
> also output in the shell mode window.
>
> I'm using /bin/ksh93 in Debian.
>
> This behavior does not occur with bash.
>
> Does anyone know why this is happening? Also, more ways to debug it?
>
> Thank you
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 0:30 ` Nicholas Papadonis
@ 2019-11-05 1:00 ` Nicholas Papadonis
0 siblings, 0 replies; 10+ messages in thread
From: Nicholas Papadonis @ 2019-11-05 1:00 UTC (permalink / raw
To: Korn Shell, help-gnu-emacs
I confirmed this behavior is still present without any special init
scripts. I created a new account to check it.
On Mon, Nov 4, 2019 at 7:30 PM Nicholas Papadonis <
nick.papadonis.ml@gmail.com> wrote:
> I added a video showing the issue at:
>
> https://youtu.be/oPERMapfapo
>
> On Mon, Nov 4, 2019 at 7:19 PM Nicholas Papadonis <
> nick.papadonis.ml@gmail.com> wrote:
>
>> When Emacs is invoked in an X-session and when I resize a M-x shell-mode
>> *shell* window by more then a single line of text, $PS2 is being output in
>> the shell mode window. When I type <return> then a number of "^L"s are
>> also output in the shell mode window.
>>
>> I'm using /bin/ksh93 in Debian.
>>
>> This behavior does not occur with bash.
>>
>> Does anyone know why this is happening? Also, more ways to debug it?
>>
>> Thank you
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 0:19 ^L showing up in Emacs M-x shell-mode, with ksh but not bash Nicholas Papadonis
2019-11-05 0:30 ` Nicholas Papadonis
@ 2019-11-05 1:56 ` Kurtis Rader
2019-11-05 16:58 ` Nicholas Papadonis
2019-11-06 2:17 ` Nicholas Papadonis
2 siblings, 1 reply; 10+ messages in thread
From: Kurtis Rader @ 2019-11-05 1:56 UTC (permalink / raw
To: Nicholas Papadonis; +Cc: help-gnu-emacs, Korn Shell
On Mon, Nov 4, 2019 at 4:19 PM Nicholas Papadonis <
nick.papadonis.ml@gmail.com> wrote:
> When Emacs is invoked in an X-session and when I resize a M-x shell-mode
> *shell* window by more then a single line of text, $PS2 is being output in
> the shell mode window. When I type <return> then a number of "^L"s are
> also output in the shell mode window.
>
> I'm using /bin/ksh93 in Debian.
>
> This behavior does not occur with bash.
>
> Does anyone know why this is happening? Also, more ways to debug it?
>
No idea what's happening, but I wouldn't leap to the conclusion that $PS2
is being displayed. Given the presence of the [ctrl-L] chars it's just as
likely that both chars are being sent to the shell. Possibly
bracketed-paste mode is enabled by the emacs shell mode. If you start the
shell, then in a different window strace it what appears in the trace when
you resize the window? Also, you might want to try the current development
version that you'll find at https://github.com/att/ast/
<https://github.com/att/ast/pull/1427>. It's easy to build if you're
willing to install Meson.
P.S., You might want to take a look at https://asciinema.org for capturing
terminal sessions for playback.
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 1:56 ` Kurtis Rader
@ 2019-11-05 16:58 ` Nicholas Papadonis
2019-11-05 17:03 ` Nicholas Papadonis
0 siblings, 1 reply; 10+ messages in thread
From: Nicholas Papadonis @ 2019-11-05 16:58 UTC (permalink / raw
To: Kurtis Rader; +Cc: help-gnu-emacs, Korn Shell
This is what the child ksh M-x shell process is doing when I resize the
window. As you can see the write of "> " near the end. Hopefully some
folks have more insight into this.
select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted
if no handler)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
{sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
sa_restorer=0x7ffb3cb91060}, 8) = 0
ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
poll([], 0, 50) = 0 (Timeout)
ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
lseek(3, 0, SEEK_END) = 2
lseek(3, 0, SEEK_CUR) = 2
lseek(3, 2, SEEK_SET) = 2
read(3, "", 65536) = 0
lseek(3, 2, SEEK_SET) = 2
read(3, "", 65536) = 0
select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
write(2, "> ", 3) = 3
select(1, [0], NULL, NULL, NULL
On Mon, Nov 4, 2019 at 8:57 PM Kurtis Rader <krader@skepticism.us> wrote:
> On Mon, Nov 4, 2019 at 4:19 PM Nicholas Papadonis <
> nick.papadonis.ml@gmail.com> wrote:
>
>> When Emacs is invoked in an X-session and when I resize a M-x shell-mode
>> *shell* window by more then a single line of text, $PS2 is being output in
>> the shell mode window. When I type <return> then a number of "^L"s are
>> also output in the shell mode window.
>>
>> I'm using /bin/ksh93 in Debian.
>>
>> This behavior does not occur with bash.
>>
>> Does anyone know why this is happening? Also, more ways to debug it?
>>
>
> No idea what's happening, but I wouldn't leap to the conclusion that $PS2
> is being displayed. Given the presence of the [ctrl-L] chars it's just as
> likely that both chars are being sent to the shell. Possibly
> bracketed-paste mode is enabled by the emacs shell mode. If you start the
> shell, then in a different window strace it what appears in the trace when
> you resize the window? Also, you might want to try the current development
> version that you'll find at https://github.com/att/ast/
> <https://github.com/att/ast/pull/1427>. It's easy to build if you're
> willing to install Meson.
>
> P.S., You might want to take a look at https://asciinema.org for
> capturing terminal sessions for playback.
>
> --
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 16:58 ` Nicholas Papadonis
@ 2019-11-05 17:03 ` Nicholas Papadonis
2019-11-05 17:13 ` Perry Smith
2019-11-05 19:18 ` Kurtis Rader
0 siblings, 2 replies; 10+ messages in thread
From: Nicholas Papadonis @ 2019-11-05 17:03 UTC (permalink / raw
To: Kurtis Rader; +Cc: help-gnu-emacs, Korn Shell
The "^L"s are coming from this trace.
Is anyone running ksh93 in Emacs shell-mode?
) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
{sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
sa_restorer=0x7ffb3cb91060}, 8) = 0
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
poll([], 0, 50) = 0 (Timeout)
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
lseek(3, 0, SEEK_END) = 2
lseek(3, 0, SEEK_CUR) = 2
lseek(3, 2, SEEK_SET) = 2
read(3, "", 65536) = 0
lseek(3, 2, SEEK_SET) = 2
read(3, "", 65536) = 0
select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
write(2, "> ", 3) = 3
select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted
if no handler)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
{sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
sa_restorer=0x7ffb3cb91060}, 8) = 0
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
poll([], 0, 50) = 0 (Timeout)
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
write(2, "> ", 3) = 3
select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted
if no handler)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
{sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
sa_restorer=0x7ffb3cb91060}, 8) = 0
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
poll([], 0, 50) = 0 (Timeout)
ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
write(2, "> ", 3) = 3
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
recvfrom(0, 0x7ffb3d814320, 65536, MSG_PEEK, NULL, NULL) = -1 ENOTSOCK
(Socket operation on non-socket)
read(0, "\n", 1) = 1
lseek(3, 0, SEEK_END) = 2
lseek(3, 0, SEEK_END) = 2
lseek(3, 0, SEEK_CUR) = 2
stat("/usr/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
directory)
stat("/usr/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
directory)
stat("/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
directory)
stat("/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
directory)
stat("/usr/local/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
directory)
stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
directory)
stat("/usr/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
directory)
stat("/usr/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
directory)
stat("/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
directory)
stat("/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
directory)
stat("/usr/local/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
directory)
stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
directory)
write(2, "\f\f: not found [No such file or d"..., 42) = 42
lseek(3, 0, SEEK_END) = 2
lseek(3, 2, SEEK_SET) = 2
lseek(3, 2, SEEK_SET) = 2
read(3, "", 65536) = 0
write(2, "[debian:~]$ ", 12) = 12
select(1, [0], NULL, NULL, NULL
On Tue, Nov 5, 2019 at 11:58 AM Nicholas Papadonis <
nick.papadonis.ml@gmail.com> wrote:
> This is what the child ksh M-x shell process is doing when I resize the
> window. As you can see the write of "> " near the end. Hopefully some
> folks have more insight into this.
>
> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
> restarted if no handler)
> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
> sa_restorer=0x7ffb3cb91060}, 8) = 0
> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> call)
> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> poll([], 0, 50) = 0 (Timeout)
> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 0, SEEK_CUR) = 2
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> write(2, "> ", 3) = 3
> select(1, [0], NULL, NULL, NULL
>
>
> On Mon, Nov 4, 2019 at 8:57 PM Kurtis Rader <krader@skepticism.us> wrote:
>
>> On Mon, Nov 4, 2019 at 4:19 PM Nicholas Papadonis <
>> nick.papadonis.ml@gmail.com> wrote:
>>
>>> When Emacs is invoked in an X-session and when I resize a M-x shell-mode
>>> *shell* window by more then a single line of text, $PS2 is being output in
>>> the shell mode window. When I type <return> then a number of "^L"s are
>>> also output in the shell mode window.
>>>
>>> I'm using /bin/ksh93 in Debian.
>>>
>>> This behavior does not occur with bash.
>>>
>>> Does anyone know why this is happening? Also, more ways to debug it?
>>>
>>
>> No idea what's happening, but I wouldn't leap to the conclusion that $PS2
>> is being displayed. Given the presence of the [ctrl-L] chars it's just as
>> likely that both chars are being sent to the shell. Possibly
>> bracketed-paste mode is enabled by the emacs shell mode. If you start the
>> shell, then in a different window strace it what appears in the trace when
>> you resize the window? Also, you might want to try the current development
>> version that you'll find at https://github.com/att/ast/
>> <https://github.com/att/ast/pull/1427>. It's easy to build if you're
>> willing to install Meson.
>>
>> P.S., You might want to take a look at https://asciinema.org for
>> capturing terminal sessions for playback.
>>
>> --
>> Kurtis Rader
>> Caretaker of the exceptional canines Junior and Hank
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 17:03 ` Nicholas Papadonis
@ 2019-11-05 17:13 ` Perry Smith
2019-11-05 17:18 ` Nicholas Papadonis
2019-11-05 19:18 ` Kurtis Rader
1 sibling, 1 reply; 10+ messages in thread
From: Perry Smith @ 2019-11-05 17:13 UTC (permalink / raw
To: Nicholas Papadonis; +Cc: help-gnu-emacs, Kurtis Rader, Korn Shell
[-- Attachment #1: Type: text/plain, Size: 8415 bytes --]
I think you said that you created a new user and this still happens?
My guess is that this is something to do with your .profile, .kshrc, etc. Don’t
forget about the profile and rc files in /etc. I don’t recall which ones ksh93 loads.
What OS is this on?
> On Nov 5, 2019, at 11:03 AM, Nicholas Papadonis <nick.papadonis.ml@gmail.com> wrote:
>
> The "^L"s are coming from this trace.
>
> Is anyone running ksh93 in Emacs shell-mode?
>
> ) = ? ERESTARTNOHAND (To be restarted if no handler)
> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
> sa_restorer=0x7ffb3cb91060}, 8) = 0
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> poll([], 0, 50) = 0 (Timeout)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 0, SEEK_CUR) = 2
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> write(2, "> ", 3) = 3
> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted
> if no handler)
> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
> sa_restorer=0x7ffb3cb91060}, 8) = 0
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
> poll([], 0, 50) = 0 (Timeout)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> write(2, "> ", 3) = 3
> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted
> if no handler)
> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
> sa_restorer=0x7ffb3cb91060}, 8) = 0
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
> poll([], 0, 50) = 0 (Timeout)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> write(2, "> ", 3) = 3
> select(1, [0], NULL, NULL, NULL) = 1 (in [0])
> recvfrom(0, 0x7ffb3d814320, 65536, MSG_PEEK, NULL, NULL) = -1 ENOTSOCK
> (Socket operation on non-socket)
> read(0, "\n", 1) = 1
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 0, SEEK_CUR) = 2
> stat("/usr/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/usr/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/usr/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/usr/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> write(2, "\f\f: not found [No such file or d"..., 42) = 42
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 2, SEEK_SET) = 2
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> write(2, "[debian:~]$ ", 12) = 12
> select(1, [0], NULL, NULL, NULL
>
>
> On Tue, Nov 5, 2019 at 11:58 AM Nicholas Papadonis <
> nick.papadonis.ml@gmail.com> wrote:
>
>> This is what the child ksh M-x shell process is doing when I resize the
>> window. As you can see the write of "> " near the end. Hopefully some
>> folks have more insight into this.
>>
>> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
>> restarted if no handler)
>> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
>> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
>> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
>> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
>> sa_restorer=0x7ffb3cb91060}, 8) = 0
>> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
>> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
>> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
>> call)
>> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
>> poll([], 0, 50) = 0 (Timeout)
>> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
>> lseek(3, 0, SEEK_END) = 2
>> lseek(3, 0, SEEK_CUR) = 2
>> lseek(3, 2, SEEK_SET) = 2
>> read(3, "", 65536) = 0
>> lseek(3, 2, SEEK_SET) = 2
>> read(3, "", 65536) = 0
>> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
>> write(2, "> ", 3) = 3
>> select(1, [0], NULL, NULL, NULL
>>
>>
>> On Mon, Nov 4, 2019 at 8:57 PM Kurtis Rader <krader@skepticism.us> wrote:
>>
>>> On Mon, Nov 4, 2019 at 4:19 PM Nicholas Papadonis <
>>> nick.papadonis.ml@gmail.com> wrote:
>>>
>>>> When Emacs is invoked in an X-session and when I resize a M-x shell-mode
>>>> *shell* window by more then a single line of text, $PS2 is being output in
>>>> the shell mode window. When I type <return> then a number of "^L"s are
>>>> also output in the shell mode window.
>>>>
>>>> I'm using /bin/ksh93 in Debian.
>>>>
>>>> This behavior does not occur with bash.
>>>>
>>>> Does anyone know why this is happening? Also, more ways to debug it?
>>>>
>>>
>>> No idea what's happening, but I wouldn't leap to the conclusion that $PS2
>>> is being displayed. Given the presence of the [ctrl-L] chars it's just as
>>> likely that both chars are being sent to the shell. Possibly
>>> bracketed-paste mode is enabled by the emacs shell mode. If you start the
>>> shell, then in a different window strace it what appears in the trace when
>>> you resize the window? Also, you might want to try the current development
>>> version that you'll find at https://github.com/att/ast/
>>> <https://github.com/att/ast/pull/1427>. It's easy to build if you're
>>> willing to install Meson.
>>>
>>> P.S., You might want to take a look at https://asciinema.org for
>>> capturing terminal sessions for playback.
>>>
>>> --
>>> Kurtis Rader
>>> Caretaker of the exceptional canines Junior and Hank
>>>
>>
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2966 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 17:13 ` Perry Smith
@ 2019-11-05 17:18 ` Nicholas Papadonis
0 siblings, 0 replies; 10+ messages in thread
From: Nicholas Papadonis @ 2019-11-05 17:18 UTC (permalink / raw
To: Perry Smith; +Cc: help-gnu-emacs, Kurtis Rader, Korn Shell
It's on Debian 9.
On Tue, Nov 5, 2019 at 12:13 PM Perry Smith <pedz@easesoftware.com> wrote:
> I think you said that you created a new user and this still happens?
>
> My guess is that this is something to do with your .profile, .kshrc, etc.
> Don’t
> forget about the profile and rc files in /etc. I don’t recall which ones
> ksh93 loads.
>
> What OS is this on?
>
> > On Nov 5, 2019, at 11:03 AM, Nicholas Papadonis <
> nick.papadonis.ml@gmail.com> wrote:
> >
> > The "^L"s are coming from this trace.
> >
> > Is anyone running ksh93 in Emacs shell-mode?
> >
> > ) = ? ERESTARTNOHAND (To be restarted if no handler)
> > --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> > rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> > sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> > {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT,
> > sa_restorer=0x7ffb3cb91060}, 8) = 0
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0})
> = 0
> > rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> > rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> call)
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0})
> = 0
> > poll([], 0, 50) = 0 (Timeout)
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0})
> = 0
> > lseek(3, 0, SEEK_END) = 2
> > lseek(3, 0, SEEK_CUR) = 2
> > lseek(3, 2, SEEK_SET) = 2
> > read(3, "", 65536) = 0
> > lseek(3, 2, SEEK_SET) = 2
> > read(3, "", 65536) = 0
> > select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> > write(2, "> ", 3) = 3
> > select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
> restarted
> > if no handler)
> > --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> > rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> > sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> > {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT,
> > sa_restorer=0x7ffb3cb91060}, 8) = 0
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0})
> = 0
> > rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> > rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> call)
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0})
> = 0
> > poll([], 0, 50) = 0 (Timeout)
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0})
> = 0
> > select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> > write(2, "> ", 3) = 3
> > select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
> restarted
> > if no handler)
> > --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> > rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> > sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> > {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT,
> > sa_restorer=0x7ffb3cb91060}, 8) = 0
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0})
> = 0
> > rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> > rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> call)
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0})
> = 0
> > poll([], 0, 50) = 0 (Timeout)
> > ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0})
> = 0
> > select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> > write(2, "> ", 3) = 3
> > select(1, [0], NULL, NULL, NULL) = 1 (in [0])
> > recvfrom(0, 0x7ffb3d814320, 65536, MSG_PEEK, NULL, NULL) = -1 ENOTSOCK
> > (Socket operation on non-socket)
> > read(0, "\n", 1) = 1
> > lseek(3, 0, SEEK_END) = 2
> > lseek(3, 0, SEEK_END) = 2
> > lseek(3, 0, SEEK_CUR) = 2
> > stat("/usr/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> > directory)
> > stat("/usr/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> > directory)
> > stat("/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> > directory)
> > stat("/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> > directory)
> > stat("/usr/local/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file
> or
> > directory)
> > stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file
> or
> > directory)
> > stat("/usr/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> > directory)
> > stat("/usr/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> > directory)
> > stat("/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> > directory)
> > stat("/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> > directory)
> > stat("/usr/local/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file
> or
> > directory)
> > stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file
> or
> > directory)
> > write(2, "\f\f: not found [No such file or d"..., 42) = 42
> > lseek(3, 0, SEEK_END) = 2
> > lseek(3, 2, SEEK_SET) = 2
> > lseek(3, 2, SEEK_SET) = 2
> > read(3, "", 65536) = 0
> > write(2, "[debian:~]$ ", 12) = 12
> > select(1, [0], NULL, NULL, NULL
> >
> >
> > On Tue, Nov 5, 2019 at 11:58 AM Nicholas Papadonis <
> > nick.papadonis.ml@gmail.com> wrote:
> >
> >> This is what the child ksh M-x shell process is doing when I resize the
> >> window. As you can see the write of "> " near the end. Hopefully some
> >> folks have more insight into this.
> >>
> >> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
> >> restarted if no handler)
> >> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> >> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> >> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> >> {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT,
> >> sa_restorer=0x7ffb3cb91060}, 8) = 0
> >> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0})
> = 0
> >> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> >> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> >> call)
> >> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0})
> = 0
> >> poll([], 0, 50) = 0 (Timeout)
> >> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0})
> = 0
> >> lseek(3, 0, SEEK_END) = 2
> >> lseek(3, 0, SEEK_CUR) = 2
> >> lseek(3, 2, SEEK_SET) = 2
> >> read(3, "", 65536) = 0
> >> lseek(3, 2, SEEK_SET) = 2
> >> read(3, "", 65536) = 0
> >> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> >> write(2, "> ", 3) = 3
> >> select(1, [0], NULL, NULL, NULL
> >>
> >>
> >> On Mon, Nov 4, 2019 at 8:57 PM Kurtis Rader <krader@skepticism.us>
> wrote:
> >>
> >>> On Mon, Nov 4, 2019 at 4:19 PM Nicholas Papadonis <
> >>> nick.papadonis.ml@gmail.com> wrote:
> >>>
> >>>> When Emacs is invoked in an X-session and when I resize a M-x
> shell-mode
> >>>> *shell* window by more then a single line of text, $PS2 is being
> output in
> >>>> the shell mode window. When I type <return> then a number of "^L"s
> are
> >>>> also output in the shell mode window.
> >>>>
> >>>> I'm using /bin/ksh93 in Debian.
> >>>>
> >>>> This behavior does not occur with bash.
> >>>>
> >>>> Does anyone know why this is happening? Also, more ways to debug it?
> >>>>
> >>>
> >>> No idea what's happening, but I wouldn't leap to the conclusion that
> $PS2
> >>> is being displayed. Given the presence of the [ctrl-L] chars it's just
> as
> >>> likely that both chars are being sent to the shell. Possibly
> >>> bracketed-paste mode is enabled by the emacs shell mode. If you start
> the
> >>> shell, then in a different window strace it what appears in the trace
> when
> >>> you resize the window? Also, you might want to try the current
> development
> >>> version that you'll find at https://github.com/att/ast/
> >>> <https://github.com/att/ast/pull/1427>. It's easy to build if you're
> >>> willing to install Meson.
> >>>
> >>> P.S., You might want to take a look at https://asciinema.org for
> >>> capturing terminal sessions for playback.
> >>>
> >>> --
> >>> Kurtis Rader
> >>> Caretaker of the exceptional canines Junior and Hank
> >>>
> >>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 17:03 ` Nicholas Papadonis
2019-11-05 17:13 ` Perry Smith
@ 2019-11-05 19:18 ` Kurtis Rader
1 sibling, 0 replies; 10+ messages in thread
From: Kurtis Rader @ 2019-11-05 19:18 UTC (permalink / raw
To: Nicholas Papadonis; +Cc: help-gnu-emacs, Korn Shell
I can't reproduce this. And I don't see anything in the strace output that
would account for the \f chars. Which strongly suggests something like a
use-after-free bug or using an uninitialized var. We've fixed a huge number
of such bugs in the past two years thanks to updating the project so that
we can employ tools like libc's debug malloc and ASAN. Honestly, I don't
think there is much point in further debugging until you are able to
reproduce this problem using the current source; or at least the 2020.0.0
stable release we recently announced. If you can't build from source you
should be able to use a binary built for a comparable Linux distro such as
Ubuntu or Fedora. Happy to give you a current binary from one of my Linux
VMs I use for testing.
On Tue, Nov 5, 2019 at 9:04 AM Nicholas Papadonis <
nick.papadonis.ml@gmail.com> wrote:
> The "^L"s are coming from this trace.
>
> Is anyone running ksh93 in Emacs shell-mode?
>
> ) = ? ERESTARTNOHAND (To be restarted if no handler)
> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
> sa_restorer=0x7ffb3cb91060}, 8) = 0
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> call)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> poll([], 0, 50) = 0 (Timeout)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 0, SEEK_CUR) = 2
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> write(2, "> ", 3) = 3
> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
> restarted if no handler)
> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
> sa_restorer=0x7ffb3cb91060}, 8) = 0
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> call)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
> poll([], 0, 50) = 0 (Timeout)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=103, ws_xpixel=0, ws_ypixel=0}) = 0
> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> write(2, "> ", 3) = 3
> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
> restarted if no handler)
> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
> sa_restorer=0x7ffb3cb91060}, 8) = 0
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
> call)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
> poll([], 0, 50) = 0 (Timeout)
> ioctl(2, TIOCGWINSZ, {ws_row=10, ws_col=104, ws_xpixel=0, ws_ypixel=0}) = 0
> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
> write(2, "> ", 3) = 3
> select(1, [0], NULL, NULL, NULL) = 1 (in [0])
> recvfrom(0, 0x7ffb3d814320, 65536, MSG_PEEK, NULL, NULL) = -1 ENOTSOCK
> (Socket operation on non-socket)
> read(0, "\n", 1) = 1
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 0, SEEK_CUR) = 2
> stat("/usr/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/usr/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/bin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88250) = -1 ENOENT (No such file
> or directory)
> stat("/usr/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/usr/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/bin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file or
> directory)
> stat("/usr/local/sbin/\f\f\f", 0x7ffc17e88170) = -1 ENOENT (No such file
> or directory)
> write(2, "\f\f: not found [No such file or d"..., 42) = 42
> lseek(3, 0, SEEK_END) = 2
> lseek(3, 2, SEEK_SET) = 2
> lseek(3, 2, SEEK_SET) = 2
> read(3, "", 65536) = 0
> write(2, "[debian:~]$ ", 12) = 12
> select(1, [0], NULL, NULL, NULL
>
>
> On Tue, Nov 5, 2019 at 11:58 AM Nicholas Papadonis <
> nick.papadonis.ml@gmail.com> wrote:
>
>> This is what the child ksh M-x shell process is doing when I resize the
>> window. As you can see the write of "> " near the end. Hopefully some
>> folks have more insight into this.
>>
>> select(1, [0], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be
>> restarted if no handler)
>> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
>> rt_sigaction(SIGWINCH, {sa_handler=0x55e35c5a23b0, sa_mask=[],
>> sa_flags=SA_RESTORER|SA_INTERRUPT, sa_restorer=0x7ffb3cb91060},
>> {sa_handler=0x55e35c5a23b0, sa_mask=[], sa_flags=SA_RESTORER|SA_INTERRUPT,
>> sa_restorer=0x7ffb3cb91060}, 8) = 0
>> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
>> rt_sigprocmask(SIG_UNBLOCK, [WINCH], NULL, 8) = 0
>> rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system
>> call)
>> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
>> poll([], 0, 50) = 0 (Timeout)
>> ioctl(2, TIOCGWINSZ, {ws_row=9, ws_col=102, ws_xpixel=0, ws_ypixel=0}) = 0
>> lseek(3, 0, SEEK_END) = 2
>> lseek(3, 0, SEEK_CUR) = 2
>> lseek(3, 2, SEEK_SET) = 2
>> read(3, "", 65536) = 0
>> lseek(3, 2, SEEK_SET) = 2
>> read(3, "", 65536) = 0
>> select(1, [0], NULL, NULL, {tv_sec=0, tv_usec=0}) = 0 (Timeout)
>> write(2, "> ", 3) = 3
>> select(1, [0], NULL, NULL, NULL
>>
>>
>> On Mon, Nov 4, 2019 at 8:57 PM Kurtis Rader <krader@skepticism.us> wrote:
>>
>>> On Mon, Nov 4, 2019 at 4:19 PM Nicholas Papadonis <
>>> nick.papadonis.ml@gmail.com> wrote:
>>>
>>>> When Emacs is invoked in an X-session and when I resize a M-x
>>>> shell-mode *shell* window by more then a single line of text, $PS2 is being
>>>> output in the shell mode window. When I type <return> then a number of
>>>> "^L"s are also output in the shell mode window.
>>>>
>>>> I'm using /bin/ksh93 in Debian.
>>>>
>>>> This behavior does not occur with bash.
>>>>
>>>> Does anyone know why this is happening? Also, more ways to debug it?
>>>>
>>>
>>> No idea what's happening, but I wouldn't leap to the conclusion that
>>> $PS2 is being displayed. Given the presence of the [ctrl-L] chars it's just
>>> as likely that both chars are being sent to the shell. Possibly
>>> bracketed-paste mode is enabled by the emacs shell mode. If you start the
>>> shell, then in a different window strace it what appears in the trace when
>>> you resize the window? Also, you might want to try the current development
>>> version that you'll find at https://github.com/att/ast/
>>> <https://github.com/att/ast/pull/1427>. It's easy to build if you're
>>> willing to install Meson.
>>>
>>> P.S., You might want to take a look at https://asciinema.org for
>>> capturing terminal sessions for playback.
>>>
>>> --
>>> Kurtis Rader
>>> Caretaker of the exceptional canines Junior and Hank
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Korn Shell" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to korn-shell+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/korn-shell/CAKD0t1%2BRdniqNExU0oXShbybZtAq7HSjoEFJdcL25Due4QEB6g%40mail.gmail.com
> <https://groups.google.com/d/msgid/korn-shell/CAKD0t1%2BRdniqNExU0oXShbybZtAq7HSjoEFJdcL25Due4QEB6g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ^L showing up in Emacs M-x shell-mode, with ksh but not bash
2019-11-05 0:19 ^L showing up in Emacs M-x shell-mode, with ksh but not bash Nicholas Papadonis
2019-11-05 0:30 ` Nicholas Papadonis
2019-11-05 1:56 ` Kurtis Rader
@ 2019-11-06 2:17 ` Nicholas Papadonis
2 siblings, 0 replies; 10+ messages in thread
From: Nicholas Papadonis @ 2019-11-06 2:17 UTC (permalink / raw
To: Korn Shell, help-gnu-emacs
I also note using "set -o vi" only a single "> " is printed when resizing
the window. I wonder why "PS2" which is for a long line that must be
broken up is printed.
In the meantime, I will install Debian 10 and try there.
On Mon, Nov 4, 2019 at 7:19 PM Nicholas Papadonis <
nick.papadonis.ml@gmail.com> wrote:
> When Emacs is invoked in an X-session and when I resize a M-x shell-mode
> *shell* window by more then a single line of text, $PS2 is being output in
> the shell mode window. When I type <return> then a number of "^L"s are
> also output in the shell mode window.
>
> I'm using /bin/ksh93 in Debian.
>
> This behavior does not occur with bash.
>
> Does anyone know why this is happening? Also, more ways to debug it?
>
> Thank you
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-11-06 2:17 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-05 0:19 ^L showing up in Emacs M-x shell-mode, with ksh but not bash Nicholas Papadonis
2019-11-05 0:30 ` Nicholas Papadonis
2019-11-05 1:00 ` Nicholas Papadonis
2019-11-05 1:56 ` Kurtis Rader
2019-11-05 16:58 ` Nicholas Papadonis
2019-11-05 17:03 ` Nicholas Papadonis
2019-11-05 17:13 ` Perry Smith
2019-11-05 17:18 ` Nicholas Papadonis
2019-11-05 19:18 ` Kurtis Rader
2019-11-06 2:17 ` Nicholas Papadonis
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.