Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Driver crashes system when kill -9 issued.: (1 Item)
   
Driver crashes system when kill -9 issued.  
Hello,

I have written a device driver which handles quite a few interrupt events. I have made sure that in the resource manager
 initialisation code, that I have added "atexit" calls, so as to be able to gracefully close down the driver, when I 
wish to end it.

If I use "kill" on the driver, then I see that all my shutdown routines (i.e. those registered via atexit) are called 
correctly and my driver shutsdown correctly (i.e. disabling interrupt, detaching interrupts, etc).

However, when I issue a kill -9 the whole system crashes and I get no notification that my interrupts were disable nor 
detached, thus leading to the system crash.

In the QNX documentation, it states that SIGKILL can't be captured nor handled - I assume this means, even if I register
 the SIGKILL signal with a singal handler for my driver, then my signal handler won't be called on SIGKILL and thus none
 of my registered "atexit" routines will be called.

Surely I have missed something here? It can't be correct that a kill -9 on a driver which is handling interrupts will 
crash the system?

Any input would be greatly appreciated.

Best regards, Mark.