Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
d8860462
Commit
d8860462
authored
Feb 23, 2012
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtests: Flush stdout/stderr buffers before _exit()
parent
70710252
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
runtests.py
runtests.py
+10
-2
No files found.
runtests.py
View file @
d8860462
...
...
@@ -1287,6 +1287,14 @@ def get_version():
os.chdir(old_dir)
return full_version
_orig_stdout, _orig_stderr = sys.stdout, sys.stderr
def flush_and_terminate(status):
try:
_orig_stdout.flush()
_orig_stderr.flush()
finally:
os._exit(status)
def main():
DISTDIR = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]))
...
...
@@ -1604,7 +1612,7 @@ def main():
sys
.
exit
(
return_code
)
except
PendingThreadsError
:
# normal program exit won't kill the threads, do it the hard way here
os
.
_exit
(
return_code
)
flush_and_terminate
(
return_code
)
if
__name__
==
'__main__'
:
try
:
...
...
@@ -1617,4 +1625,4 @@ if __name__ == '__main__':
check_thread_termination
(
ignore_seen
=
False
)
except
PendingThreadsError
:
# normal program exit won't kill the threads, do it the hard way here
os
.
_exit
(
1
)
flush_and_terminate
(
1
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment