zsh-workers
 help / color / mirror / code / Atom feed
* Ctrl-\ while executing a pipeline made zsh quit
@ 2022-04-26  0:36 Vincent Lefevre
  2022-04-26  0:44 ` Vincent Lefevre
  2022-04-26  1:24 ` Bart Schaefer
  0 siblings, 2 replies; 11+ messages in thread
From: Vincent Lefevre @ 2022-04-26  0:36 UTC (permalink / raw)
  To: zsh-workers

With zsh 5.8.1 under Linux (zsh 5.8.1-1 Debian/unstable package),
while I was executing a pipeline, I typed Ctrl-\ to interrupt it
(Ctrl-C had no effect), which made unexpectedly zsh quit: SIGQUIT
should interrupt the commands zsh starts, not the interactive shell
itself.

The backtrace:

Core was generated by `zsh'.
Program terminated with signal SIGQUIT, Quit.
#0  0x00007f6e9cd2dbe8 in __GI___sigsuspend (set=set@entry=0x7ffc0653d8e0)
    at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
26      ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or directory.
(gdb) bt
#0  0x00007f6e9cd2dbe8 in __GI___sigsuspend (set=set@entry=0x7ffc0653d8e0)
    at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
#1  0x000056392a430207 in signal_suspend (sig=sig@entry=17,
    wait_cmd=wait_cmd@entry=0) at ../../Src/signals.c:393
#2  0x000056392a3fae2f in zwaitjob (job=<optimized out>, wait_cmd=0)
    at ../../Src/jobs.c:1603
#3  0x000056392a3fb544 in waitjobs () at ../../Src/jobs.c:1673
#4  0x000056392a3dc64b in execpline (state=state@entry=0x7ffc0653de20,
    slcode=<optimized out>, how=<optimized out>, how@entry=18, last1=0)
    at ../../Src/exec.c:1759
#5  0x000056392a3dd4a7 in execlist (state=state@entry=0x7ffc0653de20,
    dont_change_job=dont_change_job@entry=0, exiting=exiting@entry=0)
    at ../../Src/exec.c:1419
#6  0x000056392a3dd9a2 in execode (p=p@entry=0x7f6e9d066580,
    dont_change_job=dont_change_job@entry=0, exiting=exiting@entry=0,
    context=context@entry=0x56392a452285 "toplevel") at ../../Src/exec.c:1198
#7  0x000056392a3f3254 in loop (toplevel=toplevel@entry=1,
    justonce=justonce@entry=0) at ../../Src/init.c:212
#8  0x000056392a3f6a2e in zsh_main (argc=<optimized out>, argv=<optimized out>)
    at ../../Src/init.c:1779
#9  0x00007f6e9cd187fd in __libc_start_main (main=0x56392a3bad40 <main>,
    argc=1, argv=0x7ffc0653e1b8, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7ffc0653e1a8)
    at ../csu/libc-start.c:332
#10 0x000056392a3bad7a in _start ()

The pipeline was:

  svn log | m

where "svn" is aliased to "svnwrapper" (which is a sh script
reexecuted as zsh) and "m" is aliased to "mless", which is the
following shell function:

mless () {
        emulate -LR zsh
        if [[ "$argv[-1]" == - ]]
        then
                read line && less "$@[1,-2]" "$line"
        else
                less "$@"
        fi
}

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-04-29  0:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26  0:36 Ctrl-\ while executing a pipeline made zsh quit Vincent Lefevre
2022-04-26  0:44 ` Vincent Lefevre
2022-04-26  1:24 ` Bart Schaefer
2022-04-26  3:00   ` Vincent Lefevre
2022-04-26  4:05     ` Bart Schaefer
2022-04-26  9:07       ` Vincent Lefevre
2022-04-26  9:18         ` pipeline that cannot be interrupted (was: Ctrl-\ while executing a pipeline made zsh quit) Vincent Lefevre
2022-04-26 10:07           ` pipeline that cannot be interrupted Vincent Lefevre
2022-04-27 20:07             ` Bart Schaefer
2022-04-27 20:29               ` Bart Schaefer
2022-04-29  0:24                 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).