summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/runner.py6
1 files 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