Re: [Patch] Create a new session in postmaster by calling setsid()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Paul Guo <pguo(at)pivotal(dot)io>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Patch] Create a new session in postmaster by calling setsid()
Date: 2018-09-12 19:41:39
Message-ID: 14530.1536781299@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Tom> We'd likely need a switch to control that. If memory serves, there
> Tom> used to be such a switch, but we got rid of the postmaster's
> Tom> setsid call and the switch too. We probably should dig in the
> Tom> archives and review the reasoning about that.

> The tricky part about doing setsid() is this: you're not allowed to do
> it if you're already a process group leader. silent_mode worked by
> having postmaster do another fork, exit in the parent, and do setsid()
> in the child.

Hmph. Can't we just ignore that error?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2018-09-12 19:46:39 Re: [Patch] Create a new session in postmaster by calling setsid()
Previous Message Tom Lane 2018-09-12 19:37:09 Re: adding tab completions