mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 22:21:40 +03:00
worker: flush messages written by child processes before exit
I found some child outputs were lost while testing the previous patch. Since os._exit() does nothing special, we need to do that explicitly.
This commit is contained in:
parent
fa0a3203ec
commit
ee998576d8
@ -148,12 +148,16 @@ def _posixworker(ui, func, staticargs, args):
|
||||
# may do some clean-ups which could cause surprises like deadlock.
|
||||
# see sshpeer.cleanup for example.
|
||||
try:
|
||||
scmutil.callcatch(ui, workerfunc)
|
||||
try:
|
||||
scmutil.callcatch(ui, workerfunc)
|
||||
finally:
|
||||
ui.flush()
|
||||
except KeyboardInterrupt:
|
||||
os._exit(255)
|
||||
except: # never return, therefore no re-raises
|
||||
try:
|
||||
ui.traceback()
|
||||
ui.flush()
|
||||
finally:
|
||||
os._exit(255)
|
||||
else:
|
||||
|
@ -84,7 +84,8 @@ update with worker processes
|
||||
|
||||
$ hg update null
|
||||
0 files updated, 0 files merged, 100 files removed, 0 files unresolved
|
||||
$ hg update
|
||||
$ hg update -v | grep 100
|
||||
getting 100
|
||||
100 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
|
||||
$ cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user