Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stty: tcgetattr: Not a typewriter

Status
Not open for further replies.

d3funct

MIS
Jul 13, 2000
313
US
I'm running AIX 5.2 ML4 on a P-series Regatta and was having performance issues so I ran perfpmr.sh on it. As the program ran I kept getting "stty: tcgetattr: Not a typewriter" messages, this did not stop the program and is more of an annoyance but I was wondering what it meant and how do I stop it. I also get the message if I type "echo 'y' |logform /dev/{jfs2log name here}" on the command line, but if I do "logform /dev/{jfs2log name here}" and then just type 'y' to answer the question I don't get the message. Any ideas?

There are 10 types of people in the world: those who understand binary, and those who don't.
 
Technical Reference: Base Operating System and Extensions, Volume 2
tcgetattr Subroutine

Purpose

Gets terminal state.
Library

Standard C Library (libc.a)
Syntax

#include <termios.h>

int tcgetattr ( FileDescriptor, TermiosPointer)
int FileDescriptor;
struct termios *TermiosPointer;
Description

The tcgetattr subroutine gets the parameters associated with the object referred to by the FileDescriptor parameter and stores them in the termios structure referenced by the TermiosPointer parameter. This subroutine is allowed from a background process; however, the terminal attributes may subsequently be changed by a foreground process.

Whether or not the terminal device supports differing input and output baud rates, the baud rates stored in the termios structure returned by the tcgetattr subroutine reflect the actual baud rates, even if they are equal.
Note:
If differing baud rates are not supported, returning a value of 0 as the input baud rate is obsolete.
Parameters

FileDescriptor Specifies an open file descriptor.
TermiosPointer Points to a termios structure.
Return Values

Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
Error Codes

The tcgetattr subroutine is unsuccessful if one of the following is true:
EBADF The FileDescriptor parameter does not specify a valid file descriptor.
ENOTTY The file associated with the FileDescriptor parameter is not a terminal.
Examples

To get the current terminal state information, enter:

rc = tcgetattr(stdout, &my_termios);

Related Information

The tcsetattr (tcsetattr Subroutine) subroutine.

The Input and Output Handling Programmer's Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top