vi/csh strange bug -- please help - (nf)

mark at zinfandel.UUCP mark at zinfandel.UUCP
Fri Jun 17 15:19:13 AEST 1983


#N:zinfandel:12400029:000:2390
zinfandel!mark    Jun 15 15:54:00 1983

I don't know where to post this bug-report/help-request,
so here goes.

Environment:
    vax 11/750 running 4.1BSD
    vi version 3.6
    csh version 4.1 10/9/80 (most modules) (see postscript for details).

Problem:
    alias vi '(echo start; /usr/ucb/vi \!*; echo end)'
    vi file

Now hit the break key.
I get back to the shell with my terminal not reset.
vi is still running. If I'm unlucky vi has (apparently) read keyboard EOF
since it continuously scrolls my file by the screen until the end of file,
at which point it prints its "At EOF" message ad infinitum.
Vi must be killed manually.

    alias vi '/bin/csh -cf "echo start; /usr/ucb/vi \!*; echo end"'
    vi file

works just fine, as does

    alias vi '(/usr/ucb/vi \!*)'
    vi file

and

    alias vi /usr/ucb/vi
    vi file

Note that just running vi in a subshell isn't sufficient;
the subshell must contain multiple commands.
Anyone know what's going on here?
Seems that if this is a problem in the shell that it might
bite someplace else too.

Mark Wittenberg
...!decvax!sytek!zehntel!mark
...!ucbvax!menlo70!sytek!zehntel!mark
...!teklabs!zehntel!mark

PS. If you really want to look at this problem here's the output
    of "what /bin/csh /usr/ucb/vi":

/bin/csh:
	sh.c 4.2 3/11/81
	sh.dol.c 4.2 5/3/81
	sh.err.c 4.1 10/9/80
	sh.exec.c 4.1 10/9/80
	sh.exp.c 4.1 10/9/80
	sh.func.c 4.5 81/06/19
	sh.glob.c 4.2 3/11/81
	sh.hist.c 4.1 10/9/80
	sh.lex.c 4.1 10/9/80
	sh.misc.c 4.1 10/9/80
	sh.parse.c 4.1 10/9/80
	sh.print.c 4.1 10/9/80
	sh.sem.c 4.1 10/9/80
	sh.set.c 4.1 10/9/80
	sh.proc.c	4.6 (Berkeley) 81/05/03
	sh.dir.c 4.1 10/9/80
	sh.time.c 4.1 10/9/80
	alloc.c 4.1 10/9/80
	sh.init.c 4.1 10/9/80
	printf.c 4.1 10/9/80

/usr/ucb/vi:
	ex.c	6.4 11/8/80
	ex_addr.c	6.1 10/18/80
	ex_cmds.c	6.3 11/3/80
	 Version 3.6, 11/3/80.
	ex_cmds2.c	6.1 10/18/80
	ex_cmdsub.c	6.1 10/18/80
	ex_data.c	6.1 10/18/80
	ex_get.c	6.1 10/18/80
	ex_io.c	6.2 10/23/80
	ex_put.c	6.4 11/8/80
	ex_re.c	6.2 10/23/80
	ex_set.c	6.3 10/30/80
	ex_subr.c	6.3 11/8/80
	ex_temp.c	6.2 10/23/80
	ex_tty.c	6.2 10/30/80
	ex_unix.c	6.1 10/18/80
	ex_v.c	6.1 10/18/80
	ex_vadj.c	6.2 10/23/80
	ex_vget.c	6.2 10/23/80
	ex_vmain.c	6.2 10/23/80
	ex_voper.c	6.2 10/23/80
	ex_vops.c	6.3 10/23/80
	ex_vops2.c	6.2 10/23/80
	ex_vops3.c	6.2 10/23/80
	ex_vput.c	6.1 10/18/80
	ex_vwind.c	6.1 10/18/80
	 printf.c:2.2 6/5/79
	printf.c	6.1 10/18/80
	bcopy.c	6.1 10/18/80



More information about the Comp.unix.wizards mailing list