Subject: Re: bin/3982: ftp ignores eofc
To: Perry E. Metzger <perry@piermont.com>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 01/02/1998 13:04:24
> I just typed "ftp" and then typed "^D" and it worked Just Fine.
> There is no problem in 1.3 or in the head.
Those two sentences have little to do with one another. Perhaps the
PR's subject was misleading; "ftp ignores some settings of eofc" might
have been more accurate.
>> When I run ftp, I see the following. (I typed ^Z at each of the
>> first two "ftp> " prompts, then RETURN when nothing happened.)
> You are probably having an interaction with the command line editing
> stuff.
I'm fairly sure I am. See the original PR, or relevant excerpts below.
> You didn't specify that you had set EOF to something odd
query-pr's output differs on this point. See below.
> (^Z is not ASCII EOF!)
There is no EOF character in ASCII, as far as I can tell; EOT - ^D - is
arguably the closest, though a case could perhaps be made for ETX. Be
that as it may, I choose to use SUB - ^Z - for my eofc (largely due to
a VMS heritage back in my larval stage), and PR 3982 arose because
something in ftp, almost certainly libedit, breaks this - ^Z does not
function as EOF at the ftp command line for me, despite being my eofc
and working Just Fine in most respects (even, as noted below, gdb,
which *also* provides command-line editing).
Here are those excerpts from "query-pr --full 3982", as run on
cvs.netbsd.org a few minutes ago:
| >Description:
| At the ftp> prompt, my EOF character no longer exits. ^D does
| - but my EOF character ain't ^D. (gdb gets this right, for
| what that's worth, despite providing command-line editing.)
| >How-To-Repeat:
| % stty eof \^Z
| % ftp nonexistent-host-name
| ftp: nonexistent-host-name: Unknown host
| ftp>
|
| type ^Z and observe that nothing happens.
[...]
| the EOF character correctly. It looks as though libedit
| contains code (tty_bind_char()) to deal with this case, but it
| doesn't seem to be working (and it's broken anyway; for
| example, it assumes that one's EOF character should be bound to
| EM_DELETE_OR_LIST, which is nonsense - ^D should get the delete
| functionality, the list functionality should be separate, and
| both should be divorced from the EOF-character functionality).
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B