From: Philip Homburg Date: Thu, 11 May 2006 14:52:40 +0000 (+0000) Subject: Ignore SIGHUP in floppy driver. X-Git-Tag: v3.1.3~366 X-Git-Url: http://zhaoyanbai.com/repos/icons/debian/static/doxygen.log?a=commitdiff_plain;h=aeb6630868392f4685cdb3f6abbed5ed704ad4d8;p=minix.git Ignore SIGHUP in floppy driver. --- 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? */