This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] PR 31228, Fix close-on-exec race.


Tom Tromey wrote:
"David" == David Daney <ddaney@avtrex.com> writes:

David> I hope someone can think of a better way to fix the race. If David> only there were some way to set the default value of the David> FD_CLOEXEC flag...

We could wrap each "open + set FD_CLOEXEC" in a mutex, and do the same
for the fork.

That does not work in a blocking socket accept situation. It would prevent Runtime.exec() from starting the subprocess until a connection arrived.


David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]