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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Should libpq set close-on-exec flag on its socket?
Date: 2004-10-21 18:10:48
Message-ID: 18172.1098382248@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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. It would also prevent people from
deliberately turning over a connection to a child; I'm not sure that
that's useful, but I'm not sure it's useless either.

Comments, opinions?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Bjorklund 2004-10-21 19:07:44 Re: Should libpq set close-on-exec flag on its socket?
Previous Message Josh Berkus 2004-10-21 17:16:25 Re: SQL-Invoked Procedures for 8.1