diff options
author | wm4 <wm4@nowhere> | 2020-08-16 02:54:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-08-16 02:54:44 +0200 |
commit | e27c523a10708b7265c33a4bae631663df4bb297 (patch) | |
tree | 34bdcd1bc48a5311ec24181dec913768180ad851 /DOCS | |
parent | d6bf3880d74459103a39426275837ec0a1d48e54 (diff) | |
download | mpv-e27c523a10708b7265c33a4bae631663df4bb297.tar.bz2 mpv-e27c523a10708b7265c33a4bae631663df4bb297.tar.xz |
command: extend subprocess command stdin, change behavior
Make it possible to feed a string to stdin of a subprocess. Out of
laziness, it can't be an arbitrary byte string. (Would require adding an
option type that takes in a Lua byte string.)
Do not set stdin of a subprocess to fd 0 (i.e. mpv's stdin) anymore,
because it makes things more consistent. Enabling stdin didn't make too
much sense in the first place, so this behavior change seems
justifiable.
win32 support missing.
Fixes: #8003
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/interface-changes.rst | 3 | ||||
-rw-r--r-- | DOCS/man/input.rst | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index e58c13216d..bad810bef0 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -74,6 +74,9 @@ Interface changes - undeprecate --video-sync=display-adrop - deprecate legacy auto profiles (profiles starting with "extension." and "protocol."). Use conditional auto profiles instead. + - the "subprocess" command does not connect spawned processes' stdin to + mpv's stdin anymore. Instead, stdin is connected to /dev/null by default. + To get the old behavior, set the "passthrough_stdin" argument to true. --- mpv 0.32.0 --- - change behavior when using legacy option syntax with options that start with two dashes (``--`` instead of a ``-``). Now, using the recommended diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 6213eb29fb..1be069306e 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -547,6 +547,17 @@ Remember to quote string arguments in input.conf (see `Flat command syntax`_). On Lua, you may use ``utils.get_env_list()`` to retrieve the current environment if you e.g. simply want to add a new variable. + ``stdin_data`` (``MPV_FORMAT_STRING``) + Feed the given string to the new process' stdin. Since this is a string, + you cannot pass arbitrary binary data. If the process terminates or + closes the pipe before all data is written, the remaining data is + silently discarded. Probably does not work on win32. + + ``passthrough_stdin`` (``MPV_FORMAT_FLAG``) + If enabled, wire the new process' stdin to mpv's stdin (default: no). + Before mpv 0.33.0, this argument did not exist, but the default was if + it was set to ``yes``. + The command returns the following result (as ``MPV_FORMAT_NODE_MAP``): ``status`` (``MPV_FORMAT_INT64``) |