Article View: comp.bugs.sys5
Article #71Bug/Problems with SVR3.2 ldterm streams module
From: 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
Technical Details
Message-ID:
<5746@b11.ingr.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!ingr!b11!linwoodShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!ingr!b11!linwood From: linwood@b11.ingr.com (Linwood Varney) Newsgroups: comp.bugs.sys5 Subject: Bug/Problems with SVR3.2 ldterm streams module Keywords: streams ldterm module Message-ID: <5746@b11.ingr.com> Date: 20 Aug 89 08:14:17 GMT Reply-To: linwood@b11.UUCP (Linwood Varney) Organization: Intergraph Corp. Huntsville, AL Lines: 45