Getting command line parameters outside argv passed to main
Getting command line parameters outside argv passed to main
- Subject: Getting command line parameters outside argv passed to main
- From: Shawn Erickson <email@hidden>
- Date: Mon, 19 Dec 2005 12:15:37 -0800
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:
This email sent to email@hidden