mirror of https://github.com/mpv-player/mpv
terminal: printf() is not signal-safe
We shouldn't call it from a signal handler.
This commit is contained in:
parent
bf0cb27489
commit
9c6417ea88
|
@ -275,8 +275,7 @@ static void enable_kx(bool enable)
|
|||
// shouldn't be relied on here either.
|
||||
if (isatty(STDOUT_FILENO)) {
|
||||
char *cmd = enable ? "\033=" : "\033>";
|
||||
printf("%s", cmd);
|
||||
fflush(stdout);
|
||||
write(STDOUT_FILENO, cmd, strlen(cmd));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue