Title: [215762] trunk/Source/WTF
Revision
215762
Author
keith_mil...@apple.com
Date
2017-04-25 14:23:15 -0700 (Tue, 25 Apr 2017)

Log Message

Our signal handler shouldn't print when sigaction succeeds
https://bugs.webkit.org/show_bug.cgi?id=171286

Reviewed by Michael Saboff.

It turns out !result is not the same as !!result.

* wtf/threads/Signals.cpp:
(WTF::jscSignalHandler):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (215761 => 215762)


--- trunk/Source/WTF/ChangeLog	2017-04-25 21:21:41 UTC (rev 215761)
+++ trunk/Source/WTF/ChangeLog	2017-04-25 21:23:15 UTC (rev 215762)
@@ -1,3 +1,15 @@
+2017-04-25  Keith Miller  <keith_mil...@apple.com>
+
+        Our signal handler shouldn't print when sigaction succeeds
+        https://bugs.webkit.org/show_bug.cgi?id=171286
+
+        Reviewed by Michael Saboff.
+
+        It turns out !result is not the same as !!result.
+
+        * wtf/threads/Signals.cpp:
+        (WTF::jscSignalHandler):
+
 2017-04-25  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Add performance test for FontCache::systemFallbackForCharacters()

Modified: trunk/Source/WTF/wtf/threads/Signals.cpp (215761 => 215762)


--- trunk/Source/WTF/wtf/threads/Signals.cpp	2017-04-25 21:21:41 UTC (rev 215761)
+++ trunk/Source/WTF/wtf/threads/Signals.cpp	2017-04-25 21:23:15 UTC (rev 215762)
@@ -28,6 +28,7 @@
 
 #if USE(PTHREADS)
 
+#include <cstdio>
 #include <mutex>
 #include <signal.h>
 #include <wtf/Atomics.h>
@@ -50,7 +51,7 @@
         sigfillset(&defaultAction.sa_mask);
         defaultAction.sa_flags = 0;
         auto result = sigaction(sig, &defaultAction, nullptr);
-        dataLogLnIf(!result, "Unable to restore the default handler while proccessing signal ", sig, " the process is probably deadlocked.");
+        dataLogLnIf(result == -1, "Unable to restore the default handler while proccessing signal ", sig, " the process is probably deadlocked. (errno: ", strerror(errno), ")");
     };
 
     // This shouldn't happen but we might as well be careful.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to