[tor-bugs] #33087 [Core Tor/Tor]: closing stdio fds on exit can interfere with LeakSanitizer, etc

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 29 17:12:38 UTC 2020


#33087: closing stdio fds on exit can interfere with LeakSanitizer, etc
-------------------------------------------------+-------------------------
 Reporter:  catalyst                             |          Owner:  (none)
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-log, 043-should, consider-       |  Actual Points:
  backport-after-0433, 041-backport,             |
  042-backport                                   |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by catalyst):

 Replying to [comment:3 nickm]:
 > I don't think there's such a concept in posix as flushing an fd.  You
 can flush a FILE*, but we aren't using those.  Perhaps we could mark some
 fds (stdout, stderr) as not to be closed by this function?
 I think there's `fsync()` but that's largely to provide robustness against
 kernel or hardware failures? I thought usually the semantic was that
 synchronous writes queued in-kernel complete at process termination,
 though I'm having trouble finding anything definitive in POSIX about that.
 (POSIX does say that some asynchronous I/O operations may be canceled at
 process termination.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33087#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list