[net.emacs] bug in process.ml

hdj@burdvax.UUCP (06/02/83)

There is a subtle bug in the process.ml package involving sending 'eot's
to processes.   The error is in the function send-eot:

(defun
    (send-eot
	(if (eobp)
	    (eot-process (active-process))
	    (delete-next-character)
	)
    )
)

If you are running e.g. csh in a buffer, and type a ^D, (bound to send-eot),
the csh will die. Fine. But if you type another ^D while still in the
csh buffer, send-eot will kill some other process of yours.  This is easy
to fix: change (active-process) in send-eot to be (current-buffer-name).
Thus,

(defun
    (send-eot
	(if (eobp)
	    (eot-process (current-buffer-name))
	    (delete-next-character)
	)
    )
)

Frankly, I think the "if" jazz and the (delete-next-character) should be
taken out as well, but that's more a matter of taste.

			Herb Jellinek, burdvax!hdj