zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: add -q option to kill for sigqueue
Date: Mon, 04 Dec 2023 22:58:40 +0100	[thread overview]
Message-ID: <86743-1701727120.927049@MNwc.Gsx3.5nJi> (raw)
In-Reply-To: <74520-1700869567.390063@twie.42H7.9hr2>

On 25 Nov, I wrote:
> The following adds support for a -q option to kill which takes a numeric
> argument. It then uses sigqueue(2) to send the signal with the provided

And with the following addition, the documentation and completion also
cover the option. Seems it isn't a system call on Linux so the man page
there is sigqueue(3).

Oliver

diff --git a/Completion/Zsh/Command/_kill b/Completion/Zsh/Command/_kill
index b9dfde3f0..084cf42c8 100644
--- a/Completion/Zsh/Command/_kill
+++ b/Completion/Zsh/Command/_kill
@@ -5,6 +5,7 @@ typeset -A opt_args
 
 _arguments -C \
   '(-s -l 1)-n[specify signal number]:signal number' \
+  '(-l)-q[send the specified integer with the signal using sigqueue]:value' \
   '(-n -l 1)-s[specify signal name]:signal:_signals -s' \
   '(-n -s)-l[list signal names or numbers of specified signals]:*:signal:_signals' \
   '(-n -s -l)1::signal:_signals -p -s' \
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 8f310f6cf..81694225d 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -1142,7 +1142,7 @@ findex(kill)
 cindex(killing jobs)
 cindex(jobs, killing)
 xitem(tt(kill) [ tt(-s) var(signal_name) | tt(-n) var(signal_number) | \
-tt(-)var(sig) ] var(job) ...)
+tt(-)var(sig) ] [ tt(-q) var(value) ] var(job) ...)
 item(tt(kill) tt(-l) [ var(sig) ... ])(
 Sends either tt(SIGTERM) or the specified signal to the given
 jobs or processes.
@@ -1169,6 +1169,9 @@ tt(kill -IO) and tt(kill -POLL) have the same effect.
 
 Many systems will allow process IDs to be negative to kill a process
 group or zero to kill the current process group.
+
+The tt(-q) option allows an integer value to be sent with the signal
+on systems that support tt(sigqueue+LPAR()RPAR()).
 )
 findex(let)
 item(tt(let) var(arg) ...)(


  reply	other threads:[~2023-12-04 21:58 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 [this message]
2023-12-05  2:25 ` Bart Schaefer

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=86743-1701727120.927049@MNwc.Gsx3.5nJi \
    --to=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).