aboutsummaryrefslogtreecommitdiffhomepage
path: root/input/ipc-unix.c
Commit message (Collapse)AuthorAge
* ipc-unix: don't blow up on readonly fd://Gravatar Niklas Haas2018-10-31
| | | | | | On my system, when trying to use mpv with a read-only fd created by python 3.7, `send` triggers ENOTSOCK, not EBADF. Extend the logic to detect non-writable fds by this `errno`.
* ipc-unix: leave room for a NUL terminatorGravatar Ben Boeckel2018-10-31
| | | | | | | The `strncpy` function will not always place a terminating `NUL` if the source is longer than the destination buffer. Instead, let `strncpy` truncate as it normally would, but leave the last byte alone (it is zero-initialized when declared).
* all: replace mpv_detach_destroy() with mpv_destroy()Gravatar wm42018-03-15
|
* ipc: avoid dereferencing NULLGravatar Martin Shirokov2017-12-15
| | | | | This can happen when ctr->client_api->shutting_down is set to true, or when there are over 1000 clients with the same name passed to mp_new_client().
* Avoid calling close(-1)Gravatar wm42017-06-29
| | | | | | | | | | While this is perfectly OK on Unix, it causes annoying valgrind warnings, and might be otherwise confusing to others. On Windows, the runtime can actually abort the process if this is called. push.c part taken from a patch by Pedro Pombeiro.
* ipc-unix: don’t truncate the message on EAGAINGravatar Sebastian Reuße2017-05-24
| | | | Fixes #4452.
* ipc: log when listening to IPC socketGravatar wm42016-09-29
| | | | Fixes #3598.
* client API: declare mpv_suspend/mpv_resume deprecatedGravatar wm42016-09-16
| | | | | | | They're useless, and I have no idea what they're actually supposed to do (wrt. pending input processing changes). Also remove their implicit uses from the IPC handlers.
* client API: remove SIGPIPE overriding codeGravatar wm42016-09-15
| | | | | | | This workaround prevented that libmpv users could accidentally crash when the SIGPIPE signal was triggered by FFmpeg's OpenSSL/GnuTLS usage. But it also modifies the global signal handler state, so remove it now that this workaround is not required anymore.
* osdep/io: introduce mp_flush_wakeup_pipe()Gravatar Rostislav Pehlivanov2016-07-30
| | | | Makes a fairly common occurence with wakeup_pipes easier to handle.
* build: silence -Wunused-resultGravatar Niklas Haas2016-06-07
| | | | | | | | For clang, it's enough to just put (void) around usages we are intentionally ignoring the result of. Since GCC does not seem to want to respect this decision, we are forced to disable the warning globally.
* ipc: add Windows implementation with named pipesGravatar James Ross-Gowan2016-03-23
This implements the JSON IPC protocol with named pipes, which are probably the closest Windows equivalent to Unix domain sockets in terms of functionality. Like with Unix sockets, this will allow mpv to listen for IPC connections and handle multiple IPC clients at once. A few cross platform libraries and frameworks (Qt, node.js) use named pipes for IPC on Windows and Unix sockets on Linux and Unix, so hopefully this will ease the creation of portable JSON IPC clients. Unlike the Unix implementation, this doesn't share code with --input-file, meaning --input-file on Windows won't understand JSON commands (yet.) Sharing code and removing the separate implementation in pipe-win32.c is definitely a possible future improvement.