From: Alan Cox Date: Fri, 2 Jan 2015 18:05:06 +0000 (+0000) Subject: syscall_proc: fix _pause() with timeout return X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=50c20b853d995d343b77d19ea35ed96d2ce7d4a6;p=FUZIX.git syscall_proc: fix _pause() with timeout return --- diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index 4ec5d68c..2624e766 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -398,7 +398,7 @@ int16_t _pause(void) udata.u_ptab->p_timeout = t + 1; psleep(0); /* Were we interrupted ? */ - if (!t || udata.u_ptab->p_timeout) { + if (!t || udata.u_ptab->p_timeout > 1) { udata.u_error = EINTR; /* Our timeout is automatically cleared on syscall exit */ return (-1);