[tahoe-lafs-trac-stream] [tahoe-lafs] #1651: remove exec() from the codebase

tahoe-lafs trac at tahoe-lafs.org
Fri Jan 6 00:10:57 UTC 2012


#1651: remove exec() from the codebase
--------------------+----------------------------
 Reporter:  warner  |          Owner:  somebody
     Type:  defect  |         Status:  new
 Priority:  major   |      Milestone:  eventually
Component:  code    |        Version:  1.9.0
 Keywords:          |  Launchpad Bug:
--------------------+----------------------------
 We've had a number of "what version of the code are we running anyways?"
 problems, provoking tremendous heroics in the setuptools-based dependency-
 version-management code, that could go away entirely if we got rid of the
 use of {{{exec()}}} in the codebase (reducing the use of {{{fork()}}}
 would be good too, but not as critical).

 As I remember, fork+exec came up as a way to make {{{tahoe start}}}
 cleanly daemonize, by executing {{{twistd}}} as a child process. Since
 then, I've figured out ways to use twistd's own code for this purpose,
 starting with an import and ending with a function call (which never
 returns, because the twistd code invokes fork and then {{{os._exit()}}}
 the parent).

 To keep {{{tahoe start}}} from killing off the trial process during unit
 tests, we can do a {{{fork()}}} inside {{{tahoe start}}} before calling
 twistd. We should investigate how well this works on windows (I think we
 might skip that test on windows anyways).

 I think this would let us get rid of a lot of code, followed by removing a
 lot of setuptools-ish code (the stuff that touches
 {{{os.environ[PYTHONPATH]}}} and {{{os.environ[PATH]}}}, and the tests
 that assert things about the version of code found by the {{{tahoe
 start}}} child). And *that* might let us reduce our dependency on
 setuptools and versioning stuff in general, at least a little bit.

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1651>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list