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:from:reply-to:to:subject:date:message-id :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=ewIPyYjn8N7+PeW/yb1O1qK4ZjJzoCgG8zQGFEZztYt+jvfFb1gfd wuI08DO0meD9hPkddSHLgsMSYDmhbzXEwREFyddy/lQv+/sRdepo3pDh/WLr2plt Wz25DH21IldngPUVnLWDM6YF2NWeKJCLyA/CBHROt4qUSwH/AHTQq0= 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:from:reply-to:to:subject:date:message-id :content-type:content-transfer-encoding:mime-version; s=default; bh=IFI5hhw4FfYsoLA7O7+NbpGoMfg=; b=RYl6m5CXm7lLUleba/E83DnY4R3f CgN3+TsUUxt7E+yhSD3Dtxon2OlujWj/qsuNrWVeCv/cNGwMf3ky1ZbNJD7OsJMv PD0eYmGmWkF3yfh9gt2g9iqJyogpVqknOZ+iEB2TTD+BkbZx9cOaEOZwAwN9qpAt MY5HXpnoXLpEgko= 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=-2.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=priorities X-HELO: nihcesxway4.hub.nih.gov DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nih.gov; i=@nih.gov; q=dns/txt; s=NIH; t=1565271970; x=1596807970; h=from:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=69nJPyFd5uAbNV5/Fr6Z9bPP0GeK5bkgTV5YQhJx7xM=; b=lJpWkZWVirk3ec8ZzPal3N8hkfBUumxQTroDFsSr7YQpow9+mgsIOHLq 45v/KrpBo2c6YxWYCrp+6EKFiAr1j+25OANcfh3Ymn9yUoFWrM+Sub4DO CbyPxPJA3/cozcu0CGLPLbU0n0EIQteq3MGx7JIXfbAUmdfPT5uy3fnFx R7sZjPlwQGiQa42ZzDG0MrdYXv8s8tBKPu8wHxUyUzKNisaU6omd5gR6V MrQvsWHSK7epWvYT+uajboDPkxYGZCsVls2tAhqT2+Y8/epyTsO8MnZxQ pydPSVb0RAGjWb39GSYY/GBJsnveMSeRy9vT7mOOnoffuX703ZwVcDhZA Q==; IronPort-SDR: HAqqJygcEHziMtYUWMp39HWz50SGYNNX0fYaXiDHpJ8/4+6lnL7NVKkLHgQyWHIGB36Sj50G3s rKLu4O+U254A== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B3TCi/V61eMlJfAROXq4aLPuKDWtvGwNUTphQ31v5DH5GLjeRXHmwq9CF24DDIFZMrUtDixFdNg+HB1hUJs6+dgyvXYtIxOvd9/G3rXvpmhEH/AsOMHspJXU3RJlrV/xdlKbmBIDqk32nIuXjCZaeR1qN1ciuryzG4ziL41T6/epDaGhhlGVGAX362wdx7yDraOI3hz5FPi1OFEMIy3phD9q2UUFYLfFaVFZSFHTjakhV9waolaznnXqbcqWpQnDBLDNPFIGk2bEmuU9I557Amd7d9M3thW/dy6uw/iX0yNFtpNLH/d8tRB1QQSzqDXFbpBovQqBpFZv7v2ZTNRrXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=69nJPyFd5uAbNV5/Fr6Z9bPP0GeK5bkgTV5YQhJx7xM=; b=k4g0AhAMluPUFuOKYQcPqqgkvu+NTGZDyydcTjQ16vRApBzM/0zFE9Wc8bGs6nOsuCXyKPmCGOD2hM5WnRyKro4XIAeqmrtLgx6WklMDok5CBH8xZgnn1p0YTtQqNFbTaJowZotaeRmnIigxmTrOj4Sm1zgVoajAaYdhzjNySiJqdmsdGjsxcI9bCqFH2VrfGdxu4wEhBYcmRjHFVKH7hbiF3vVRw6jiOnlAmCWRyNJtx+N7x0mESrGZME4Z8fqaWqe7NeLv8K+2+bJThTHojA3fZh+OfD7HPCveguQPuNjDxg7t5jB/OxJTVq9HcEjNudpOAcO7txs8dlQcUUHnmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ncbi.nlm.nih.gov; dmarc=pass action=none header.from=ncbi.nlm.nih.gov; dkim=pass header.d=ncbi.nlm.nih.gov; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nih.onmicrosoft.com; s=selector1-nih-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=69nJPyFd5uAbNV5/Fr6Z9bPP0GeK5bkgTV5YQhJx7xM=; b=Z30lpze2eOYClWR2RTk9AXgRR27ggahYvnj/zPA5f3bI36ffgMJdLu5UqJ76/TTzJJg0d061yilLTKgMRZAt3J1MKsz3Vmiyj+AGfutPbov2FNl5/XayYIgZ0hciMh3fu1THU8D4kEETHHmJUNL+gExgBNqEN3Nmyq6ivUqbLmA= From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" Reply-To: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" To: "'cygwin AT cygwin DOT com'" Subject: Re: getpriority() and top display for priority inconsistent Date: Thu, 8 Aug 2019 13:45:57 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=lavr AT ncbi DOT nlm DOT nih DOT gov; x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1LCgX8jMreRI8nIYEE1jKFOrutlV/29drlsKml57BhMONzcr+DTbv9kp/itzg/ez Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x78DkpYg001293 > I pushed your patch with a short commit message. 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). Thoughts? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple