diff --git a/libc/unistd.cpp b/libc/unistd.cpp index 7b401d49..ced04a3e 100644 --- a/libc/unistd.cpp +++ b/libc/unistd.cpp @@ -192,7 +192,10 @@ int pipe(int fildes[2]) unsigned int sleep(unsigned int seconds) { - return syscall(SYS_SLEEP, seconds); + unsigned int ret = syscall(SYS_SLEEP, seconds); + if (ret > 0) + errno = EINTR; + return ret; } char* getcwd(char* buf, size_t size)