From a53b193f2ad54a6e54d0eebef29bbb9082e20745 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 4 Mar 2011 14:55:59 +0000 Subject: core.runner: set stdin to /dev/null for detached programs --- ranger/core/runner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ranger/core/runner.py b/ranger/core/runner.py index 7b8c5874..dd0cf06a 100644 --- a/ranger/core/runner.py +++ b/ranger/core/runner.py @@ -175,9 +175,11 @@ class Runner(object): pipe_output = True context.wait = False if 's' in context.flags or 'd' in context.flags: - devnull = open(os.devnull, 'w') + devnull_writable = open(os.devnull, 'w') + devnull_readable = open(os.devnull, 'r') for key in ('stdout', 'stderr'): - popen_kws[key] = devnull + popen_kws[key] = devnull_writable + popen_kws['stdin'] = devnull_readable if 'd' in context.flags: toggle_ui = False context.wait = False -- cgit 1.4.1-2-gfad0