linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tkill.2: document EAGAIN error for real-time signals
@ 2017-02-06 15:57 Jann Horn
       [not found] ` <20170206155748.66643-1-jannh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jann Horn @ 2017-02-06 15:57 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

See __send_signal() in kernel/signal.c:

if (sig >= SIGRTMIN && info->si_code != SI_USER) {
  /*
   * Queue overflow, abort.  We may abort if the
   * signal was rt and sent by user using something
   * other than kill().
   */
  result = TRACE_SIGNAL_OVERFLOW_FAIL;
  ret = -EAGAIN;
  goto ret;
}

(kill() uses SI_USER, but tkill() and tgkill() use SI_TKILL.)

Signed-off-by: Jann Horn <jannh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
---
 man2/tkill.2 | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/man2/tkill.2 b/man2/tkill.2
index a61ef3182..dce5dd94c 100644
--- a/man2/tkill.2
+++ b/man2/tkill.2
@@ -103,6 +103,18 @@ For the required permissions, see
 .TP
 .B ESRCH
 No process with the specified thread ID (and thread group ID) exists.
+.TP
+.B EAGAIN
+The
+.B RLIMIT_SIGPENDING
+resource limit was reached and
+.I sig
+is a real-time signal.
+.TP
+.B EAGAIN
+Insufficient kernel memory was available and
+.I sig
+is a real-time signal.
 .SH VERSIONS
 .BR tkill ()
 is supported since Linux 2.4.19 / 2.5.4.
-- 
2.11.0.483.g087da7b7c-goog

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tkill.2: document EAGAIN error for real-time signals
       [not found] ` <20170206155748.66643-1-jannh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
@ 2017-02-08  8:31   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-02-08  8:31 UTC (permalink / raw)
  To: Jann Horn
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA

On 02/06/2017 04:57 PM, Jann Horn wrote:
> See __send_signal() in kernel/signal.c:

Thanks, Jann. Patch applied.

Cheers,

Michael

> if (sig >= SIGRTMIN && info->si_code != SI_USER) {
>   /*
>    * Queue overflow, abort.  We may abort if the
>    * signal was rt and sent by user using something
>    * other than kill().
>    */
>   result = TRACE_SIGNAL_OVERFLOW_FAIL;
>   ret = -EAGAIN;
>   goto ret;
> }
> 
> (kill() uses SI_USER, but tkill() and tgkill() use SI_TKILL.)
> 
> Signed-off-by: Jann Horn <jannh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> ---
>  man2/tkill.2 | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/man2/tkill.2 b/man2/tkill.2
> index a61ef3182..dce5dd94c 100644
> --- a/man2/tkill.2
> +++ b/man2/tkill.2
> @@ -103,6 +103,18 @@ For the required permissions, see
>  .TP
>  .B ESRCH
>  No process with the specified thread ID (and thread group ID) exists.
> +.TP
> +.B EAGAIN
> +The
> +.B RLIMIT_SIGPENDING
> +resource limit was reached and
> +.I sig
> +is a real-time signal.
> +.TP
> +.B EAGAIN
> +Insufficient kernel memory was available and
> +.I sig
> +is a real-time signal.
>  .SH VERSIONS
>  .BR tkill ()
>  is supported since Linux 2.4.19 / 2.5.4.
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-08  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-06 15:57 [PATCH] tkill.2: document EAGAIN error for real-time signals Jann Horn
     [not found] ` <20170206155748.66643-1-jannh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2017-02-08  8:31   ` Michael Kerrisk (man-pages)

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).