[Lldb-commits] [lldb] r248306 - Test runner process group isolation take 2.
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 22 11:05:11 PDT 2015
Author: tfiala
Date: Tue Sep 22 13:05:11 2015
New Revision: 248306
URL: http://llvm.org/viewvc/llvm-project?rev=248306&view=rev
Log:
Test runner process group isolation take 2.
This one does not create a session, but just creates a
new process group in the same session.
Modified:
lldb/trunk/test/dosep.py
Modified: lldb/trunk/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=248306&r1=248305&r2=248306&view=diff
==============================================================================
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Tue Sep 22 13:05:11 2015
@@ -174,6 +174,11 @@ def parse_test_results(output):
return passes, failures, unexpected_successes
+def create_new_process_group():
+ """Creates a new process group for the process."""
+ os.setpgid(os.getpid(), os.getpid())
+
+
def call_with_timeout(command, timeout, name, inferior_pid_events):
"""Run command with a timeout if possible.
-s QUIT will create a coredump if they are enabled on your system
@@ -198,7 +203,8 @@ def call_with_timeout(command, timeout,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
- close_fds=True)
+ close_fds=True,
+ preexec_fn=create_new_process_group)
else:
process = subprocess.Popen(command,
stdin=subprocess.PIPE,
More information about the lldb-commits
mailing list