zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Oliver Kiddle <opk@zsh.org>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: add -q option to kill for sigqueue
Date: Mon, 4 Dec 2023 18:25:38 -0800	[thread overview]
Message-ID: <CAH+w=7YkM6WQmFM7J_dn0gFF-yF5J6fdOCR0F0nhnELSg4RyQw@mail.gmail.com> (raw)
In-Reply-To: <74520-1700869567.390063@twie.42H7.9hr2>

Missed the questions in this before ...

On Fri, Nov 24, 2023 at 3:46 PM Oliver Kiddle <opk@zsh.org> 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.


      parent reply	other threads:[~2023-12-05  2:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24 23:46 Oliver Kiddle
2023-12-04 21:58 ` Oliver Kiddle
2023-12-05  2:25 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7YkM6WQmFM7J_dn0gFF-yF5J6fdOCR0F0nhnELSg4RyQw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=opk@zsh.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).