Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-10-05 Thread Vincent Lefevre
On 2021-10-05 22:17:40 +, Thorsten Glaser wrote: > Can you please delete the lines from exec.c and see whether this fixes > your problem and doesn’t introduce any regression? I’ll do a matching > upload soon (once over the Influenza vaccine’s reaction, i.e. once I > can use my arm again

Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-10-05 Thread Thorsten Glaser
tags 992885 = pending thanks Vincent Lefevre dixit: >> >But I wonder why the signals are restored (and what this does >> >exactly). >> >> You’ll have to trace this through pdksh, I’m afraid. > >Yes, and the mksh repository doesn't help as this was in the >initial pdksh code. I’m not even sure

Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-08-25 Thread Vincent Lefevre
On 2021-08-25 01:31:42 +, Thorsten Glaser wrote: > Vincent Lefevre dixit: > > >Perhaps because of this optimization, the wrong set of signals are > >restored? > > Hrm, this sounds plausible. I don’t have the bandwidth to investigate > this at the moment, though — sorry :/ but should you, or

Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-08-24 Thread Thorsten Glaser
Vincent Lefevre dixit: >Perhaps because of this optimization, the wrong set of signals are >restored? Hrm, this sounds plausible. I don’t have the bandwidth to investigate this at the moment, though — sorry :/ but should you, or someone else, be interested… be my guest. >But I wonder why the

Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-08-24 Thread Vincent Lefevre
On 2021-08-24 16:51:28 +, Thorsten Glaser wrote: > Vincent Lefevre dixit: > > >This is incorrect, because SIGINT should be ignored. > > > >This issue disappears when the subshell has several commands: > > > >$ mksh -c 'trap "" INT; trap; ( :; sleep 3; ); echo $?' > >trap -- '' INT > >^C0 > >

Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-08-24 Thread Vincent Lefevre
On 2021-08-24 16:51:28 +, Thorsten Glaser wrote: > Vincent Lefevre dixit: > > >This is incorrect, because SIGINT should be ignored. > > > >This issue disappears when the subshell has several commands: > > > >$ mksh -c 'trap "" INT; trap; ( :; sleep 3; ); echo $?' > >trap -- '' INT > >^C0 > >

Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-08-24 Thread Thorsten Glaser
Vincent Lefevre dixit: >This is incorrect, because SIGINT should be ignored. > >This issue disappears when the subshell has several commands: > >$ mksh -c 'trap "" INT; trap; ( :; sleep 3; ); echo $?' >trap -- '' INT >^C0 Consider this: $ mksh -c 'trap "" INT; trap; ( :; exec sleep 3; ); echo

Bug#992885: mksh: buggy ignored trap handling on subshell with only one command

2021-08-24 Thread Vincent Lefevre
Package: mksh Version: 59c-9+b2 Severity: normal Consider the following command: mksh -c 'trap "" INT; trap; ( sleep 3; ); echo $?' If I hit Ctrl-C, the sleep is interrupted immediately, with exit status 130, corresponding to a SIGINT: $ mksh -c 'trap "" INT; trap; ( sleep 3; ); echo $?'