1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 02:41:10 +01:00

Merge pull request #539 from blahgeek/master

prevent infinity loop while detecting shell
This commit is contained in:
Vladimir Iakovlev 2016-08-21 15:22:36 +08:00 committed by GitHub
commit faeeef7666

View File

@ -22,7 +22,7 @@ shells = {'bash': Bash,
def _get_shell():
proc = Process(os.getpid())
while proc is not None:
while proc is not None and proc.pid > 0:
try:
name = proc.name()
except TypeError: