site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com _NSGetExecutablePath() (from <mach-o/dyld.h>) man 3 dyld : After that, you may want to use realpath() to get the real path. Le 18 janv. 09 à 17:39, Joel Reymont a écrit : How can I do this on Mac OSX? Thanks, Joel --- http://twitter.com/wagerlabs _______________________________________________ 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/devlists%40shadowlab.org This email sent to devlists@shadowlab.org _______________________________________________ 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... _NSGetExecutablePath() copies the path of the main executable into the buffer buf. The bufsize parameter should initially be the size of the buffer. This function returns 0 if the path was successfully copied. It returns -1 if the buffer is not large enough, and * bufsize is set to the size required. Note that _NSGetExecutablePath() will return "a path" to the executable not a "real path" to the executable. That is, the path may be a symbolic link and not the real file. With deep directories the total bufsize needed could be more than MAXPATHLEN. It's possible to get the full path to the currently running executable on Linux by looking at /proc/self/exe or /proc/curproc/ file. This email sent to site_archiver@lists.apple.com