mirror of https://github.com/mpv-player/mpv
client API: comment about signal handlers
Sharing a process sure is hard in POSIX. The rationale is that you'd have to handle EINTR on every single blocking syscall. stream_file.c does not seem to handle it on read() calls. It appears that on most modern systems, this can happen only if you call sigaction(), and incompetently forget to add SA_RESTART. signal() usually adds it.
This commit is contained in:
parent
0a796e9840
commit
d5959df2be
|
@ -147,6 +147,8 @@ extern "C" {
|
|||
* - mpv may start sub processes, so overriding SIGCHLD, or waiting on all PIDs
|
||||
* (such as calling wait()) by the parent process or any other library within
|
||||
* the process must be avoided. libmpv itself only waits for its own PIDs.
|
||||
* - If anything in the process registers signal handlers, they must set the
|
||||
* SA_RESTART flag. Otherwise you WILL get random failures on signals.
|
||||
*
|
||||
* Encoding of filenames
|
||||
* ---------------------
|
||||
|
|
Loading…
Reference in New Issue