[Bug libgcj/29604] Race condition in ServerSocket.accept()
daney at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat May 19 17:20:00 GMT 2007
------- Comment #6 from daney at gcc dot gnu dot org 2007-05-19 18:20 -------
That didn't come out quite right :(.
The close part would be:
========================
int t = dup(fileDes)
dup2(global_always_error_fd, fileDes);
synchronized {
cleanupFD = fileDes;
}
close (t);
synchronized {
if (fileDesInUse == 0) {
close(cleanupFD);
cleanupFD = -1;
}
}
========================
Yeah, that should work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29604
More information about the Java-prs
mailing list