Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: gclient.py

Issue 14759006: Kill subprocesses on KeyboardInterrupt. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gclient_utils.py » ('j') | gclient_utils.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Meta checkout manager supporting both Subversion and GIT. 6 """Meta checkout manager supporting both Subversion and GIT.
7 7
8 Files 8 Files
9 .gclient : Current client configuration, written by 'config' command. 9 .gclient : Current client configuration, written by 'config' command.
10 Format is a Python script defining 'solutions', a list whose 10 Format is a Python script defining 'solutions', a list whose
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 return command(parser, argv[1:]) 1776 return command(parser, argv[1:])
1777 # Not a known command. Default to help. 1777 # Not a known command. Default to help.
1778 GenUsage(parser, 'help') 1778 GenUsage(parser, 'help')
1779 return CMDhelp(parser, argv) 1779 return CMDhelp(parser, argv)
1780 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 1780 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1781 print >> sys.stderr, 'Error: %s' % str(e) 1781 print >> sys.stderr, 'Error: %s' % str(e)
1782 return 1 1782 return 1
1783 1783
1784 1784
1785 if '__main__' == __name__: 1785 if '__main__' == __name__:
1786 fix_encoding.fix_encoding() 1786 try:
1787 sys.exit(Main(sys.argv[1:])) 1787 fix_encoding.fix_encoding()
1788 sys.exit(Main(sys.argv[1:]))
1789 except KeyboardInterrupt:
M-A Ruel 2013/05/03 16:39:01 Why not inside Main()?
1790 gclient_utils.KillAllRemainingChildren()
1791 raise
1788 1792
1789 # vim: ts=2:sw=2:tw=80:et: 1793 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | gclient_utils.py » ('j') | gclient_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698