O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSProcessInfo — Mac OS X 10.0

Synopsis

This class provides an way for applications to discover information about their current process and host. This information includes such things as the execution arguments, environment variables, process ID, and the process name. Using NSProcessInfo, clients may also discover information about the host, such as the host name, and the operating system name and version. NSProcessInfo returns the operating system version in a human-readable form that is unsuitable for parsing.

image with no caption

@interface NSProcessInfo : NSObject
                                  // Accessor Methods
   - (void)setProcessName:(NSString *)newName;
   - (NSString *)processName;
                                  // Class Methods
   + (NSProcessInfo *)processInfo;
                                  // Instance Methods
   - (NSDictionary *)environment;
   - (NSString *)globallyUniqueString;
   - (unsigned int)operatingSystem;
   - (NSString *)operatingSystemName;
   - (NSString *)operatingSystemVersionString;
   - (int)processIdentifier;
   - (NSArray *)arguments;
   - (NSString *)hostName;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required