Re: getpriority() and top display for priority is inconsistent

2019-08-08 Thread Corinna Vinschen
On Aug 7 19:27, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > > Please give it a try. > > diff --git a/winsup/cygwin/fhandler_process.cc > b/winsup/cygwin/fhandler_process.cc > index 2a06554..2305b53 100644 > --- a/winsup/cygwin/fhandler_process.cc > +++ b/winsup/cygwin/fhandler_proce

Re: getpriority() and top display for priority is inconsistent

2019-08-07 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> Please give it a try. diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 2a06554..2305b53 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -1076,7 +1076,7 @@ format_process_stat (void *data, char *&destbuf) unsign

Re: getpriority() and top display for priority is inconsistent

2019-08-07 Thread Corinna Vinschen
On Aug 7 00:45, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > > You seem to have worked it out already so please send a patch in > > git format-patch foramt to the cygwin-patches mailing list. > > I tried :-/ > > : > Sorry, only subscribers may post. (#5.7.2) There are no subscribtio

Re: getpriority() and top display for priority is inconsistent

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
> You seem to have worked it out already so please send a patch in > git format-patch foramt to the cygwin-patches mailing list. I tried :-/ : Sorry, only subscribers may post. (#5.7.2) I do not use git to pull Cygwin sources. The last snapshot (that corresponds to the last-known-stable releas

Re: getpriority() and top display for priority is inconsistent

2019-08-06 Thread Corinna Vinschen
On Aug 6 18:54, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > I have noticed a discrepancy between the process priority shown by > "top" vs. what getpriority() returns. > > I'm using the procps-based "top", so it reads the priority value from > /proc/PID/stat. The value gets there via

getpriority() and top display for priority is inconsistent

2019-08-06 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
I have noticed a discrepancy between the process priority shown by "top" vs. what getpriority() returns. I'm using the procps-based "top", so it reads the priority value from /proc/PID/stat. The value gets there via code found in "fhandler_process.cc": /* The BasePriority returned to a 32 bi