No can do.
"nanosleep()" is implemented in a bad way that makes it impossible to
restart it cleanly. It was done that way because glibc wanted it that way,
not because it's a good idea.
In order to handle ignored interrupts without breaking out, the system
call has to be restartable - which means that any timeouts are updated
correctly in the source or in registers. "nanosleep()" doesn't do that.
This is an example of a bad interface, and I would suggest glibc just
revert to the old code for sleep which _is_ restartable.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/