From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7103 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] getloadavg: use sysinfo() instead of /proc/loadavg Date: Wed, 25 Feb 2015 15:51:38 -0500 Message-ID: <20150225205138.GM23507@brightrain.aerifal.cx> References: <1424803447-5140-1-git-send-email-amonakov@ispras.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1424897522 28407 80.91.229.3 (25 Feb 2015 20:52:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2015 20:52:02 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7116-gllmg-musl=m.gmane.org@lists.openwall.com Wed Feb 25 21:51:57 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YQiw0-0005T7-EF for gllmg-musl@m.gmane.org; Wed, 25 Feb 2015 21:51:56 +0100 Original-Received: (qmail 3471 invoked by uid 550); 25 Feb 2015 20:51:55 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3426 invoked from network); 25 Feb 2015 20:51:51 -0000 Content-Disposition: inline In-Reply-To: <1424803447-5140-1-git-send-email-amonakov@ispras.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7103 Archived-At: On Tue, Feb 24, 2015 at 09:44:07PM +0300, Alexander Monakov wrote: > Based on a patch by Szabolcs Nagy. > --- > This is a followup to a recent IRC conversation. getloadavg() doesn't really > need to open a file in /proc, since a sysinfo() syscall should suffice. Based > on a patch by nsz, slightly adjusted. Return value of sysinfo() call is not > checked, since the only documented failure is with EFAULT. Thanks. Committed. Rich