------- 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

Reply via email to