|
Home > Archive > Unix Programming > April 2007 > termios attributes reset on close()?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
termios attributes reset on close()?
|
|
| Frank Cusack 2007-04-12, 1:19 am |
| after open(), tcsetattr() and close(), are terminal attributes reset for
the next open()? can anyone point to where this is documented?
thanks
-frank
| |
| Jens Thoms Toerring 2007-04-12, 7:21 am |
| Frank Cusack <fcusack@fcusack.com> wrote:
> after open(), tcsetattr() and close(), are terminal attributes reset for
> the next open()? can anyone point to where this is documented?
No, the attributes aren't "reset" to anything, they remain in the
state they were in at the close() call. I don't think it's docu-
mented but that would be redundant since there's also no documen-
tation about a "default" state - and without a default state there
is nothing they could be reset to (it would hardly make sense to
reset them to a certain state when that state isn't documented
and can vary from system to system).
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
| |
| Geoff Clare 2007-04-12, 1:45 pm |
| Frank Cusack <fcusack@fcusack.com> wrote, on Wed, 11 Apr 2007:
> after open(), tcsetattr() and close(), are terminal attributes reset for
> the next open()?
Some systems reset them, some don't. From memory, I think System V and
its derivatives reset the attributes, and Linux doesn't. Not sure
about the BSDs.
--
Geoff Clare <netnews@gclare.org.uk>
| |
| Bin Chen 2007-04-12, 1:45 pm |
| On 4=D4=C212=C8=D5, =C9=CF=CE=E711=CA=B140=B7=D6, Frank Cusack <fcus...@fcu=
sack.com> wrote:
> after open(), tcsetattr() and close(), are terminal attributes reset for
> the next open()? can anyone point to where this is documented?
>
IIRC, the temios can altered by tty driver whenever it want to. So
you'd better not rely on them.
|
|
|
|
|