-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: timeout limit for subprocesses
For security reasons svn and git do not use standard in/out/error to request and process authentication. Instead, they use lower level system interfaces. Python calling a subprocess can only interact with stdio, and can not intercept or detect the lower level calls. On some systems, these requests are visible to the user, on some systems they are not. When subprocess commands expect user input they will wait and manage_externals appears to hang. Change the subprocess calls to polling the running process and checking the current run time. If the run time exceeds a timeout limit, then we display an error message suggesting that the user verify authentication and then declare a fatal error. The default timeout interval of 5 minutes is probably too long and can be shortened. But since svn requires network interaction and some large checkouts can take a long time, this is a 'conservative' initial value. Breakup up the subprocess call routine so it is easier to understand. Testing: make test - python2/python3 - all tests pass. manually test with very short timeout to ensure error message is raised.
- Loading branch information
1 parent
7998f60
commit d6423c6
Showing
1 changed file
with
97 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters