1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00
mpv/DOCS/man
wm4 5ebb498b7a scripting: make socket FD number for subprocesses dynamic
Before this, we pretty much guaranteed that --mpv-ipc-fd=3 would be
passed. The FD  was hardcoded, so scripts started by this mechanism
didn't need to actually parse the argument. Change this to using a
mostly random FD number instead.

I decided to do this because posix_spawnp() and the current replacement
cannot "guarantee" a FD layout. posix_spawn_file_actions_adddup2() just
runs dup2() calls, so it may be hard to set FD 3/4 if they are already
used by something else. For example imagine trying to map:

    {.fd = 3, .src_fd = 4},
    {.fd = 4, .src_fd = 3},

Then it'd do dup2(4, 3), dup2(3, 4) (reminder: dup2(src, dst)), and the
end result is that FD 4 really maps to the original FD 4.

While this was not a problem in the present code, it's too messy that I
don't want to pretend it can always done this way without an unholy
mess. So my assumption is that FDs 0-2 can be freely assigned because
they're never closed (probably...), while for all other FDs only
pass-through is reasonable.
2020-05-15 16:37:41 +02:00
..
af.rst audio: remove unreferenced af_lavrresample 2019-09-19 20:37:05 +02:00
ao.rst ao_oss: remove this audio output 2020-03-28 20:59:31 +01:00
changes.rst manpage: directly link interface-changes.rst in changelog section 2020-02-21 14:34:02 +01:00
console.rst console: use hidpi scale reporting 2019-12-20 13:00:39 +01:00
encode.rst manpage: explain deprecated usage of multiple items with *-add 2020-01-07 18:13:12 +01:00
input.rst command: add input-key-list property 2020-05-14 22:22:33 +02:00
ipc.rst scripting: make socket FD number for subprocesses dynamic 2020-05-15 16:37:41 +02:00
javascript.rst DOCS: js: minor update for require 2020-02-07 19:24:00 +02:00
libmpv.rst manpage: define stricter rules for C plugin return values 2017-01-14 17:41:04 +01:00
lua.rst documentation: fix some ReST syntax mistakes in lua.rst 2020-05-01 20:48:51 +02:00
mpv.rst stream_lavf: use smb:// for ffmpeg libsmbclient support 2020-03-07 13:55:20 +01:00
options.rst ipc: make --input-ipc-client terminate player on connection close 2020-05-14 21:40:43 +02:00
osc.rst osc: use default hr-seek when dragging progress bar to seek 2020-02-28 17:17:42 +01:00
stats.rst stats: support UP/DOWN to scroll at page 4 (perf) 2020-04-11 16:04:46 +03:00
vf.rst video: add alpha type metadata 2020-04-24 14:41:50 +02:00
vo.rst vo_direct3d: rip out texture video rendering path 2020-05-13 22:19:00 +02:00