X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lttng_ivc%2Futils%2Fruntime.py;h=154ae156a686e4ca42dfa9fd2596b486704c7cbf;hb=ee0fecde29edbfeba8ea405a2ae554cd8755cc2b;hp=b74beee2cad32432a6c87be33063dac2ba4698b6;hpb=bde0c5403b98eb937494cfa22a16aed165213eb0;p=deliverable%2Flttng-ivc.git diff --git a/lttng_ivc/utils/runtime.py b/lttng_ivc/utils/runtime.py index b74beee..154ae15 100644 --- a/lttng_ivc/utils/runtime.py +++ b/lttng_ivc/utils/runtime.py @@ -49,7 +49,7 @@ class Runtime(object): self._run_command_count = 0 self.special_env_variables = {"LTTNG_UST_DEBUG": "1", - #"LTTNG_APP_SOCKET_TIMEOUT": "-1", + "LTTNG_APP_SOCKET_TIMEOUT": "-1", #"LTTNG_UST_REGISTER_TIMEOUT": "-1", "LTTNG_NETWORK_SOCKET_TIMEOUT": "-1"} @@ -67,6 +67,9 @@ class Runtime(object): def add_project(self, project): self.__projects.append(project) + def remove_project(self, project): + self.__projects.remove(project) + def subprocess_signal(self, subprocess_uuid, signal): self.__subproces[subprocess_uuid].send_signal(signal) @@ -120,7 +123,7 @@ class Runtime(object): _logger.debug("Spawned sub pid: {} args: {} stdout: {} stderr{}".format(p.pid, p.args, out_path, err_path)) return tmp_id - def run(self, command_line, cwd=None, check_return=True, ld_preload=""): + def run(self, command_line, cwd=None, check_return=True, ld_preload="", classpath=""): """ Run the command and return a tuple of a (CompletedProcess, stdout_path, stderr_path). The subprocess is already executed and returned. The @@ -131,6 +134,8 @@ class Runtime(object): if ld_preload: env['LD_PRELOAD'] = ld_preload + if classpath: + env['CLASSPATH'] = classpath tmp_id = self._run_command_count @@ -257,4 +262,3 @@ class Runtime(object): # Copy the lttng_home used at runtime using hardlink to prevent useless # data duplication shutil.copytree(self.lttng_home, self.__post_runtime_lttng_home_path, copy_function=os.link) -