Re: [PATCH] pthread_atfork.3: wfix.

Alejandro Colomar (man-pages)
2021-11-11T21:49:39Z

Hi,

On 11/9/21 23:27, enh wrote:
> Clarify that the pthread_atfork() callback list is a global, not
> per-thread.
>
> The use of "this thread" implied to some readers that pthread_atfork()
> maintained per-thread lists of callbacks. Given that the next sentence
> already explains that the callbacks are run in the context of the thread
> that calls fork(), I actually think it would be fine not to mention
> threads at all in the earlier sentence, but for now I've gone with what
> I think was intended to be written.
> ---
> man3/pthread_atfork.3 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Could you please sign your patch?

<https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1>

On 11/10/21 09:11, Florian Weimer wrote:
>> diff --git a/man3/pthread_atfork.3 b/man3/pthread_atfork.3
>> index b727cb48e..3e61e797f 100644
>> --- a/man3/pthread_atfork.3
>> +++ b/man3/pthread_atfork.3
>> @@ -39,7 +39,7 @@ The
>> .BR pthread_atfork ()
>> function registers fork handlers that are to be executed when
>> .BR fork (2)
>> -is called by this thread.
>> +is called by any thread in a process.
>> The handlers are executed in the context of the thread that calls
>> .BR fork (2).
>> .PP
>
> There's another confusing “thread” reference further below:
> “pthread_atfork() may be called multiple times by a thread, to register
> multiple handlers for each phase.” I think that should be replaced by
> “process” for clarity.

Also, if you could also fix that line reported by Florian in the same
patch, it would be great.

Thanks!

Alex

--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/