Thread View: comp.bugs.sys5
1 messages
1 total messages
Started by Linwood Varney
Sun, 20 Aug 1989 08:14
Bug/Problems with SVR3.2 ldterm streams module
Author: Linwood Varney
Date: Sun, 20 Aug 1989 08:14
Date: Sun, 20 Aug 1989 08:14
45 lines
1939 bytes
1939 bytes
When entering RAW mode, depending on the setting of VMIN, ldterm
sends certain options to the stream head. It only sends these options
when entering RAW mode from CANON mode. If the value of VMIN is
changed to 0, without first going back to CANON mode, a read, which
should return immediately, will pend forever, because the stream head
has not been informed of the new settings.
The following change in ldtermioc() seems to fix the problem. It
forces ldterm to send new options to the stream head if the value of
VMIN changes while still in RAW mode.
if (CANON_MODE && !( cb->c_lflag & ICANON))
tp->lmode_flg = B_RAW;
else if (RAW_MODE && ( cb->c_lflag & ICANON ))
tp->lmode_flg = B_CANON;
/* --- Begin fix --- */
else if (V_MIN != cb->c_cc[VMIN] && (!V_MIN || !cb->c_cc[VMIN]))
tp->lmode_flg = B_RAW;
/* --- End of fix --- */
else
tp->lmode_flg = 0; /* no change. */
After applying this change, and running my program, my machine
promptly gave me a bizarre PANIC. After looking at the crash dump,
I discovered this in ldtermosrv():
if ( RAW_MODE && (char) V_MIN == 0 ) { /* handle only vmin = 0 case */
x=spltty();
.
.
.
}
splx(x);
If you do not go through the if statement, your spl is set to some random
value. The fix is to simply put the splx(x) inside the if statment.
- Linwood Varney Network Communications
linwood@ingr.com Intergraph Corp.
..!uunet!ingr!linwood Huntsville, AL
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads