This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getpriority() and top display for priority inconsistent

On Aug  8 13:45, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
> > I pushed your patch with a short commit message.
> Thanks!  Thinking about that a little more, getpriority(PRIO_PROCESS)
> returns the cached version of priority (since the last setpriority())
> but should return "live" version by re-getting and re-caching the
> actual thing from the system: 1. The priority could have been changed
> from the outside (it is a windows process, after all, and anybody can
> use Task Manager, for example); 2. When pulling group or user
> priorities from getpriority(), those things get returned from fresh
> "winpids", which gets constructed on-the-fly and so "nice" gets
> populated from the system; so the results can be, again, inconsistent
> (e.g. if compared to getpriority() for the process alone, since it is
> a cached one); 3. "/proc/PID/stat" always shows the live results (even
> before my change, although it was showing the "wrong" value).
> Thoughts?

Feel free to provide a patch, just, please, create a valid git commit
message and send the stuff to cygwin-patches (unless the patch is
really trivial).


Corinna Vinschen
Cygwin Maintainer

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]