about summary refs log tree commit diff stats
path: root/ranger/core
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-03-04 14:55:59 +0000
committerhut <hut@lavabit.com>2011-03-04 14:55:59 +0000
commita53b193f2ad54a6e54d0eebef29bbb9082e20745 (patch)
tree1bc0517f41f5e020086b1dc92531942efbac2b53 /ranger/core
parent6f50857a20be9989398fdcd7b88ff2ce64d9f0b7 (diff)
downloadranger-a53b193f2ad54a6e54d0eebef29bbb9082e20745.tar.gz
core.runner: set stdin to /dev/null for detached programs
Diffstat (limited to 'ranger/core')
-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