diff options
author | hut <hut@lavabit.com> | 2012-08-10 10:29:04 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-08-09 22:39:10 +0200 |
commit | e58e40ba62dc63b1941dd5e411bc48dc77d6a9ad (patch) | |
tree | 1b14a0c3d201def7efe94d8b94808bbd04d145fa | |
parent | 55d8566c11dfa23fd3c12d7d4f32878ac7ecc376 (diff) | |
download | ranger-e58e40ba62dc63b1941dd5e411bc48dc77d6a9ad.tar.gz |
core.runner: use setsid to stabilize detached programs
This fixes the bug that some programs are killed even if they were run with the "d" flag, if ranger is killed by closing its terminal with the window manager instead of closed with :quit.
-rw-r--r-- | ranger/core/runner.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/core/runner.py b/ranger/core/runner.py index 17cdcca5..c02ad6b3 100644 --- a/ranger/core/runner.py +++ b/ranger/core/runner.py @@ -186,6 +186,8 @@ class Runner(object): popen_kws[key] = devnull_writable popen_kws['stdin'] = devnull_readable if 'd' in context.flags: + if not isinstance(action, str) and 'setsid' in get_executables(): + action = ['setsid'] + action toggle_ui = False context.wait = False if 'w' in context.flags: |