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

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: [Patch] Create a new session in postmaster by calling setsid()
Дата
Msg-id 87musmo60w.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: [Patch] Create a new session in postmaster by calling setsid()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [Patch] Create a new session in postmaster by calling setsid()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.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)


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [Patch] Create a new session in postmaster by calling setsid()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [Patch] Create a new session in postmaster by calling setsid()