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 this bug ever didn’t exist in pdksh…

>> >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.

Turns out this probably wasn’t it. I do believe, and removing precisely
the listed lines fixes this for me, that the cause is that…

https://github.com/MirBSD/mksh/blob/12273466d30e7ac98b483ba3b78f9c27de8cf67a/exec.c#L859-L866

… is trying to duplicate, but the other way round, what…

https://github.com/MirBSD/mksh/blob/12273466d30e7ac98b483ba3b78f9c27de8cf67a/jobs.c#L591-L599

… already achieves: implement the following POSIX paragraph:

  2.11. Signals and Error Handling

   If job control is disabled (see the description of [212]set -m) when
   the shell executes an asynchronous list, the commands in the list
   shall inherit from the shell a signal action of ignored (SIG_IGN) for
   the SIGINT and SIGQUIT signals. In all other cases, commands executed
   by the shell shall inherit the same signal actions as those inherited
   by the shell from its parent unless a signal action is modified by
   the [213]trap special built-in (see [214]trap)

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 without too much pain), but if you can test it
before that I can close the bug with confidence in the upload.

bye,
//mirabilos
-- 
18:47⎜<mirabilos:#!/bin/mksh> well channels… you see, I see everything in the
same window anyway      18:48⎜<xpt:#!/bin/mksh> i know, you have some kind of
telnet with automatic pong         18:48⎜<mirabilos:#!/bin/mksh> haha, yes :D
18:49⎜<mirabilos:#!/bin/mksh> though that's more tinyirc – sirc is more comfy

Reply via email to