[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


stty or gtty Subroutine

Purpose

Sets or gets terminal state.

Library

Standard C Library (libc.a)

Syntax

#include <sgtty.h>


stty ( FileDescriptor, Buffer)
int FileDescriptor;
struct sgttyb *Buffer;

gtty (FileDescriptor, Buffer)
int FileDescriptor;
struct sgttyb *Buffer;

Description

These subroutines have been made obsolete by the ioctl subroutine.

The stty subroutine sets the state of the terminal associated with the FileDescriptor parameter. The gtty subroutine retrieves the state of the terminal associated with FileDescriptor. To set the state of a terminal, the calling process must have write permission.

Use of the stty subroutine is equivalent to the ioctl (FileDescriptor, TIOSETP, Buffer) subroutine, while use of the gtty subroutine is equivalent to the ioctl (FileDescriptor, TIOGETP, Buffer) subroutine.

Parameters


FileDescriptor Specifies an open file descriptor.
Buffer Specifies the buffer.

Return Values

If the stty or gtty subroutine is successful, a value of 0 is returned. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The ioctl subroutine.

The Input and Output Handling Programmer's Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]