from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

215481

userrating:


May 25th. 2007:
Words

486

Views

261904

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

154155

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





tcsetattr

Section: C Library Functions (3)
Updated: 202-0-02
Index Return to Main Contents
 

NAME

tcgetattr, tcsetattr - get and set terminal attributes  

LIBRARY

Standard C library (libc,~-lc)  

SYNOPSIS

#include <termios.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
              const struct termios *termios_p);
 

DESCRIPTION

tcgetattr() gets the parameters associated with the object referred by fd, and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process. tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:
TCSANOW
the change occurs immediately.
TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.
TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.
 

RETURN VALUE

0
on success.
-1
on failure and set errno to indicate the error.
 

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
tcgetattr(), tcsetattr() Thread safetyM-Safe
 

STANDARDS

POSIX.-2008.  

HISTORY

POSIX.-2001.  

CAVEATS

tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes, it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.  

SEE ALSO

termios(3type), termios(7)


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
ATTRIBUTES
STANDARDS
HISTORY
CAVEATS
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 13.0 ms