4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-16 14:09:21 +08:00

Cygwin: sched_getscheduler: fix error handling

Fixes: 6b2a2aa4af1e ("Add missing files.")
Signed-off-by: Christian Franke <christian.franke@t-online.de>
This commit is contained in:
Christian Franke 2024-11-25 15:02:36 +01:00 committed by Corinna Vinschen
parent 46474ecf57
commit d06ba04550

View File

@ -140,7 +140,10 @@ int
sched_getscheduler (pid_t pid) sched_getscheduler (pid_t pid)
{ {
if (pid < 0) if (pid < 0)
return ESRCH; {
set_errno (EINVAL);
return -1;
}
else else
return SCHED_FIFO; return SCHED_FIFO;
} }