Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting command line parameters outside argv passed to main



I wonder what the correct POSIXish way of getting process arguments by
code outside of main (either by function or possibly they are stashed
in a standard global variable). I know about NSProcessInfo at the
Cocoa level but I am looking for a C based api at/near the BSD layer
(core foundation) that provides similar functionality.

I note that kvm_getprocs, kvm_getargv, kvm_getenvv exist but I believe
those are for in kernel use (are are likely overkill).

If no built-in feature exists I will simply grab the arguments while
in main and stash what I need in a global var for later use or
accessible via some internal api.

-Shawn
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.