commit 42ca262e39357b76411bfd1f8ec3eda0269a666f
parent 625f592fb7ddd1c4553450aaf359a72222bdeb95
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date: Wed, 4 Apr 2007 16:19:47 +0000
#ifdef __linux__ for the crash handler. it compiles on other platforms,
but the functionality is bound to linux' /proc structure.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
@@ -83,6 +83,7 @@ PACKAGE " " VERSION " - mailbox synchronizer\n"
exit( code );
}
+#ifdef __linux__
static void
crashHandler( int n )
{
@@ -94,7 +95,7 @@ crashHandler( int n )
dup2( 0, 1 );
dup2( 0, 2 );
error( "*** " EXE " caught signal %d. Starting debugger ...\n", n );
- switch ((dpid = fork ())) {
+ switch ((dpid = fork())) {
case -1:
perror( "fork()" );
break;
@@ -110,6 +111,7 @@ crashHandler( int n )
}
exit( 3 );
}
+#endif
static int
matches( const char *t, const char *p )
@@ -438,11 +440,13 @@ main( int argc, char **argv )
}
}
+#ifdef __linux__
if (DFlags & DEBUG) {
signal( SIGSEGV, crashHandler );
signal( SIGBUS, crashHandler );
signal( SIGILL, crashHandler );
}
+#endif
if (merge_ops( cops, mvars->ops ))
return 1;