DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦706d05243⟧ TextFile

    Length: 1792 (0x700)
    Types: TextFile
    Notes: UNIX file
    Names: »bug.al«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »frankh/BUGS/bug.al« 

TextFile

To: Paul Higginbottom (wc)				4 July 1985

Cc: Gerard Bucas (wc)
    Charles Card (wc)
    Deitmar Peix	

From: Frank Hughes

Subject: Changes to async line driver.


 There is a bug(?) in the async line driver. If a terminal is unplugged
while a process is running, the process is killed. This is caused by the
Z8030 sensing a BREAK condition when the receive data line goes low.

 Also, if a terminal is being used, the BREAK key will abort a process
at ANY time and is non-maskable. As an example, if one is using emacs
and the BREAK key is accidentally pressed, emacs aborts without saving
the current text buffer or resetting the tty parameters of the line.
This leaves the async line in a bad state that doesn't respond to a CR.
( However, CTRL-j (LF) is accepted as newline and one can use stty to
return the tty to a usable state.)

The async driver, al.c, found in /usr/sys/z8001/drv. A routine, alESintr(),
appears below. If the section of code delimited by '>>>' and '<<<'
is removed, the problem will be fixed.

Norm at MWC has already been informed about this.




					Frank Hughes 
\f


/*
 * External status interrupt handler for the SCC. The handler is called
 * upon changes in the DCD or CTS modem control lines, or upon a break
 * (line spacing) condition on the Rx line. Note that this only applies
 * if the given line is opened (or attempting to be) with modem control
 * enabled.
 */

alESintr(id)
{
	.
	.	
	.
 	.

	what = inb(b+RR0);
	outb(b+WR0, RESEXTINT);
>>>	if ((what & BREAK) != 0) {
		inb(b+RR8);		/* read + dismiss */
		ttsignal(tp, SIGINT);
		ttflush(tp);
	} else {				<<<
		if ((tp->t_flags & T_MODC) == 1)
			if ((what & (DCD|CTS)) != 0) 
				if (tp->t_open == 0)
					wakeup((char *)(&tp->t_open));
	}
	spl(s);
	outb(b+WR0, RESIUS);		/* reset interrupt */
}