[x265] [PATCH 2 of 2] Do not use logging in a signal handler
Andrey Semashev
andrey.semashev at gmail.com
Fri Mar 16 16:28:41 CET 2018
# HG changeset patch
# User Andrey Semashev <andrey.semashev at gmail.com>
# Date 1515597241 -10800
# Wed Jan 10 18:14:01 2018 +0300
# Branch add_custom_logging_v3
# Node ID c53408bbc3021696f9b949858799639311eb44ee
# Parent 3ebefb64a1eb1487389db4ff7a808490b3005c39
Do not use logging in a signal handler.
Signal handlers can only call signal-safe functions, which the default logging
function is not (it uses a lot of unsafe C functions). User-specified logging
functions are also unlikely to be prepared to be called from a signal handler.
diff -r 3ebefb64a1eb -r c53408bbc302 source/output/reconplay.cpp
--- a/source/output/reconplay.cpp Wed Jan 10 18:09:07 2018 +0300
+++ b/source/output/reconplay.cpp Wed Jan 10 18:14:01 2018 +0300
@@ -42,8 +42,6 @@
#ifndef _WIN32
static void sigpipe_handler(int)
{
- if (ReconPlay::pipeValid)
- g_x265_log(NULL, "exec", false, X265_LOG_ERROR, "pipe closed\n");
ReconPlay::pipeValid = false;
}
#endif
More information about the x265-devel
mailing list