forked from Bananymous/banan-os
LibC: make sleep() set errno if sleep woke up early
This commit is contained in:
parent
a12ffaa8a2
commit
976ae64f88
|
@ -192,7 +192,10 @@ int pipe(int fildes[2])
|
||||||
|
|
||||||
unsigned int sleep(unsigned int seconds)
|
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)
|
char* getcwd(char* buf, size_t size)
|
||||||
|
|
Loading…
Reference in New Issue