Re: [PATCH 1/1] mm: introduce process_reap system call
From: Jan Engelhardt
Date: Mon Jul 12 2021 - 15:16:39 EST
On Monday 2021-07-12 20:39, Suren Baghdasaryan wrote:
>>
>> The way I understood the request is that a userspace program (or perhaps two,
>> if so desired) should issue _two_ calls, one to deliver the signal,
>> one to perform the reap portion:
>>
>> uinfo.si_code = SI_QUEUE;
>> sigqueue(pid, SIGKILL, &uinfo);
>> uinfo.si_code = SI_REAP;
>> sigqueue(pid, SIGKILL, &uinfo);
>
>This approach would still lead to the same discussion: by design,
>sigqueue/kill/pidfd_send_signal deliver the signal but do not wait for
>the signal to be processed by the recipient.
Oh, so the only reason not to do that is because there is some POSIX
specification that says the sigqueue API should be non-waiting for all
possible parameter values (with an implied "present and future
values!"), not because there's some hurdle to actually add a wait
inside within rt_sigqueueinfo if the REAP flag is set.
Gotcha.