Frank Küster wrote: >> [EMAIL PROTECTED]:~/these/avancement_2008$ env -i latex avancement.tex >> lstat(./latex) failed ... >> ./latex: No such file or directory >> This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) > > I get a different result here: > > $ env -i latex Pinball_Wizard.tex > This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
I've the same thing as Jerome Note that the 'lstat(./latex) failed ...' message comes from latex itself (try strace env -i latex avancement.tex to see that or observe that env -i true does not produce any message) > Why does it find latex at all, on both system, when the environment > variable PATH is to be ignored? And if the shell parses the commandline > in advance and replaces "latex" by "/usr/bin/latex" internally, why does > Jérôme get the error message > >> lstat(./latex) failed ... >> ./latex: No such file or directory Probably because 'env' use the libc exec*p (such as execvp) function: >From the execvp manpage: Special semantics for execlp() and execvp() The functions execlp() and execvp() will duplicate the actions of the shell in searching for an executable file if the specified filename does not contain a slash (/) character. The search path is the path specified in the environment by the PATH variable. If this variable isn’t specified, the default path ":/bin:/usr/bin" is used. In addi‐ tion, certain errors are treated specially. > And, just for curiosity, how can I see to what PATH is set when "env -i" > is used? > > $ env -i echo $PATH > > gives > > /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/frank/bin > > because $PATH is substituted by the shell before env starts. If I > protect the variable from shell expansion, how can I make "someone" read > it again: > > $ env -i eval echo '$PATH' > env: eval: No such file or directory env -i sh -c 'echo $PATH' or even env -i bash -c 'export' to see all the environment (in the bash shell, so I've 3 variables) env -i env to see the real environment after env (nothing displayed for me) > I guess Florent could answer this, but I haven't heard from him for ages. Sorry, my name is Vincent :-) > Regards, Frank Regards, Vincent -- Vincent Danjean GPG key ID 0x9D025E87 [EMAIL PROTECTED] GPG key fingerprint: FC95 08A6 854D DB48 4B9A 8A94 0BF7 7867 9D02 5E87 Unofficial pacakges: http://www-id.imag.fr/~danjean/deb.html#package APT repo: deb http://perso.debian.org/~vdanjean/debian unstable main -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]