]> Zhao Yanbai Git Server - minix.git/commitdiff
Set a sigterm handler too
authorBen Gras <ben@minix3.org>
Sat, 22 Oct 2005 12:25:55 +0000 (12:25 +0000)
committerBen Gras <ben@minix3.org>
Sat, 22 Oct 2005 12:25:55 +0000 (12:25 +0000)
drivers/floppy/floppy.c

index 371de2f436ec675aabdbc41dad921b677e3d9cdd..dea8bbe8bc8770457025db785fdc04b3f3d5eee8 100644 (file)
@@ -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);