Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title When writing to a file within an interrupt, the QNX4 program segfaults
Ref. No. QNX.000010196
Category(ies) Development
Issue I'm writing a progam that services interrupts from an add-on card, kicks a proxy, reads 4 bytes of data from the card and then writes it to a file (SanDisk). When using fwrite the program segfaults after about 1000 interrupts. when using write, it segfaults randomly. Are the any issues/bugs with interrupts and writing to files?x0d
Solution The functions 'write' and 'fwrite' are not interupt safe.  You shouldn'tx0d make any kernel calls from within an interupt.  Use IPC (Interprocess Communication) to get a process to do the dirty work for your interrupt handler.