Make drivers install signal handlers so they don't die at exit.
This commit is contained in:
parent
24f8db780c
commit
4102c1b44c
|
@ -297,7 +297,7 @@ PUBLIC int main()
|
|||
sa.sa_handler = SIG_MESS;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
if (sigaction(SIGTERM,&sa,NULL)<0) panic("RS","sigaction failed", errno);
|
||||
if (sigaction(SIGTERM,&sa,NULL)<0) panic("AT","sigaction failed", errno);
|
||||
|
||||
/* Set special disk parameters then call the generic main loop. */
|
||||
init_params();
|
||||
|
|
|
@ -97,6 +97,12 @@ PRIVATE struct driver w_dtab = {
|
|||
PUBLIC int main()
|
||||
{
|
||||
long v;
|
||||
struct sigaction sa;
|
||||
|
||||
sa.sa_handler = SIG_MESS;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
if (sigaction(SIGTERM,&sa,NULL)<0) panic("BIOS","sigaction failed", errno);
|
||||
|
||||
v= 0;
|
||||
env_parse("bios_remap_first", "d", 0, &v, 0, 1);
|
||||
|
|
|
@ -75,6 +75,13 @@ PRIVATE char dev_zero[ZERO_BUF_SIZE];
|
|||
PUBLIC int main(void)
|
||||
{
|
||||
/* Main program. Initialize the memory driver and start the main loop. */
|
||||
struct sigaction sa;
|
||||
|
||||
sa.sa_handler = SIG_MESS;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
if (sigaction(SIGTERM,&sa,NULL)<0) panic("MEM","sigaction failed", errno);
|
||||
|
||||
m_init();
|
||||
driver_task(&m_dtab);
|
||||
return(OK);
|
||||
|
|
Loading…
Reference in a new issue