Hello Imre, thanks for the report. I can't reproduce this issue myself, nor could I find anything in the source code that would suggest dash would try to quit. In fact I'm not even sure that dash knows that it's happened.
Here's the tail end of strace output (run on the same terminal as dash, to force intermingling of syscall output and terminal output), showing dash handling a write(1) without trouble, and checking for completed jobs after I hit enter several times:
Hello Imre, thanks for the report. I can't reproduce this issue myself, nor could I find anything in the source code that would suggest dash would try to quit. In fact I'm not even sure that dash knows that it's happened.
Here's the tail end of strace output (run on the same terminal as dash, to force intermingling of syscall output and terminal output), showing dash handling a write(1) without trouble, and checking for completed jobs after I hit enter several times:
geteuid() = 1000 SIGINT, NULL, {sa_handler= SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 SIGINT, {sa_handler= 0x55a82089e200, sa_mask=~[RTMIN RT_1], sa_flags= SA_RESTORER, sa_restorer= 0x7fd3be19df20} , NULL, 8) = 0 SIGQUIT, NULL, {sa_handler= SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 SIGQUIT, {sa_handler= SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags= SA_RESTORER, sa_restorer= 0x7fd3be19df20} , NULL, 8) = 0 SIGTERM, NULL, {sa_handler= SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 SIGTERM, {sa_handler= SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags= SA_RESTORER, sa_restorer= 0x7fd3be19df20} , NULL, 8) = 0 SIGTSTP, NULL, {sa_handler= SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 SIGTSTP, {sa_handler= SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags= SA_RESTORER, sa_restorer= 0x7fd3be19df20} , NULL, 8) = 0 SIGTTOU, NULL, {sa_handler= SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 SIGTTOU, {sa_handler= SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags= SA_RESTORER, sa_restorer= 0x7fd3be19df20} , NULL, 8) = 0 SIGTTIN, NULL, {sa_handler= SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 SIGTTIN, {sa_handler= SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags= SA_RESTORER, sa_restorer= 0x7fd3be19df20} , NULL, 8) = 0
getegid() = 1000
rt_sigaction(
rt_sigaction(
rt_sigaction(
rt_sigaction(
rt_sigaction(
rt_sigaction(
openat(AT_FDCWD, "/dev/tty", O_RDWR) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
ioctl(10, TIOCGPGRP, [23306]) = 0
getpgrp() = 23306
rt_sigaction(
rt_sigaction(
rt_sigaction(
rt_sigaction(
rt_sigaction(
rt_sigaction(
setpgid(0, 23308) = 0
ioctl(10, TIOCSPGRP, [23308]) = 0
wait4(-1, 0x7ffcdf89717c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
write(2, "$ ", 2$ ) = 2
read(0,
Message from sarnold@hunt on pts/13 at 17:41 ...
hello
EOF
"\n", 8192) = 1 SIG_SETMASK, [], ~[KILL STOP RTMIN RT_1], 8) = 0
wait4(-1, 0x7ffcdf89717c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
write(2, "$ ", 2$ ) = 2
read(0,
"\n", 8192) = 1
wait4(-1, 0x7ffcdf89717c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
write(2, "$ ", 2$ ) = 2
read(0, ^C0x55a820aa9a60, 8192) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
rt_sigprocmask(
write(2, "\n", 1
) = 1
wait4(-1, 0x7ffcdf89717c, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
write(2, "$ ", 2$ ) = 2
read(0, "", 8192) = 0
write(2, "\n", 1
) = 1
ioctl(10, TIOCSPGRP, [23306]) = 0
setpgid(0, 23306) = 0
close(10) = 0
exit_group(0) = ?
+++ exited with 0 +++
I tried both dash in a terminal (urxvt) and ssh -t sarnold@localhost /bin/dash -- both behaved identically.
Could you try to reproduce this while you're attached to the shell with gdb or perhaps perf trace?
Thanks