On Sat, 2012-01-07 at 20:40 +0100, Samuel Thibault wrote: > Svante Signell, le Sat 07 Jan 2012 20:05:45 +0100, a écrit : > > On Sat, 2012-01-07 at 18:48 +0100, Samuel Thibault wrote: > > > Svante Signell, le Sat 07 Jan 2012 17:58:31 +0100, a écrit : > > > > On Sat, 2012-01-07 at 15:48 +0100, Samuel Thibault wrote: > > > > > Svante Signell, le Sat 07 Jan 2012 15:43:46 +0100, a écrit : > > ... > > > I'm not talking about Linux, but about GNU/Hurd. When run from > > > execv, $0 in a shell script in hurd will be /dev/fd/3, not > > > e.g. $PWD/script.sh. Try the source code I had pasted in my mail, you'll > > > see. > > > > I ran the code you posted (and on the ML) on GNU/Linux, and will do the > > same for GNU/Hurd! It still does not explain how having . in $PATH > > solves the problem. > > It solves because in that case exec finds it in PATH.
Since the environment PATH is available to the exec server, what about PWD? If that is the case the exec server could search for the shell script along $PWD. (or is $CWD needed?) Are there any security or other issues involved here?