diff --git a/beets/util/__init__.py b/beets/util/__init__.py index f6cd488d6d..ee06df0bf5 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -797,10 +797,16 @@ def command_output(cmd, shell=False): """ cmd = convert_command_args(cmd) + try: # python >= 3.3 + devnull = subprocess.DEVNULL + except AttributeError: + devnull = open(os.devnull, 'r+b') + proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdin=devnull, close_fds=platform.system() != 'Windows', shell=shell ) diff --git a/docs/changelog.rst b/docs/changelog.rst index bae5c1e49c..5c0d15e0f8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -52,6 +52,11 @@ New features: * :doc:`/plugins/play`: A new ``-y`` or ``--yes`` parameter lets you skip the warning message if you enqueue more items than the warning threshold usually allows. +* Fix a bug where commands which forked subprocesses would sometimes prevent + further inputs. This bug mainly affected :doc:`/plugins/convert`. + Thanks to :user:`jansol`. + :bug:`2488` + :bug:`2524` Fixes: