Re: Should libpq set close-on-exec flag on its socket?

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: Should libpq set close-on-exec flag on its socket?
Дата
Msg-id Pine.LNX.4.44.0410212044160.2015-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Should libpq set close-on-exec flag on its socket?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Should libpq set close-on-exec flag on its socket?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 21 Oct 2004, Tom Lane wrote:

> It was suggested to me off-list that libpq should do
> "fcntl(fd, F_SETFD, FD_CLOEXEC)" on the socket connecting to the server.
> This would prevent any child program from accidentally or maliciously
> interfering with the connection.

Either way that the lib sets it, the client can alter the setting itself
by issuing a new SETFD command. I would not have expected it to be set 
but it is probably a good idea for most clients (and for most file 
descriptors).

-- 
/Dennis Björklund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Should libpq set close-on-exec flag on its socket?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Should libpq set close-on-exec flag on its socket?