public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr@ncbi.nlm.nih.gov>
Cc: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: Re: getpriority() and top display for priority inconsistent
Date: Thu, 15 Aug 2019 07:29:00 -0000	[thread overview]
Message-ID: <20190815072854.GE11632@calimero.vinschen.de> (raw)
In-Reply-To: <BN6PR09MB1409FFA3C34F0EF48915C4E1A5AD0@BN6PR09MB1409.namprd09.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

On Aug 14 20:01, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
> > Feel free to provide a patch, just, please, create a valid git commit message
> 
> "getpriority() consistent with process priority https://cygwin.com/ml/cygwin/2019-08/msg00122.html"
> 
> The changeset is really trivial:
> 
> diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
> index a914ae8..20126ce 100644
> --- a/winsup/cygwin/syscalls.cc
> +++ b/winsup/cygwin/syscalls.cc
> @@ -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)
> 

git format-patch output with commit message, please?  The commit message
should describe what the problem is and how the patch fixes it.  One or
two sentences are enogh.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-08-15  7:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 20:01 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15  7:29 ` Corinna Vinschen [this message]
2019-08-15  9:41   ` Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-15 10:20     ` Corinna Vinschen
2019-08-15 10:23       ` Corinna Vinschen
2019-08-15 11:04       ` Houder
2019-08-15 11:13         ` john doe
2019-08-15 10:54     ` john doe
  -- strict thread matches above, loose matches on Subject: below --
2019-08-08 13:46 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-08 15:40 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190815072854.GE11632@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    --cc=lavr@ncbi.nlm.nih.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).