summaryrefslogtreecommitdiffstats
path: root/waftools/fragments/pthreads.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-24 13:18:00 +0100
committerwm4 <wm4@nowhere>2014-12-24 13:18:00 +0100
commit98a80884da100eaee283447a0380c761b15266c7 (patch)
tree2ffa46163f2d83e0e85283c31d30a18a297ca9db /waftools/fragments/pthreads.c
parent5640c195a9ebd206cf2a1556e59eb7cae35b8d03 (diff)
downloadmpv-98a80884da100eaee283447a0380c761b15266c7.tar.bz2
mpv-98a80884da100eaee283447a0380c761b15266c7.tar.xz
ipc: report some user errors better
Using the IPC with a program, it's not often obvious that a newline must be sent to terminate a command. Print a warning if the connection is closed while there is still uninterpreted data in the buffer. Print the OS reported error if reading/writing the socket fails. Print an erro if JSON parsing fails. I considered silencing write errors if the write end is closed (EPIPE), because a client might send a bunch of commands, and then close the socket without wanting to read the reply. But then, mpv disconnects without reading further commands that might still be buffered, so it's probably a good idea to always print the error.
Diffstat (limited to 'waftools/fragments/pthreads.c')
0 files changed, 0 insertions, 0 deletions