X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=chHXbgtHVJR1XDBkRRMpaiWG8uIM4CHEWdgTsys8DvO3O1jlme54e du6irUt1m/htn0NEXd8XwTrSkG48VE0lfbORTD1UxKIZOms3bJbDhEoi0ccbwaO4 TVDR36d4yWF3sTevTbpPscCePp8EUxZQJ+y5iqPOk8C9EOT3XBDzhQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=6RtgSJqMOqcJwBnGv02//vkoE5I=; b=jnSzG7GCPkjfnYLPwrv1s6rI/ej0 F5mgUnUdea2cSc8WNbwjd+IDxcYR/3i0Y70Qv3lTU84eYDfSr0nbLL9NQ4nX31u3 mnN7yiM2XepI1Om4r8ht/nzJx+1c8L/PIt6EeFKa8x9PZXLMWtLmptMWnYdQzBL0 Q8dfVqM+nYlibok= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Thu, 15 Aug 2019 09:28:54 +0200 From: Corinna Vinschen To: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" Cc: "'cygwin AT cygwin DOT com'" Subject: Re: getpriority() and top display for priority inconsistent Message-ID: <20190815072854.GE11632@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" , "'cygwin AT cygwin DOT 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) --8GIDNBYM960X1xp6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--