Cygwin: getpriority() consistent with process priority
https://cygwin.com/ml/cygwin/2019-08/msg00122.html
This commit is contained in:
parent
235eb63034
commit
fe239aef1b
@ -3977,7 +3977,12 @@ getpriority (int which, id_t who)
|
||||
if (!who)
|
||||
who = myself->pid;
|
||||
if ((pid_t) who == myself->pid)
|
||||
return myself->nice;
|
||||
{
|
||||
DWORD winprio = GetPriorityClass(GetCurrentProcess());
|
||||
if (winprio != nice_to_winprio(myself->nice))
|
||||
myself->nice = winprio_to_nice(winprio);
|
||||
return myself->nice;
|
||||
}
|
||||
break;
|
||||
case PRIO_PGRP:
|
||||
if (!who)
|
||||
|
Loading…
Reference in New Issue
Block a user