diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-09-26 12:43:02 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-09-26 12:44:54 +0300 |
commit | 3488df1fa054ed4352104c07276569dc16c12285 (patch) | |
tree | b55642abbec825db170894ac6d3bc4dc04e07384 /tools/shared.py | |
parent | 252317cd60608018be78c8462d72286a3b91a2b5 (diff) |
Use the logging framework instead of print, to be consistent and as the logging framework prints out messages unbuffered which is more responsive on Windows.
Add debug logging facility to track waits on external processes when EM_BUILD_VERBOSE >= 3. This helps pinpointing if the build hangs on some tool dying/live/deadlocking, and where it might occur.
Implement process.pid on WindowsPopen replacement so that EM_BUILD_VERBOSE=3 works on it as well.
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py index 2b933d1f..c0c5313f 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -47,6 +47,7 @@ class WindowsPopen: try: # Call the process with fixed streams. self.process = subprocess.Popen(args, bufsize, executable, self.stdin_, self.stdout_, self.stderr_, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags) + self.pid = self.process.pid except Exception, e: logging.error('\nsubprocess.Popen(args=%s) failed! Exception %s\n' % (' '.join(args), str(e))) raise e |