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>
This commit is contained in:
Rami Ylimaki 2010-01-28 11:08:33 +02:00 committed by Keith Packard
parent 031f92bf9a
commit ca364ca82a
2 changed files with 14 additions and 0 deletions

View File

@ -262,6 +262,8 @@ extern _X_EXPORT void OsBlockSignals (void);
extern _X_EXPORT void OsReleaseSignals (void);
extern _X_EXPORT void OsAbort (void);
#if !defined(WIN32)
extern _X_EXPORT int System(char *);
extern _X_EXPORT pointer Popen(char *, char *);

View File

@ -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