From: Ben Gras Date: Tue, 17 Jan 2006 17:43:35 +0000 (+0000) Subject: Make drivers install signal handlers so they don't die at exit. X-Git-Tag: v3.1.2a~437 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/mult.png?a=commitdiff_plain;h=4102c1b44c846585079d5a74cce9f9fcc5481f66;p=minix.git Make drivers install signal handlers so they don't die at exit. --- diff --git a/drivers/at_wini/at_wini.c b/drivers/at_wini/at_wini.c index 985f0baa7..126852f4d 100644 --- a/drivers/at_wini/at_wini.c +++ b/drivers/at_wini/at_wini.c @@ -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(); diff --git a/drivers/bios_wini/bios_wini.c b/drivers/bios_wini/bios_wini.c index 44c2ef29a..fa63473b5 100644 --- a/drivers/bios_wini/bios_wini.c +++ b/drivers/bios_wini/bios_wini.c @@ -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); diff --git a/drivers/memory/memory.c b/drivers/memory/memory.c index 347efc63c..40b651fb3 100644 --- a/drivers/memory/memory.c +++ b/drivers/memory/memory.c @@ -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);