Linux and getSystemAttribute:

Mark A. Schwenk mas at wellthot.com
Wed Apr 19 06:59:13 UTC 2000


Tim Rowledge wrote:
> 
> In the process of attempting to make a simple-as-possible way to
> demonstrate the socket problems I am having with pluginised Squeak
> (http://sumeru.stanford.edu/tim/pooters/SqFiles/plugs for Mac, Acorn and
> Linux/i686 versions of latest edition) I wanted to use the ol'
> commandline startup file trick. Sadly, the 2.7 linux sources do not
> handle any of the commandline arguments rules we agreed on some time
> ago, so I fixed as much as I can. What I can't do right now is the
> part:-
> (http://minnow.cc.gatech.edu/squeak/78)
> Also, the following special getSystemAttribute indices have been proposed:
> >
> >      * 1001 - basic OS type: "unix", "win32", "mac",...
> >      * 1002 - specific OS type: "solaris2.5" on unix, "win95" on win32,...
> >      * 1003 - processor architecture: "68k", "x86", "PowerPC",...
> 
> since I have no idea how to find out those things programmatically in a
> way that will work for all those unices out there. Advice, code
> fragments welcomed.
> 
> tim
> 
> --
> Me and my two friends... GIF and Wesson.
> Tim Rowledge: tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>

The uname(2) system call can provide the relevant attributes. See Dave Lewis's OSProcess code at http://minnow.cc.gatech.edu/squeak/708 for details. He already provides these attributes plus lots of other nifty stuff. I'd like to see OSProcess included in the base UNIX VM.

-Mark Schwenk
 WellThot Inc.





More information about the Squeak-dev mailing list