diff --git a/dvc/remote/hdfs.py b/dvc/remote/hdfs.py index 306806b8a..ffff79719 100644 --- a/dvc/remote/hdfs.py +++ b/dvc/remote/hdfs.py @@ -29,9 +29,14 @@ class RemoteHDFS(RemoteBase): cmd = 'hadoop fs -' + cmd if user: cmd = 'HADOOP_USER_NAME={} '.format(user) + cmd + + # NOTE: close_fds doesn't work with redirected stdin/stdout/stderr. + # See https://github.com/iterative/dvc/issues/1197. + close_fds = (os.name != 'nt') + p = Popen(cmd, shell=True, - close_fds=True, + close_fds=close_fds, executable=os.getenv('SHELL'), env=fix_env(os.environ), stdin=PIPE,