On Fri, 17 Nov 2000, Francesco Potorti` wrote:
> $ ls -d / ; echo tramp_exit_status $?
> /
> tramp_exit_status 0
> $ ls -d /\ this\ file\ does\ not\ exist\ ; echo tramp_exit_status $?
> / this file does not exist not found
> tramp_exit_status 0
> $ test -e / ; echo tramp_exit_status $?
> test: argument expected
Oh my god. Yuck.
Tramp is trying to find a method to figure out whether a file exists.
But that the `test' built-in to the Solaris /bin/sh is _so_ bad that
it even fails to execute the second command on the last line, that I
didn't expect. Ick.
I think I didn't see that before because on my Solaris 2.6 system, the
previous `ls -d' test works:
/----
| $ ls -d / ; echo $?
| /
| 0
| $ ls -d /doesnotexist ; echo $?
| /doesnotexist: No such file or directory
| 2
\----
Due to these two commands, Tramp finds that it can use `ls -d' to
check for the existence of a file. I don't know why `ls -d' fails to
work on 2.5.1.
Well, sending `test -e /' and `echo $?' in two commands works. Can
you patch Tramp to do that to see what happens? [checking] Oh, it's
not that simple. I forgot why I always sent `echo $?' on the same
line as the previous command. Hm.
Ah! It was because after a command, Tramp used to send `echo /////',
and that messed up the exit status. Now Tramp uses the shell prompt
for that, so this shouldn't be a problem anymore.
kai
--
The arms should be held in a natural and unaffected way and never
be conspicuous. -- Revised Technique of Latin American Dancing