chg: restart nanosleep when interrupted by signal
(cherry picked from commit f9efe23dee0924e650e1aefea029b4add8fcc7e9)

Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>
Merge pull request #431 from steenpass/nanosleep_sw

chg: restart nanosleep when interrupted by signal