From: Ben Gras Date: Sat, 22 Oct 2005 12:25:55 +0000 (+0000) Subject: Set a sigterm handler too X-Git-Url: http://zhaoyanbai.com/repos//%22https:/www.google.com/jsapi/%22?a=commitdiff_plain;h=7d5630e61912ad337ea3f64bc315b457abd15cdb;p=minix.git Set a sigterm handler too --- diff --git a/drivers/floppy/floppy.c b/drivers/floppy/floppy.c index 371de2f43..dea8bbe8b 100644 --- a/drivers/floppy/floppy.c +++ b/drivers/floppy/floppy.c @@ -292,6 +292,13 @@ PUBLIC void main() struct floppy *fp; int s; + struct sigaction sa; + + sa.sa_handler = SIG_MESS; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + if (sigaction(SIGTERM,&sa,NULL)<0) panic("floppy","sigaction failed", errno); + signal(SIGTERM, SIG_IGN); f_next_timeout = TMR_NEVER; tmr_inittimer(&f_tmr_timeout);