STTY(3) BSD Library Functions Manual STTY(3)NAME
stty, gtty -- set and get terminal state (defunct)
LIBRARY
Compatibility Library (libcompat, -lcompat)
SYNOPSIS
#include <sgtty.h>
stty(int fd, struct sgttyb *buf);
gtty(int fd, struct sgttyb *buf);
DESCRIPTION
These interfaces are obsoleted by ioctl(2). They are available from the compatibility library, libcompat.
The stty() function sets the state of the terminal associated with fd. The gtty() function retrieves the state of the terminal associated
with fd. To set the state of a terminal the call must have write permission.
The stty() call is actually 'ioctl(fd, TIOCSETP, buf)', while the gtty() call is 'ioctl(fd, TIOCGETP, buf)'. See ioctl(2) and tty(4) for an
explanation.
DIAGNOSTICS
If the call is successful 0 is returned, otherwise -1 is returned and the global variable errno contains the reason for the failure.
SEE ALSO ioctl(2), tty(4)HISTORY
The stty() and gtty() functions appeared in 4.2BSD.
BSD June 4, 1993 BSD
Check Out this Related Man Page
IOCTL(2) System Calls Manual IOCTL(2)NAME
ioctl, stty, gtty - control device
SYNOPSIS
#include <sgtty.h>
ioctl(fildes, request, argp)
struct sgttyb *argp;
stty(fildes, argp)
struct sgttyb *argp;
gtty(fildes, argp)
struct sgttyb *argp;
DESCRIPTION
Ioctl performs a variety of functions on character special files (devices). The writeups of various devices in section 4 discuss how ioctl
applies to them.
For certain status setting and status inquiries about terminal devices, the functions stty and gtty are equivalent to
ioctl(fildes, TIOCSETP, argp)
ioctl(fildes, TIOCGETP, argp)
respectively; see tty(4).
The following two calls, however, apply to any open file:
ioctl(fildes, FIOCLEX, NULL);
ioctl(fildes, FIONCLEX, NULL);
The first causes the file to be closed automatically during a successful exec operation; the second reverses the effect of the first.
SEE ALSO stty(1), tty(4), exec(2)DIAGNOSTICS
Zero is returned if the call was successful; -1 if the file descriptor does not refer to the kind of file for which it was intended.
BUGS
Strictly speaking, since ioctl may be extended in different ways to devices with different properties, argp should have an open-ended dec-
laration like
union { struct sgttyb ...; ... } *argp;
The important thing is that the size is fixed by `struct sgttyb'.
ASSEMBLER
(ioctl = 54.)
sys ioctl; fildes; request; argp
(stty = 31.)
(file descriptor in r0)
stty; argp
(gtty = 32.)
(file descriptor in r0)
sys gtty; argp
IOCTL(2)
Hi all
I am getting the following error when i execute my cronjob :
stty: : No such device or address
stty: : No such device or address
What could be the problem.
Thanks
Rahul (3 Replies)
I encoutered the error "stty: : No such device or address" in the korn shell script log. I added STTY EARSE ^H in profile. why iam i getting that error in Korn shell
Thanks
nandinisagar (6 Replies)
Hi,
I have an app that runs Oracle 8.1.7 residing on a AIX 4.3 ML 10 . preiodically app sends out a status log like the one displayed below. Lately I have noticed this stty:tcgetattr message in the log. Script that writes this output calls sqlplus, gets the required count and writes output to... (8 Replies)
Hi All,
I have been runing the same set of program using the same auto profile for an year.
Now when i run the same set of process , i getting the below error
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
ksh: jil: not found
ksh: sendevent: not found
logout... (4 Replies)
Hi,
I'm have a big problem with one of the C programs that I'm developping.
actually, I'm trying to monitor the users' session in solaris.
therefore, I have used the source code of the unix "script" command. but the problem is that, when i run that program, the stty settings are lost:
speed... (4 Replies)
Hello,
I'm trying to implement a script to call a third-party tool every so often and write the results to a file. If I run it interactively it works fine, but when it comes to run it out of a cronjob, I keep getting this error:
stty: tcgetattr: a specified file does not support the... (3 Replies)
I am having hard time understanding what this really do to the environment? I do understand this part "tty -s && stty " but not "istrip"
# stty command is executed only if a tty is attached to the process.
# stty istrip : Strip input characters to 7 bits
tty -s && stty istrip
I am... (3 Replies)
Hi all,
I have some trouble getting stty to talk to some serial/usb converter.
Getting minicom to work was however quite simple after I entered the following settings in addition to its standard-setup:
pu port /dev/ttyUSB0
pu baudrate 19200
pu bits 8
pu... (3 Replies)
I am wondering about the following:
stty columns 140
I have found that a number of times I need to set my display columns to a high number (such as 140) but I have to do this every time I login to use putty/ssh. Can we set this with an environmental variable so that it is permanent?
Also... (4 Replies)
I want to execute metasploit by two pipes to communicate with it, but I have troubles with that communication. When I run my program, I get this error: "stty: standard input: Inappropriate ioctl for device" and I don't receive the metasploit promt.
just select an exploit.
This is my code:... (2 Replies)
Hello friends, I am trying to communicate with a programmer memory from Unix (HP-UX) via serial port.
Well, I have some code ready stty parameters to achieve communicating the device with the computer, but I have my doubts. I would like to know if you have some code fragment where you use the... (5 Replies)
We are getting a following stty error when I am running a script.
stty: standard input: Inappropriate ioctl for device
I have some of following stty settings in my .profile. Tried other options still not able to fix it.
stty rows 40 cols 130 erase ^? intr ^C
export TERM=xterm
stty... (6 Replies)
Hi,
I'm writing a BBS terminal program. And have hit a major roadblock. My terminal works fine for every BBS out there, except Mystic BBSes. I've narrowed down the problem to the usage of the stty() command. The problem is so: I cannot use the arrow keys to select certain things on Mystic... (4 Replies)