tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Ecessive use of PWD command in /usr/bin/ftp

    Date:        Sat, 18 Nov 2017 22:45:17 +0000
    From:        David Holland <>
    Message-ID:  <>

  | no, sounds good and broken, so please fix :-)

Not broken, the server which had a problem is what's broken, inefficient and
perhaps a bit pointless yes, but broken, no.

Of course, this needs to be considered in the context of the time, when
this was all done, the model was a user sitting at an ftp command prompt,
doing various commands, being prompted each time - updating the remote
directory name (in case the prompt wanted it) only when it might have
been changed, seems like a nice optimisation - certainly better than
fetching it for every prompt.

What's changed is the way we typically use ftp - prompting (interactive use)
is rare now, and optimising for that case makes little sense.

Also, undoing this properly will need a little extra grunge in the code,
as the way it is now, there's no need to distinguish between "not done"
and "command failed - server won't tell us", we either have the info when
we want to use it, or we don't.  Now we will need to know that we attempted
to get the remote directory and failed, so we don't keep attempting,
before every prompt (if it contains one of the 3 magic escape sequences)
when the server is simply not going to give us the answer.

Still, it can easily be made better, so unless there's an objection
(and sometime after we have working builds again) I will fix it.


Home | Main Index | Thread Index | Old Index