LibC: make sleep() set errno if sleep woke up early

This commit is contained in:
Bananymous 2023-12-06 13:13:43 +02:00
parent d48839cf75
commit 094978b8d1
1 changed files with 4 additions and 1 deletions

View File

@ -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)