mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
Exit explicitly at end of parallel_emerge, so child processes exit as well.
So, we've been seeing parallel_emerge hang after printing "Done". It's hard to know for sure why this hang is happening, but my theory right now is that the Python garbage collector doesn't always know that it needs to kill the child processes when we exit normally at the bottom of the script. Adding sys.exit(0) tells Python that yes, we really want to exit. I haven't tested my hypothesis above, because the hang we've been seeing is pretty rare and is hard to reproduce. So I'm planning on testing by just putting in this workaround and seeing if it fixes the problem. TEST=Run ./parallel_emerge world BUG=chromium-os:5976 Change-Id: I7b4f2ec4ccba9b00f22f3739dfd3eff51ceed425 Review URL: http://codereview.chromium.org/3448030
This commit is contained in:
parent
45bec936f6
commit
5137a74e90
@ -1733,6 +1733,7 @@ def main():
|
|||||||
os.execvp(os.path.realpath(sys.argv[0]), args)
|
os.execvp(os.path.realpath(sys.argv[0]), args)
|
||||||
|
|
||||||
print "Done"
|
print "Done"
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user