Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > S

stty(2)

TO BE OBSOLETED
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

stty(), gtty() — control terminal device (Bell Version 6 compatibility)

SYNOPSIS

#include <sgtty.h>

int stty(int fildes, const struct sgttyb *argp);

int gtty(int fildes, struct sgttyb *argp);

Remarks

These system calls are preserved for backward compatibility with Bell Version 6. They provide as close an approximation as possible to the old Version 6 functions. All new code should use the TCSETA and TCGETA ioctl() calls described in termio(7).

DESCRIPTION

For certain status settings and status inquiries about terminal devices, the functions stty() and gtty() are equivalent to

ioctl(fildes, TIOCSETP, argp)

and

ioctl(fildes, TIOCGETP, argp)

respectively (see ioctl(2) and termio(7).

RETURN VALUE

gtty() and stty() return the following values:

0

Successful completion.

-1

Failure. errno is set to indicate the error.

ERRORS

If gtty() or stty() fails, errno is set to one of the following values:

[EBADF]

fildes is not a valid file descriptor.

[EFAULT]

argp points to an invalid address.

WARNINGS

Obsolescent Interfaces

gtty() and stty() are to be obsoleted at a future date.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.