[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is termio broken......?
From: |
Ulrich Drepper |
Subject: |
Re: Is termio broken......? |
Date: |
09 Jan 2001 19:57:15 -0800 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Capitol Reef) |
"Hankinson, Jeremy" <address@hidden> writes:
> When using the old style termio structure to control terminal
> behavior on RedHat 6.2, turning off ICANON (non canonical mode),
> should mean that you can control how functions like read() behave,
> buy setting termio.c_cc[VMIN] and termio.c_cc[VTIME]. However, the
> following code does not behave as expected;
Your code is broken:
> _tty.c_cc[VMIN] = 1; /* set min no. chars to 1 */
> _tty.c_cc[VTIME] = 1; /* timout = 0.1 secs */
This is modifying memory outside the data structure. struct termio's
c_cc field has only 8 elements. Your best bet is to use numeric
values. I don't think we'll add symbolic values for termio.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------