From ca364ca82a760d8e5347a6f9f79636c9a5e4e03f Mon Sep 17 00:00:00 2001 From: Rami Ylimaki Date: Thu, 28 Jan 2010 11:08:33 +0200 Subject: os: Introduce OsAbort for proper core dumps. Signed-off-by: Rami Ylimaki Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- os/utils.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'os/utils.c') 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 -- cgit v1.2.3