Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

termios(3c) [opensolaris man page]

termios(3C)						   Standard C Library Functions 					       termios(3C)

NAME
termios - general terminal interface SYNOPSIS
#include <termios.h> int tcgetattr(int fildes, struct termios *termios_p); int tcsetattr(int fildes, int optional_actions, const struct termios *termios_p); int tcsendbreak(int fildes, int duration); int tcdrain(int fildes); int tcflush(int fildes, int queue_selector); int tcflow(int fildes, int action); speed_t cfgetospeed(const struct termios *termios_p); int cfsetospeed(struct termios *termios_p, speed_t speed); speed_t cfgetispeed(const struct termios *termios_p); int cfsetispeed(struct termios *termios_p, speed_t speed); #include <sys/types.h> #include <termios.h> pid_t tcgetpgrp(int fildes); int tcsetpgrp(int fildes, pid_t pgid); pid_t tcgetsid(int fildes); DESCRIPTION
These functions describe a general terminal interface for controlling asynchronous communications ports. A more detailed overview of the terminal interface can be found in termio(7I), which also describes an ioctl(2) interface that provides the same functionality. However, the function interface described by these functions is the preferred user interface. Each of these functions is now described on a separate manual page. SEE ALSO
ioctl(2), cfgetispeed(3C), cfgetospeed(3C), cfsetispeed(3C), cfsetospeed(3C), tcdrain(3C), tcflow(3C), tcflush(3C), tcgetattr(3C), tcgetp- grp(3C), tcgetsid(3C), tcsendbreak(3C), tcsetattr(3C), tcgetpgrp(3C), tcsendbreak(3C), termio(7I) SunOS 5.11 5 Apr 1996 termios(3C)

Check Out this Related Man Page

tcgetattr(3C)						   Standard C Library Functions 					     tcgetattr(3C)

NAME
tcgetattr - get the parameters associated with the terminal SYNOPSIS
#include <termios.h> int tcgetattr(int fildes, struct termios *termios_p); DESCRIPTION
The tcgetattr() function gets the parameters associated with the terminal referred to by fildes and stores them in the termios structure (see termio(7I)) referenced by termios_p. The fildes argument is an open file descriptor associated with a terminal. The termios_p argument is a pointer to a termios structure. The tcgetattr() operation is allowed from any process. If the terminal device supports different input and output baud rates, the baud rates stored in the termios structure returned by tcge- tattr() reflect the actual baud rates, even if they are equal. If differing baud rates are not supported, the rate returned as the output baud rate is the actual baud rate. If the terminal device does not support split baud rates, the input baud rate stored in the termios structure will be 0. RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The tcgetattr() function will fail if: EBADF The fildes argument is not a valid file descriptor. ENOTTY The file associated with fildes is not a terminal. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-------------------------------+ |Interface Stability |Standard | +-----------------------------+-------------------------------+ |MT-Level |MT-Safe, and Async-Signal-Safe | +-----------------------------+-------------------------------+ SEE ALSO
tcsetattr(3C), attributes(5), standards(5), termio(7I) SunOS 5.10 14 Aug 2002 tcgetattr(3C)
Man Page