In message <4c577dc9.7060...@gmail.com>, Regis writes:
>
> On 2010-08-02 23:44, Daniel Gong wrote:
> > Hi all,
> >
> > As you know that I'm developing the jdb command line tool. I met a weird
> > problem when building jdktools alone.
> >
> > Briefly, the problem is like this: after I build the jdktools module against
> > hdk, each jdk tool command line tool turns out to be segmentation fault when
> > running with a simple command such as "java", but succeeds when running with
> > a full path such as "$HDK/jdk/bin/java".
>
> [SNIP]

> getExeDir in samsa.c uses realpath to find executable file path, which can't 
> handle case of executable file is in $PATH.
> Reading symbol link "/proc/self/exe" can resolve it on linux, you can try
> following patch.

Your patch contains an off by 2 error.  So just try:

  svn diff -c -951009 | patch -p0

to revert my change that broke it.  (Although a small
part of that patch still makes sense - the basename part.)

>  I'm not sure if it works on other platforms (AIX, z/OS).

It doesn't which is why I tried to make the change.  I guess we do need
to handle it with platform specific #ifdefs.

Regards,
 Mark.


Reply via email to