[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: loading lua scripts relative to an app's path
- From: Adrian Perez <moebius.lists@...>
- Date: Sat, 7 Oct 2006 13:24:06 +0200
On Sat, 7 Oct 2006 13:16:14 +0200
Mike Pall <mikelu-0610@mike.de> wrote:
> Hi,
>
> Adrian Perez wrote:
> > snprintf(sym, "/proc/%i/exe", getpid());
>
> Umm, better use: /proc/self/exe
> On FreeBSD try: /proc/curproc/file (it may return "unknown" though)
You're right, that's a lot beter :-P, thanks for the tip.
Cheers,
--
Futility Factor: No experiment is ever a complete failure - it can
always serve as a negative example.
--
~
~
~
".signature" 4 lines, 50 characters written
Attachment:
signature.asc
Description: PGP signature