LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   effects interrupts may have on code (malloc, sleep, ect..) (https://www.linuxquestions.org/questions/programming-9/effects-interrupts-may-have-on-code-malloc-sleep-ect-206321/)

jwstric2 07-17-2004 02:56 PM

effects interrupts may have on code (malloc, sleep, ect..)
 
Maybe someone has had a similar experience with this. I have an application reliable udp library I'm intergrating with some code. I have been getting strange errors that valgrind, gdb, and memcheck have all failed to find (by find I mean overwritten memory, bad allocations, null pointers, ect..) . Im wondering whether setting interrupt handlers on sockets has any effect on other code such as malloc and sleep. I was wondering this because the man page for sleep says to not use alarms and sleep together, which I am.

The errors are random and sometimes generate seg faults and other times bad results.

Hko 07-17-2004 03:59 PM

Try using nanosleep() for interrupt-save sleeps.

jwstric2 07-17-2004 05:27 PM

Thanks, I'll try this. Im just wondering how sleep and nanosleep differ in implementation , especially in dealing with interrupts.


All times are GMT -5. The time now is 07:41 PM.