Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!mips!sgi!vjs@rhyolite.wpd.sgi.com From: vjs@rhyolite.wpd.sgi.com (Vernon Schryver) Newsgroups: comp.sys.sgi Subject: Re: Irix 3.3.1 C problem - can't display load averages Summary: strip the sign bit Message-ID: <76704@sgi.sgi.com> Date: 1 Dec 90 19:40:29 GMT References: <1990Nov27.190305.9267@csrd.uiuc.edu> Sender: guest@sgi.sgi.com Distribution: comp Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 14 In article <1990Nov27.190305.9267@csrd.uiuc.edu>, kai@sp1.csrd.uiuc.edu (Kuck And Associates) writes: > Here is a short program which, when compiled under Irix 3.2, runs and displays > the load averages on both Irix 3.2 and, interestingly, 3.3.1. > However, when compiled under Irix 3.3.1, it quits after nlist() with the error > message "lseek: Invalid argument". There are two main kinds of UNIX systems in the world. Those where the answers you get from nlist() can be used directly on /dev/kmem, and those where you have to strip the sign bit before using lseek(). They are many species in both genera, and no doubt other characteristics in other phyla. Vernon Schryver, vjs@sgi.com