Commit 4f648847 authored by Łukasz Nowak's avatar Łukasz Nowak

Implement execution with environment change.

parent e0efffa4
......@@ -741,6 +741,7 @@ SSLRandomSeed connect builtin
def installMysqlServer(self, ip, port, database='erp5', user='user',
test_database='test_erp5', test_user='test_user', template_filename=None):
backup_directory = self.createBackupDirectory('mysql')
if template_filename is None:
template_filename = self.getTemplateFilename('')
error_log = os.path.join(self.log_directory, 'mysqld.log')
......@@ -13,6 +13,16 @@ def execute(args):
child_pg = None
def executee(args):
"""Portable execution with process replacement and environment manipulation"""
exec_list = list(args[0])
environment = args[1]
env = os.environ.copy()
for k,v in environment.iteritems():
env[k] = v
os.execve(exec_list[0], exec_list + sys.argv[1:], env)
def sig_handler(signal, frame):
print 'Received signal %r, killing children and exiting' % signal
if child_pg is not None:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment