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:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=BI9wy4GXggvFhRMTyJz5ZNDbsDHc6eCLkwrmuKDXhP9pjD+/2oaWz /+GseXDgb3nnFM6OUtcYeYrfjXS7wrNYwpZ8R4sRYOtvbc7yguShO1jsQB7Lb9O1 TrXzxf+iJWU26b5Le1FhNVUUG4o8t136b9BImvco5RFspt4FYCGTC8= 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:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=x8PH40fGhuuXbsc1PjnS2pPIqBI=; b=DkJUNtZa47zdTNTglkQ4rELVwcMn ye6bAPgPsjtRBcuTZG6ifiurPJF543x8m9cjZVtbNoO+U//hSBrkkPDwL3qPmkvD vbt0KIyzOwpNaAVhkeL6lhWCV0L1W4B2h3cSW6dMEajNxl6agtpkAK5AlbkOks5V jY5UpJNvpcp7w5Q= 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=-103.2 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=Manager X-HELO: mout.kundenserver.de Date: Thu, 8 Aug 2019 17:40:32 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: getpriority() and top display for priority inconsistent Message-ID: <20190808154032.GL11632@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PpfQBwiAIZcuDX26" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) --PpfQBwiAIZcuDX26 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Aug 8 13:45, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: > > I pushed your patch with a short commit message. >=20 > 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). >=20 > 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). Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer --PpfQBwiAIZcuDX26 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1MQnAACgkQ9TYGna5E T6BZ+w//ciV7H/3vWCGQQUjVu+99eNLxJKLPkQk0L7cW2AsaGuDK96ORr6mfDV/8 rgC7aQ7jSHft+ThpoN3Jmd3fJ7svZ6eCoXZH5G1wQoSvrY80lfaXZFRsXiRijU1e ujMhiFiV0z4fRE2+3WCbmFY4NbcZ8kH+IDPhpiO1GXVtKc9zD+JZf+O6sYoQLv3J O/WYtNbvLr6Hf5B0+9YW+nrhRM1aOzCjIOuoFOyB13sA6LJUD3mxW3QOMflm8lY6 E1VVy/fuN1XkCNCFVGURfItKynQVl0ROYWVpSlD5nw6ka3y3JJ+P6Y3IB+0e2lOH 4R2fMsLl3FiDD1TZtcQraAlIjqBdRMeUvf13xaoaiw1Mn3i25mW/jAg9fzaOd+5t AuObVWWcqyWhHlKxmAj/xgVYlLA80dg3vmRjhvZiq9049a9KnhJr1sTkpQZ7MwHd jaUabHea8C/Dk0rusLjFT8YR5cubUw34/D0PbzIBgYMubVv9DvdExn25kmtptqc+ cVnrGNdjBJndoJQjSTdTKdzTBIG1mdA9Pb+8coR97Nsv3xNZpI4S7udgiBoZjrjz q92cgshN01v4OtRwjiJe2/jl/m4EulleWVK2HTJGlhuNFl8T0DoDce7KTpNssFzS eM8T4yBQYqjAIpYTV0fmKmo8JbQioBdliLfZOo6A3r8cQAG9498= =+d+0 -----END PGP SIGNATURE----- --PpfQBwiAIZcuDX26--