From 46d1e63c76c032d0a8ad4f30f75be7347e24cbb0 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Mon, 25 Nov 2024 15:02:36 +0100 Subject: Cygwin: sched_getscheduler: fix error handling Fixes: 6b2a2aa4af1e ("Add missing files.") Signed-off-by: Christian Franke --- winsup/cygwin/sched.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index 71a1e86..22ff0c8 100644 --- a/winsup/cygwin/sched.cc +++ b/winsup/cygwin/sched.cc @@ -140,7 +140,10 @@ int sched_getscheduler (pid_t pid) { if (pid < 0) - return ESRCH; + { + set_errno (EINVAL); + return -1; + } else return SCHED_FIFO; } -- cgit v1.1