Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1707)

Unified Diff: src/core/model/fatal-impl.cc

Issue 342120043: New patch for core module changes (Closed)
Patch Set: Updated core patch Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/model/fatal-impl.cc
===================================================================
--- a/src/core/model/fatal-impl.cc
+++ b/src/core/model/fatal-impl.cc
@@ -160,9 +160,14 @@
* streams even if one of the stream pointers is bad.
* The SIGSEGV override should only be active for the
* duration of this function. */
+#ifndef _WIN32
struct sigaction hdl;
hdl.sa_handler=sigHandler;
sigaction (SIGSEGV, &hdl, 0);
+#else
+ typedef void(*SignalHandlerPointer) (int);
+ SignalHandlerPointer previousHandler = signal(SIGSEGV, sigHandler);
+#endif
std::list<std::ostream*> *l = *pl;
@@ -174,9 +179,14 @@
s->flush ();
}
+#ifndef _WIN32
/* Restore default SIGSEGV handler (Not that it matters anyway) */
hdl.sa_handler=SIG_DFL;
sigaction (SIGSEGV, &hdl, 0);
+#else
+ /* Restore default SIGSEGV handler (Not that it matters anyway) */
+ signal(SIGSEGV, previousHandler);
+#endif
/* Flush all opened FILE* */
std::fflush (0);

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b