Cleanup
This commit is contained in:
@@ -254,7 +254,8 @@ static void child_process()
|
|||||||
{
|
{
|
||||||
fprintf( stderr, "Unexpected child read() result: %i\n", ret );
|
fprintf( stderr, "Unexpected child read() result: %i\n", ret );
|
||||||
/* keep going */
|
/* keep going */
|
||||||
} else if( (ret == -1 && errno != EPIPE) || ret != 0 )
|
}
|
||||||
|
else if( (ret == -1 && errno != EPIPE) || ret != 0 )
|
||||||
{
|
{
|
||||||
/* We expect an EOF or EPIPE. What happened? */
|
/* We expect an EOF or EPIPE. What happened? */
|
||||||
fprintf( stderr, "Unexpected child read() result: %i (%s)\n", ret, strerror(errno) );
|
fprintf( stderr, "Unexpected child read() result: %i (%s)\n", ret, strerror(errno) );
|
||||||
@@ -296,8 +297,12 @@ static void child_process()
|
|||||||
#endif
|
#endif
|
||||||
/* Linux puts the PID that sent the signal in si_addr for SI_USER. */
|
/* Linux puts the PID that sent the signal in si_addr for SI_USER. */
|
||||||
if( crash.si.si_code == SI_USER )
|
if( crash.si.si_code == SI_USER )
|
||||||
|
{
|
||||||
reason += ssprintf( " from pid %li", (long) crash.si.si_addr );
|
reason += ssprintf( " from pid %li", (long) crash.si.si_addr );
|
||||||
else switch( crash.signal )
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch( crash.signal )
|
||||||
{
|
{
|
||||||
case SIGILL:
|
case SIGILL:
|
||||||
case SIGFPE:
|
case SIGFPE:
|
||||||
@@ -307,6 +312,7 @@ static void child_process()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case CrashData::FORCE_CRASH:
|
case CrashData::FORCE_CRASH:
|
||||||
crash.reason[ sizeof(crash.reason)-1] = 0;
|
crash.reason[ sizeof(crash.reason)-1] = 0;
|
||||||
reason = crash.reason;
|
reason = crash.reason;
|
||||||
@@ -360,8 +366,7 @@ static void child_process()
|
|||||||
"Please report a bug at:\n"
|
"Please report a bug at:\n"
|
||||||
"\n"
|
"\n"
|
||||||
" " REPORT_BUG_URL "\n"
|
" " REPORT_BUG_URL "\n"
|
||||||
"\n"
|
"\n" );
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user