diff options
author | hut <hut@lavabit.com> | 2009-12-28 19:23:54 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-28 22:15:11 +0100 |
commit | f6dc79db2689088c5f6459c745547abc412a9510 (patch) | |
tree | b1b8dbc5c8d6658ccc4279fb0dbd8622c1a04509 /ranger/applications.py | |
parent | b8dda85b34872f0350e9be90f64c2b5467c4bac4 (diff) | |
download | ranger-f6dc79db2689088c5f6459c745547abc412a9510.tar.gz |
fixed waitpid_no_intr
Diffstat (limited to 'ranger/applications.py')
-rw-r--r-- | ranger/applications.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ranger/applications.py b/ranger/applications.py index d71170c7..4c329a05 100644 --- a/ranger/applications.py +++ b/ranger/applications.py @@ -68,10 +68,14 @@ def run(*args, **kw): return process else: - if fm.ui: fm.ui.suspend() - p = Popen(args, **popen_kw) - waitpid_no_intr(p.pid) - if fm.ui: fm.ui.initialize() + if fm.ui: + fm.ui.suspend() + try: + p = Popen(args, **popen_kw) + waitpid_no_intr(p.pid) + finally: + if fm.ui: + fm.ui.initialize() return p def spawn(command, fm=None, suspend=True, wait=True): |