syscall restart semantics for signal handler write and main loop select + lorem