Re: atexit_callback can be a net negative - Mailing list pgsql-hackers

From Claudio Freire
Subject Re: atexit_callback can be a net negative
Date
Msg-id CAGTBQpafkhr3n0B90W8VROXKRvFHjLMbsxOZwOpLEGV_DU_TtA@mail.gmail.com
Whole thread Raw
In response to atexit_callback can be a net negative  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Mar 7, 2014 at 2:03 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> In the bug thread I proposed making atexit_callback check whether getpid()
> still matches MyProcPid.  If it doesn't, then presumably we inherited the
> atexit callback list, along with the value of MyProcPid, from some parent
> backend process whose elbow we should not joggle.  Can anyone see a flaw
> in that?

While my answer would be "not really" (lots of python libraries do the
same to handle forks), there's an optional path: pthread_atfork.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: atexit_callback can be a net negative
Next
From: Tom Lane
Date:
Subject: Re: Securing "make check" (CVE-2014-0067)