'-d',
self.config.build_dir + '/arch/sandbox/dts/test.dtb'
]
- return Spawn(cmd)
+ return Spawn(cmd, cwd=self.config.source_dir)
def kill(self, sig):
"""Send a specific Unix signal to the sandbox process.
sent to the process, and responses waited for.
"""
- def __init__(self, args):
+ def __init__(self, args, cwd=None):
"""Spawn (fork/exec) the sub-process.
Args:
- args: array of processs arguments. argv[0] is the command to execute.
+ args: array of processs arguments. argv[0] is the command to
+ execute.
+ cwd: the directory to run the process in, or None for no change.
Returns:
Nothing.
# run under "go" (www.go.cd). Perhaps this happens under any
# background (non-interactive) system?
signal.signal(signal.SIGHUP, signal.SIG_DFL)
+ if cwd:
+ os.chdir(cwd)
os.execvp(args[0], args)
except:
print 'CHILD EXECEPTION:'