about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-08-27 19:48:10 +0200
committertoonn <toonn@toonn.io>2021-08-27 19:48:10 +0200
commitfde846ec4f39ef9660e1a6a82b147aa3dbf38b0c (patch)
treee21d4bcd3f38201f31e3ee63be1b95bd1bb53997
parentfa4eca1745c4a00e5f659c9d1ea5056362188c5e (diff)
downloadranger-fde846ec4f39ef9660e1a6a82b147aa3dbf38b0c.tar.gz
popen_forked: Switch to open23
-rw-r--r--ranger/ext/popen_forked.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/ext/popen_forked.py b/ranger/ext/popen_forked.py
index 4b171286..9596abdc 100644
--- a/ranger/ext/popen_forked.py
+++ b/ranger/ext/popen_forked.py
@@ -6,6 +6,7 @@ from __future__ import (absolute_import, division, print_function)
 import os
 from subprocess import Popen
 
+from ranger.ext.open23 import open23
 
 def Popen_forked(*args, **kwargs):  # pylint: disable=invalid-name
     """Forks process and runs Popen with the given args and kwargs.
@@ -18,7 +19,7 @@ def Popen_forked(*args, **kwargs):  # pylint: disable=invalid-name
         return False
     if pid == 0:
         os.setsid()
-        with open(os.devnull, 'r') as null_r, open(os.devnull, 'w') as null_w:
+        with open23(os.devnull, 'r') as null_r, open23(os.devnull, 'w') as null_w:
             kwargs['stdin'] = null_r
             kwargs['stdout'] = kwargs['stderr'] = null_w
             Popen(*args, **kwargs)  # pylint: disable=consider-using-with