jreuter@cincy.UUCP (Jim Reuter) (02/14/84)
The reason System V (and System III and System whatever-else-Bell-sells) changes the EOF character is because of the raw-mode delays they added. When in raw mode in v7, every character coming in wakes up the process reading the line, which can swamp a system. System III and friends in raw mode have both a minimum-character threshold and a time threshold before waking up the reading process, the intent being a reduction of system load. Unfortunately, they decided to multiplex the character-count and time thresholds into already existing variables, namely the EOF and the BRK (I think) character. So, the ioctl code automatically sets these fields to the 'appropriate' values when switching between raw and cooked mode (ICANON mode for those systems). Assuming, of course, that you consider their canned values 'appropriate'. Don't hold me to the constant and variable names mentioned above, I don't have the stuff in front of me and it has been a while. Jim
guy@rlgvax.UUCP (Guy Harris) (02/17/84)
> System III and friends in raw mode have both a > minimum-character threshold and a time threshold before waking up > the reading process, the intent being a reduction of system load. > Unfortunately, they decided to multiplex the character-count and > time thresholds into already existing variables, namely the EOF and > the BRK (I think) character. So, the ioctl code automatically sets > these fields to the 'appropriate' values when switching between raw > and cooked mode (ICANON mode for those systems). The TCSETA ioctl code doesn't do this (so be warned - if you just turn off ICANON without fiddling VMIN/VEOF and VTIME/VEOL values, you may get a surprise), but the TIOCSETP "backward compatibility" ioctl (which is *not* backward compatible with V7, but with UNIX/TS 1.0, PWB/UNIX 2.0, etc.) does do it when entering/leaving RAW mode. The "stty" command also may be doing it. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy
stevel@haddock.UUCP (02/18/84)
#R:cincy:-117300:haddock:16700011:000:592 haddock!stevel Feb 17 12:56:00 1984 Switching to ICANON mode doesn't change the values it just uses the ones that are there. If you want to change the minimum number of characters (VMIN) or the timeout (VTIME) it just change the EOF or EOL characters. There are offset VMIN and VTIME but they go to the same place. I would use VMIN or VTIME when I meant to change there values, someday BELL might do it right. Steve Ludlum, decvax!yale-co!ima!stevel, {ucbvax|ihnp4}!cbosgd!ima!stevel decwrl!amd70!ima!stevel, {uscvax|ucla-vax|vortex}!ism780!stevel Interactive Systems, 7th floor, 441 Stuart st, Boston, MA 02116; 617-247-1155