- restore signal handling to default when bochs thread dies
This commit is contained in:
parent
2c9fcbb147
commit
5feb140d70
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: siminterface.cc,v 1.52 2002-09-05 07:01:29 bdenney Exp $
|
// $Id: siminterface.cc,v 1.53 2002-09-05 15:51:03 bdenney Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// See siminterface.h for description of the siminterface concept.
|
// See siminterface.h for description of the siminterface concept.
|
||||||
@ -424,6 +424,7 @@ bx_real_sim_c::periodic ()
|
|||||||
delete tick;
|
delete tick;
|
||||||
if (retcode < 0) {
|
if (retcode < 0) {
|
||||||
BX_INFO (("Bochs thread has been asked to quit."));
|
BX_INFO (("Bochs thread has been asked to quit."));
|
||||||
|
bx_atexit ();
|
||||||
quit_sim (0);
|
quit_sim (0);
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: main.cc,v 1.137 2002-09-05 07:48:38 bdenney Exp $
|
// $Id: main.cc,v 1.138 2002-09-05 15:51:03 bdenney Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||||
@ -1477,7 +1477,7 @@ bx_init_hardware()
|
|||||||
BX_DEBUG(("bx_init_hardware is setting signal handlers"));
|
BX_DEBUG(("bx_init_hardware is setting signal handlers"));
|
||||||
// if not using debugger, then we can take control of SIGINT.
|
// if not using debugger, then we can take control of SIGINT.
|
||||||
// If using debugger, it needs control of this.
|
// If using debugger, it needs control of this.
|
||||||
#if !BX_DEBUGGER /* && !BX_WITH_WX seems like an improvement */
|
#if !BX_DEBUGGER
|
||||||
signal(SIGINT, bx_signal_handler);
|
signal(SIGINT, bx_signal_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1548,9 +1548,21 @@ bx_atexit(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BX_PCI_SUPPORT
|
#if BX_PCI_SUPPORT
|
||||||
if (bx_options.Oi440FXSupport->get ()) {
|
if (bx_options.Oi440FXSupport->get ()) {
|
||||||
bx_devices.pci->print_i440fx_state();
|
bx_devices.pci->print_i440fx_state();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// restore signal handling to defaults
|
||||||
|
#if !BX_DEBUGGER
|
||||||
|
BX_INFO (("restoring default signal behavior"));
|
||||||
|
signal(SIGINT, SIG_DFL);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BX_SHOW_IPS
|
||||||
|
#ifndef __MINGW32__
|
||||||
|
signal(SIGALRM, SIG_DFL);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user