Follow-up Comment #2, bug #28934 (project hurd):

Hi Emilio,

I'm pretty sure you are correct in that execve() should not look in $PATH,
because glibc's sysdeps/mach/hurd/execve.c does a regular file lookup.
As you say the exec server gets confused since it does not find bar in
$PATH, and tries to reconstruct a `correct' path to the file.

The root problem is that the exec server can't tell which exec() variant
was called, so it doesn't know how to interpret argv[0].  The easiest
way to fix this is to prepend `./' to argv[0] if needed in execve().
This is probably the correct way to fix it as well.  I'm not sure if
this should be done to all relative paths or only ones that doesn't
contain slashes.  I'll leave it up to you to investigate further what
POSIX says about it and how Linux does it.

Regards,
  Fredrik


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28934>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to