[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSProcessInfo incompleteness
From: |
Marcus Müller |
Subject: |
NSProcessInfo incompleteness |
Date: |
Mon, 8 Apr 2002 03:54:37 +0200 |
And once again ...
Just found out that
- (unsigned int)operatingSystem;
- (NSString *)operatingSystemName;
are missing from NSProcessInfo. I'm not sure if they're part of the
OPENSTEP spec, but they are part of OS X Server 1.x and OS X 10.0.x.
While I never found the first method usable at all, the second is usable
by socket servers that like to give away some info of the host system.
IMO the latter could be implemented as easy as this:
- (NSString *)operatingSystemName;
{
NSString *env = [[NSProcessInfo processInfo] environment];
NSString *str = [env objectForKey: @"GNUSTEP_HOST_CPU"];
return str;
}
Probably with better error checking, although it'd be interesting what
should be assumed as default if this info can't be found during
runtime ... hm.
Cheers,
Marcus
--
Marcus Mueller . . . crack-admin/coder ;-)
Mulle kybernetiK . http://www.mulle-kybernetik.com
Current projects: finger address@hidden