Getting command line parameters outside argv passed to main
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Vhhuagi1lvvsbzxhHi7EBVPrRMFUrG90AhWjvYb/gfStynKawzn2wS2KXajqZG2ZekJrAUv5PJ5vb6OIGJoFGHs6JysVh0MIHzYC7GCEISdnfeePT8MmPJoImk5OVGvsulVkxNhmiIsgHXUIY1DF7x9b1MNBf+Tg6HQXhEP2V5o= 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Shawn Erickson