Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: add -q option to kill for sigqueue



Missed the questions in this before ...

On Fri, Nov 24, 2023 at 3:46 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> We could potentially make the signal value and other details such as
> si_pid available to trap handlers. Perhaps using namespaced variables -
> e.g. .signal.pid and .signal.value?

The signal is first picked up by signals.c:zhandler(), and thereafter
only the signal number is passed down the call chain to
signals.c:dotrapargs() which arranges to call every trap function with
its signal number as $1.  So you probably need to wrangle si_pid etc.
in zhandler(), but you have to be very careful about memory management
(ideally, don't do any).

> It also ought to be possible to make SIGRTMIN through to SIGRTMAX
> available. util-linux's kill allows those to be specified as RT<n>,
> RTMIN+<n> or RTMAX-<n>. Would that need us to muck around with
> signames2.awk or is leaving them out of $signals / kill -l and using
> #ifdef RTMIN sufficient?

No opinion on whether they should be left out, but it does appear that
signames2.awk would have to be tweaked, yes.




Messages sorted by: Reverse Date, Date, Thread, Author