Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: add -q option to kill for sigqueue
- X-seq: zsh-workers 52376
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: add -q option to kill for sigqueue
- Date: Mon, 4 Dec 2023 18:25:38 -0800
- Archived-at: <https://zsh.org/workers/52376>
- In-reply-to: <74520-1700869567.390063@twie.42H7.9hr2>
- List-id: <zsh-workers.zsh.org>
- References: <74520-1700869567.390063@twie.42H7.9hr2>
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