Linux and UNIX Man Pages

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

TTY(4)							     Linux Programmer's Manual							    TTY(4)

tty - controlling terminal DESCRIPTION
The file /dev/tty is a character file with major number 5 and minor number 0, usually of mode 0666 and root.tty. It is a syn- onym for the controlling terminal of a process, if any. In addition to the ioctl() requests supported by the device that tty refers to, the following ioctl() request is supported: TIOCNOTTY Detach the current process from its controlling terminal, and remove it from its current process group, without attaching it to a new process group (that is, set its process group ID to zero). This ioctl() call only works on file descriptors connected to /dev/tty; this is used by daemon processes when they are invoked by a user at a terminal. The process attempts to open /dev/tty; if the open succeeds, it detaches itself from the terminal by using TIOCNOTTY, while if the open fails, it is obviously not attached to a terminal and does not need to detach itself. FILES
/dev/tty SEE ALSO
mknod(1), chown(1), getty(1), termios(3), console(4), ttys(4) Linux 1992-01-21 TTY(4)
Man Page

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