﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
1262	'tahoe start -m' no longer works	warner	zooko	"The recent import-and-call-twistd change ([changeset:ac3b26ecf29c08cb]) unfortunately breaks
the -m/--multiple option, which is what lets me do
{{{./bin/tahoe start -m ../MY-TESTNET/node-*}}} to spin up a 5-node
local test grid in a single command. It also breaks {{{tahoe restart -m}}},
which I use even more frequently as I iterate over a fix.

The symptom is that the first node-startup terminates the 'tahoe start'
command, so that none of the subsequent nodes are started. The call to
{{{twistd.run()}}} is terminating the program, so it never makes it to the
second pass through the loop.

I really prefer import-and-call over fork-and-exec, so I want to keep it
and find some other way to fix -m. The fix will probably be to make
the -m path use fork() just inside the loop over all target
directories, something like:

{{{
for d in args:
  if os.fork() == 0:
    os.chdir(d)
    setup_sys_argv()
    twistd.run()
    # this line is never reached
  else:
    # we're the parent, just keep looping
    pass
  os.exit(0)
}}}

One downside is that any errors which occur in twistd.run() (like
{{{ImportErrors}}}, or problems in tahoe.cfg) will be eaten by the
child, so the overall 'tahoe start' exit code won't reflect the error.
The stderr would still be emitted (although interleaved painfully).
Another potential downside is that I've heard of one OS (freebsd?
OS-X?) which allows fork()-then-exec() but forbids
fork()-then-anything-else, and this would fail badly on such a system.
"	defect	closed	major	1.8.1	code-nodeadmin	1.8.0	fixed	reviewed regression		
