home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume1
/
8711
/
microemacs-3.9
/
ue3.9.bugs
/
comp.sources.bugs_252_000003.msg
< prev
next >
Wrap
Internet Message Format
|
1987-12-03
|
1KB
Path: tut!osu-cis!cbosgd!ihnp4!ptsfa!ames!amdcad!sun!pitstop!sundc!seismo!uunet!nuchat!sugar!karl
From: karl@sugar.UUCP (Karl Lehenbauer)
Newsgroups: comp.sources.bugs
Subject: Re: MicroEMACS works but eats CPU on SysV
Summary: System V uEMACS CPU hogging bug squished
Keywords: MicroEMACS, Microport, USG
Message-ID: <1118@sugar.UUCP>
Date: 26 Nov 87 05:04:18 GMT
References: <1107@sugar.UUCP>
Organization: Sugar Land UNIX - Houston, TX
Lines: 21
In article <1107@sugar.UUCP>, I wrote about an apparent problem with
uEMACS under Unix System V. I dug around and found that they do an
fcntl to set read with no delay as a means of getting typeahead in
order to figure out to cancel output in progress. I'm not 100%
sure that's their object, but that's what it looks like.
Anyway, there's a variable, kbdpoll, which is set to TRUE to indicate
that the input has been set to no delay, O_NDELAY, via fcntl.
When 'typahead' is called, if kbdpoll isn't set, typahead sets it and
calls fcntl with O_NDELAY so it can do the read without wait. When
'ttgetc' is called to get a character in the regular manner, if kbdpoll
is set, ttgetc does an fcntl to turn off O_NDELAY and clears kbdpoll.
The problem is that typahead doesn't set kbdpoll after setting O_NDELAY,
so ttgetc never knows to clear it, resulting in a no-delay loop doing
"while (read(0, &kbdq, 1) != 1);"
Here's the diff:
490a491
> kbdpoll = TRUE;
--