You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception in child process can lead to duplicate process. #202
When the child process raises exception in the child block (before executing os.execv), due to too general exception handling it can lead to duplication of process which uses sh.
I encountered the following problem because os.chdir() has raised an exception,
due to path passed to _cwd of command did not exist at the time.
Due to general exception handling in my code the rest of my python program is executed twice by
duplicate process.
Example:
try:
sh.git("clone", origin, local_dir, _cwd="nonexistent_path")
except:
Executed twice.
Fix proposal: The whole child process block should be wrapped in
try:
#child
except:
sys.exit(1)
Activity
amoffat commentedon Dec 25, 2014
thanks @wracoon, fixed in release-1.10 branch