[tor-bugs] #2029 [Tor Relay]: Set FD_CLOEXEC on all open file descriptors so that they are closed on exec()

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sun Nov 21 22:07:36 UTC 2010


#2029: Set FD_CLOEXEC on all open file descriptors so that they are closed on
exec()
-----------------------+----------------------------------------------------
 Reporter:  sjmurdoch  |       Owner:  sjmurdoch         
     Type:  defect     |      Status:  needs_review      
 Priority:  normal     |   Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay  |     Version:                    
 Keywords:             |      Parent:  #1775             
-----------------------+----------------------------------------------------

Comment(by sjmurdoch):

 See also changeset 15f2b78 in my branch `cloexec` of
 git://git.torproject.org/sjm217/tor.git

 This stops the CLOEXEC flag being set twice (once by `socket()` and once
 by `fcntl()`) in a similar way to how file descriptors created through
 open() are already handled. I don't know whether the different treatment
 of socket() was intentional, and don't think it causes any problem, but
 felt it neater to treat socket and open in the same way unless there is a
 good reason not to.

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


More information about the tor-bugs mailing list