From aeb6630868392f4685cdb3f6abbed5ed704ad4d8 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Thu, 11 May 2006 14:52:40 +0000 Subject: [PATCH] Ignore SIGHUP in floppy driver. --- drivers/floppy/floppy.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/floppy/floppy.c b/drivers/floppy/floppy.c index f82b9f025..8de7d12c3 100644 --- a/drivers/floppy/floppy.c +++ b/drivers/floppy/floppy.c @@ -312,6 +312,9 @@ PUBLIC void main() if ((s=sys_irqenable(&irq_hook_id)) != OK) panic("FLOPPY", "Couldn't enable IRQs", s); + /* Ignore signals */ + signal(SIGHUP, SIG_IGN); + driver_task(&f_dtab); } @@ -450,6 +453,12 @@ unsigned nr_req; /* length of request vector */ /* Check disk address. */ if ((position & SECTOR_MASK) != 0) return(EINVAL); +#if 0 /* XXX hack to create a disk driver that crashes */ + { static int count= 0; if (++count > 10) { + printf("floppy: time to die\n"); *(int *)-1= 42; + }} +#endif + errors = 0; while (nr_req > 0) { /* How many bytes to transfer? */ -- 2.44.0