From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joe Buehler Newsgroups: gmane.emacs.devel Subject: Re: portable implementation of load-average Date: Wed, 22 Sep 2004 09:59:18 -0400 Organization: Spirent Communications, Inc. Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: Reply-To: jbuehler@hekimian.com NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1095861598 13508 80.91.229.6 (22 Sep 2004 13:59:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2004 13:59:58 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 22 15:59:46 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CA7es-0006Ts-00 for ; Wed, 22 Sep 2004 15:59:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CA7kq-00074p-Rt for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2004 10:05:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CA7kb-00070L-QX for emacs-devel@gnu.org; Wed, 22 Sep 2004 10:05:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CA7kX-0006yT-CZ for emacs-devel@gnu.org; Wed, 22 Sep 2004 10:05:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CA7kX-0006yJ-9j for emacs-devel@gnu.org; Wed, 22 Sep 2004 10:05:37 -0400 Original-Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CA7eW-0005Yy-4l for emacs-devel@gnu.org; Wed, 22 Sep 2004 09:59:24 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CA7eV-0003Gk-00 for ; Wed, 22 Sep 2004 15:59:23 +0200 Original-Received: from 64.47.34.180 ([64.47.34.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Sep 2004 15:59:23 +0200 Original-Received: from jbuehler by 64.47.34.180 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Sep 2004 15:59:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 21 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 64.47.34.180 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en In-Reply-To: X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27441 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27441 Stefan Monnier wrote: > You probably want to use `call-process' here instead, so as to avoid running > `sh' (running `uptime' is already making your `load-average' much slower > than the C version, so I think it's important to try and limit the inflicted > pain). Like I said, I'm not a LISP programmer -- it's all yours, feel free to change what you want. The only way I currently use it is as part of (display-time), so I don't need any caching myself -- it runs once a minute as is. > BTW, is /usr/bin/uptime setgid 0 on those systems, or does it use some other > method to get the info (a method that Emacs could maybe use)? It is not setgid for linux and solaris, it is setgid for the others. Whether emacs works as is for linux and solaris I don't know, but I presume it does not work for the other OS's -- definitely not for AIX 4.3. -- Joe Buehler