public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN
@ 2023-10-30 12:58 Max Kellermann
  2023-10-30 13:47 ` Alejandro Colomar
  0 siblings, 1 reply; 6+ messages in thread
From: Max Kellermann @ 2023-10-30 12:58 UTC (permalink / raw)
  To: alx; +Cc: linux-man, Max Kellermann

The old wording was ambiguous, but it is important to know that
signals that were set to SIG_IGN will not be restored to SIG_DFL.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
 man2/clone.2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man2/clone.2 b/man2/clone.2
index 4a75b557b..deb4bdb5b 100644
--- a/man2/clone.2
+++ b/man2/clone.2
@@ -455,7 +455,8 @@ flag is also employed.)
 By default, signal dispositions in the child thread are the same as
 in the parent.
 If this flag is specified,
-then all signals that are handled in the parent
+then all signals that are handled in the parent (and not set to
+.BR SIG_IGN )
 are reset to their default dispositions
 .RB ( SIG_DFL )
 in the child.
-- 
2.39.2


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

* Re: [PATCH] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN
  2023-10-30 12:58 [PATCH] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN Max Kellermann
@ 2023-10-30 13:47 ` Alejandro Colomar
  2023-10-30 13:52   ` Max Kellermann
  0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Colomar @ 2023-10-30 13:47 UTC (permalink / raw)
  To: Max Kellermann; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]

Hello Max,

On Mon, Oct 30, 2023 at 01:58:35PM +0100, Max Kellermann wrote:
> The old wording was ambiguous, but it is important to know that
> signals that were set to SIG_IGN will not be restored to SIG_DFL.
> 
> Signed-off-by: Max Kellermann <max.kellermann@ionos.com>

Would you mind sending an example program that proves this?

Thanks,
Alex

> ---
>  man2/clone.2 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/man2/clone.2 b/man2/clone.2
> index 4a75b557b..deb4bdb5b 100644
> --- a/man2/clone.2
> +++ b/man2/clone.2
> @@ -455,7 +455,8 @@ flag is also employed.)
>  By default, signal dispositions in the child thread are the same as
>  in the parent.
>  If this flag is specified,
> -then all signals that are handled in the parent
> +then all signals that are handled in the parent (and not set to
> +.BR SIG_IGN )
>  are reset to their default dispositions
>  .RB ( SIG_DFL )
>  in the child.
> -- 
> 2.39.2
> 

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN
  2023-10-30 13:47 ` Alejandro Colomar
@ 2023-10-30 13:52   ` Max Kellermann
  2023-10-30 16:21     ` Alejandro Colomar
  0 siblings, 1 reply; 6+ messages in thread
From: Max Kellermann @ 2023-10-30 13:52 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

On Mon, Oct 30, 2023 at 2:47 PM Alejandro Colomar <alx@kernel.org> wrote:
> Would you mind sending an example program that proves this?

If you need proof, all you need to do is look at the commit adding the
feature (or the code comments it added which are still there):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b612e5df4587c934bd056bf05f4a1deca4de4f75

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

* Re: [PATCH] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN
  2023-10-30 13:52   ` Max Kellermann
@ 2023-10-30 16:21     ` Alejandro Colomar
  2023-10-30 16:27       ` [PATCH v2] " Max Kellermann
  0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Colomar @ 2023-10-30 16:21 UTC (permalink / raw)
  To: Max Kellermann; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]

Hi Max,

On Mon, Oct 30, 2023 at 02:52:48PM +0100, Max Kellermann wrote:
> On Mon, Oct 30, 2023 at 2:47 PM Alejandro Colomar <alx@kernel.org> wrote:
> > Would you mind sending an example program that proves this?
> 
> If you need proof, all you need to do is look at the commit adding the
> feature (or the code comments it added which are still there):
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b612e5df4587c934bd056bf05f4a1deca4de4f75

Thanks, that also works.  That commit message is very explicit in this
regard.  When reviewing a patch, it helps if that kind of information is
included in the commit message (and it also helps review old patches in
the future, not just when applying it).  It's covered in ./CONTRIBUTING:

       -  Describe how you obtained the information in your patch.  For
          example, was it:

          -  by reading (or writing) the relevant kernel or (g)libc
             source code?  Please provide a pointer to the following
             code.

          -  from a commit message in the kernel or (g)libc source code
             repository?  Please provide a commit ID.

          -  by writing a test program?  Send it with the patch, but
             please make sure it's as simple as possible, and provide
             instructions on how to use it and/or a demo run.

          -  from a standards document?  Please name the standard, and
             quote the relevant text.

          -  from other documentation?  Please provide a pointer to that
             documentation.

          -  from a mailing list or online forum?  Please provide a URL
             if possible.

Cheers,
Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH v2] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN
  2023-10-30 16:21     ` Alejandro Colomar
@ 2023-10-30 16:27       ` Max Kellermann
  2023-10-31 12:45         ` Alejandro Colomar
  0 siblings, 1 reply; 6+ messages in thread
From: Max Kellermann @ 2023-10-30 16:27 UTC (permalink / raw)
  To: alx; +Cc: linux-man, Max Kellermann

The old wording was ambiguous, but it is important to know that
signals that were set to SIG_IGN will not be restored to SIG_DFL.

This behavior was documented in the kernel commit that introduced the
feature:

 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b612e5df4587c934bd056bf05f4a1deca4de4f75

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
v1 -> v2: added link to kernel commit
---
 man2/clone.2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man2/clone.2 b/man2/clone.2
index 4a75b557b..deb4bdb5b 100644
--- a/man2/clone.2
+++ b/man2/clone.2
@@ -455,7 +455,8 @@ flag is also employed.)
 By default, signal dispositions in the child thread are the same as
 in the parent.
 If this flag is specified,
-then all signals that are handled in the parent
+then all signals that are handled in the parent (and not set to
+.BR SIG_IGN )
 are reset to their default dispositions
 .RB ( SIG_DFL )
 in the child.
-- 
2.39.2


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

* Re: [PATCH v2] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN
  2023-10-30 16:27       ` [PATCH v2] " Max Kellermann
@ 2023-10-31 12:45         ` Alejandro Colomar
  0 siblings, 0 replies; 6+ messages in thread
From: Alejandro Colomar @ 2023-10-31 12:45 UTC (permalink / raw)
  To: Max Kellermann; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

Hi Max,

On Mon, Oct 30, 2023 at 05:27:33PM +0100, Max Kellermann wrote:
> The old wording was ambiguous, but it is important to know that
> signals that were set to SIG_IGN will not be restored to SIG_DFL.
> 
> This behavior was documented in the kernel commit that introduced the
> feature:
> 
>  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b612e5df4587c934bd056bf05f4a1deca4de4f75
> 
> Signed-off-by: Max Kellermann <max.kellermann@ionos.com>

Patch applied slightly amended).  Thanks!
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=05e46589ceb7e3ca5925c874adb489e0dde40596>

Cheers,
Alex

> ---
> v1 -> v2: added link to kernel commit
> ---
>  man2/clone.2 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/man2/clone.2 b/man2/clone.2
> index 4a75b557b..deb4bdb5b 100644
> --- a/man2/clone.2
> +++ b/man2/clone.2
> @@ -455,7 +455,8 @@ flag is also employed.)
>  By default, signal dispositions in the child thread are the same as
>  in the parent.
>  If this flag is specified,
> -then all signals that are handled in the parent
> +then all signals that are handled in the parent (and not set to
> +.BR SIG_IGN )
>  are reset to their default dispositions
>  .RB ( SIG_DFL )
>  in the child.
> -- 
> 2.39.2
> 

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-10-31 12:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-30 12:58 [PATCH] man2/clone.2: clarify that CLONE_CLEAR_SIGHAND does not affect SIG_IGN Max Kellermann
2023-10-30 13:47 ` Alejandro Colomar
2023-10-30 13:52   ` Max Kellermann
2023-10-30 16:21     ` Alejandro Colomar
2023-10-30 16:27       ` [PATCH v2] " Max Kellermann
2023-10-31 12:45         ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox