diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index 71a1e868f..22ff0c8e8 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; }