[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #5130 [Obfsproxy]: Allow obfsproxy to daemonize
#5130: Allow obfsproxy to daemonize
------------------------------+---------------------------------------------
Reporter: ericpaulbishop | Owner: asn
Type: enhancement | Status: needs_review
Priority: minor | Milestone:
Component: Obfsproxy | Version:
Keywords: obfsproxy daemon | Parent:
Points: | Actualpoints:
------------------------------+---------------------------------------------
Comment(by dazo):
I've reviewed the patch as I've hit the same issue. There are a few
things which I personally don't like as much in the patch; mostly coding
style related but also some things which I consider not needed or
complicated.
For example, calling getdtablesize() this early in a program makes little
sense to me - as we're in the initialisation phase of the program. That
means it's not much extra fds opened which needs to be closed, other than
std{in,out,err}. Further that logic doesn't consider if those file
descriptors have been opened or not. And std{in,out,err} is reopened and
redirected to /dev/null again after this block. This logic will also
close the log file too.
I also don't like that the pid file tracking is depended on the daemon
mode. And further that you keep a file descriptor open the whole time
too, with a file lock I find complicated when you have the O_EXCL flag to
open() which takes care of not overwriting an existing file.
But I had something already written, so I merged that stuff into this
model. I have split the daemon code into one patch and the pid-file
handling as a second patch. The pid-file patch depends on the daemon
patch, though. But this will hopefully make it easier to review the code.
--
Ticket URL: <https://trac.torproject.org:443/projects/tor/ticket/5130#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs