>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> 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.
Tom> Hmph. Can't we just ignore that error?
If you ignore the error from setsid(), then you're still a process group
leader (as you would be after running setsid()), but you're still
attached to whatever controlling terminal (if any) you were previously
attached to.
--
Andrew (irc:RhodiumToad)