Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #417
Difficulty: Medium
The terms Vanilla JavaScript and Vanilla JS refer to JavaScript which uses very small cookies during web sessions.
True or False?
Linux & Unix Commands - Search Man Pages

gtty(3c) [bsd man page]

STTY(3C)																  STTY(3C)

stty, gtty - set and get terminal state (defunct) SYNOPSIS
#include <sgtty.h> stty(fd, buf) int fd; struct sgttyb *buf; gtty(fd, buf) int fd; struct sgttyb *buf; DESCRIPTION
This interface is obsoleted by ioctl(2). Stty sets the state of the terminal associated with fd. Gtty 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) 4.2 Berkeley Distribution May 15, 1985 STTY(3C)

Check Out this Related Man Page

IOCTL(2)							System Calls Manual							  IOCTL(2)

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)

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers


what does shadowing a file means? for instance gtty process reads /etc/psswd file and "shadow" password file(if it exists). i.e whats the difference between reading it and shadowing. (2 Replies)
Discussion started by: a25khan
2 Replies

2. Programming

System programming in C

Hi there, Am very very interested in system level programming in C???? Please give me a good site or a sample program to start with.. will be of a great help to me.. Thanks, Nisha (7 Replies)
Discussion started by: Nisha
7 Replies

3. AIX

AIX SAN configuration problems/oddity

Hi, I have a strange problem. we're trying to connect an IBM pseries, to a Brocade switch, for SAN acess, using a badged emulex card, (IBM FC6239) WE can configure the device to see the fabric. The only problem we have is that the Brocade sees the HBA as storage, and not as a HBA. We've zoned... (1 Reply)
Discussion started by: praxis22
1 Replies

4. AIX

vterm not working

Dear all, This is my first post to the forum so hopefully I am doing this right. I have only several months experience with AIX and my previous unix experience has been BSDs and linux. I ran into some issues recently with the HMC vterm for one for the LPAR. There are two LPARs created on one... (1 Reply)
Discussion started by: chikhing
1 Replies

5. Red Hat

Minicom with VMWare ESX Server

Hello! I have an ESX Server up and running. Now I want to connect a serial device to the COM Port. For that I need the minicom program. When I try "configure - make - make all" I get some errors. Can someone please explain to me, what the problems are: # ./configure checking for a... (3 Replies)
Discussion started by: Kickbit
3 Replies

6. Programming

Top v3.7 and v3.8beta1 will not compile on Power7/AIX6.1 server.

Please help! We are upgrading our server to a new Power7/AIX6.1 from Power5/AIX5.3. I have some programs that rely on output of the TOP command to do various things, however, I keep getting an error when I try to re-compile TOP on my new server (see below). I have tried TOP 3.7 (current... (1 Reply)
Discussion started by: troym72
1 Replies

7. Red Hat

How to install expect after installing tcl on Redhat Linux

Hi, I have install tcl and then expect but I am getting below ouput while trying which expect which expect /usr/bin/which: no expect in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin) I have copied both in... (6 Replies)
Discussion started by: manish_1678
6 Replies

8. UNIX for Beginners Questions & Answers

NTP synchronised problem in our Centos 7.6 node

Someone, please help on this issue:- Note : for security reason i didn't mention hostnames and ips. ============================================================================== # ntpstat unsynchronised polling server every 1024 s Ntpstat showing unsynchronised. ... (29 Replies)
Discussion started by: shanmugaraj
29 Replies

Featured Tech Videos