[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Getting full pathname of running executable
From: |
Aurelien Chanudet |
Subject: |
[Gcl-devel] Re: Getting full pathname of running executable |
Date: |
Wed, 10 Sep 2003 10:33:17 +0200 (CEST) |
Hi,
There are several alternatives on Mac OS X.
> int p;
> char b[PATH_MAX],q[PATH_MAX];
>
> p=getpid();
> snprintf(q,sizeof(q),"/proc/%d/exe",p);
> realpath(q,b);
#include <mach-o/dyld.h>
_NSGetExecutablePath(b,PATH_MAX);
Aurelien
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
- [Gcl-devel] Re: NetBSD/sparc port?, Dan Debertin, 2003/09/04
- Re: [Gcl-devel] Re: NetBSD/sparc port?, Camm Maguire, 2003/09/05
- [Gcl-devel] Re: NetBSD/sparc port?, Dan Debertin, 2003/09/09
- [Gcl-devel] Getting full pathname of running executable, Camm Maguire, 2003/09/09
- [Gcl-devel] RE: Getting full pathname of running executable, Mike Thomas, 2003/09/09
- RE: [Gcl-devel] RE: Getting full pathname of running executable, Mike Thomas, 2003/09/18
- Re: [Gcl-devel] RE: Getting full pathname of running executable, Camm Maguire, 2003/09/19
- RE: [Gcl-devel] RE: Getting full pathname of running executable, Mike Thomas, 2003/09/21
- [Gcl-devel] Re: Getting full pathname of running executable,
Aurelien Chanudet <=
- Re: [Gcl-devel] Re: NetBSD/sparc port?, Mark Murray, 2003/09/10
- Re: [Gcl-devel] Re: NetBSD/sparc port?, Camm Maguire, 2003/09/19
[Gcl-devel] FreeBSD port (Was: Re: NetBSD/sparc port?), Mark Murray, 2003/09/11