summaryrefslogtreecommitdiff
path: root/os/utils.c
diff options
context:
space:
mode:
authorRami Ylimaki <ext-rami.ylimaki@nokia.com>2010-01-28 11:08:33 +0200
committerKeith Packard <keithp@keithp.com>2010-02-17 23:20:41 -0800
commitca364ca82a760d8e5347a6f9f79636c9a5e4e03f (patch)
treeed0017f102ecec2bbf36418680138661e49ec480 /os/utils.c
parent031f92bf9ab15226df410012a0d1c9c390efc36d (diff)
os: Introduce OsAbort for proper core dumps.
Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'os/utils.c')
-rw-r--r--os/utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/os/utils.c b/os/utils.c
index 79399fa53..21e25e066 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1310,6 +1310,18 @@ OsReleaseSignals (void)
#endif
}
+/*
+ * Pending signals may interfere with core dumping. Provide a
+ * mechanism to block signals when aborting.
+ */
+
+void
+OsAbort (void)
+{
+ OsBlockSignals();
+ abort();
+}
+
#if !defined(WIN32)
/*
* "safer" versions of system(3), popen(3) and pclose(3) which give up