Re: Cleaning up historical portability baggage

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cleaning up historical portability baggage
Date: 2022-08-06 23:29:55
Message-ID: CA+hUKG+8KJFC5_+SZtUGbLgC1tm4zEE3aAUgTw_i+ZDNu-zzkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 7, 2022 at 10:42 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > Did I understand correctly that the places that do kill(-pid) followed
> > by kill(pid) really only need the kill(-pid)?
>
> Uh ... did you read the comment right above signal_child?
>
> * There is a race condition for recently-forked children: they might not
> * have executed setsid() yet. So we signal the child directly as well as
> * the group. We assume such a child will handle the signal before trying
> * to spawn any grandchild processes. We also assume that signaling the
> * child twice will not cause any problems.

Oof. Fixed.

Attachment Content-Type Size
v2-0001-Simplify-conditional-code-for-process-groups.patch text/x-patch 8.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-08-06 23:47:31 Re: Cleaning up historical portability baggage
Previous Message Tom Lane 2022-08-06 23:22:54 Re: Cleaning up historical portability baggage