From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83306 invoked by alias); 15 Aug 2019 07:29:11 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 83297 invoked by uid 89); 15 Aug 2019 07:29:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-115.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HTo:D*nih.gov X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.187) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Aug 2019 07:29:10 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1My2lr-1iCxPf1a9f-00zTCq; Thu, 15 Aug 2019 09:29:00 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 417E0A8071F; Thu, 15 Aug 2019 09:28:54 +0200 (CEST) Date: Thu, 15 Aug 2019 07:29:00 -0000 From: Corinna Vinschen To: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" Cc: "'cygwin@cygwin.com'" Subject: Re: getpriority() and top display for priority inconsistent Message-ID: <20190815072854.GE11632@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" , "'cygwin@cygwin.com'" References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8GIDNBYM960X1xp6" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-08/txt/msg00193.txt.bz2 --8GIDNBYM960X1xp6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1207 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 m= essage >=20 > "getpriority() consistent with process priority https://cygwin.com/ml/cyg= win/2019-08/msg00122.html" >=20 > The changeset is really trivial: >=20 > 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 =3D myself->pid; > if ((pid_t) who =3D=3D myself->pid) > - return myself->nice; > + { > + DWORD winprio =3D GetPriorityClass(GetCurrentProcess()); > + if (winprio !=3D nice_to_winprio(myself->nice)) > + myself->nice =3D winprio_to_nice(winprio); > + return myself->nice; > + } > break; > case PRIO_PGRP: > if (!who) >=20 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 --=20 Corinna Vinschen Cygwin Maintainer --8GIDNBYM960X1xp6 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1VCbYACgkQ9TYGna5E T6BT3g/+ILtw0FbEL2HA03dyGk7nH3FZnco+FlSs3atbnAII4vCjN/4/z8WUoJ0/ 7xxB3uVyGO10akJhKJJt/XAV6VBX1OUTqjNV+uGxGuSH2vNO4TqqPzNDrQUF1Cra Gptmi6VKm+va4eRs3dlWOejn8EoZ1B6dgffKTnqURK/nDzV96UmHem3m1IbhwCMS es+k8fRR89iJ1GTfXTxwMPGQzK8eEwFEOSRolPFxoztH0nebQ6qfGB+w9KIfcXGJ A0LEiPNf65b2EUs8487OKT6pVIhJ6a802jccSXVRfyBDooU1JszYo7vW3zQBv8FX j38gqke4buIGpLRTgvU36/wf/Z6T3mXtRh8SPh7bjSALmPKOZi1rADj+jDWO9297 Lc23HTUiNdrKUQpWHXqR8Bc/A9ssiVds+/dfyLtuainlCwcRraRWR6QIkZ/pS/Mc 4BVUocJX0e2mrDBYBAwiLbLZpE6CHXXkDSWyMWa/2eAgnko0kIvdDIme6U8XUGRT a6B3WSiyJPltmajQZ42yQg7nsm4DrRguNkq9m0Ssod1l4pscyNANQfD6ru9Xxhc8 Qf1/oVcVFAG8o0GSgmW1qUjuBveUQZT6sqU/OYoRAJdx7RZWc3BAl1XitoFrWBAb eI2r0ZboNwGHf2+z9JqFTnQ5qOeu2Wfdofr3g0jxdC4MVFy8AZA= =fclF -----END PGP SIGNATURE----- --8GIDNBYM960X1xp6--