Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pty(4) [v7 man page]

PTY(4)							   BSD Kernel Interfaces Manual 						    PTY(4)

NAME
pty -- BSD-style compatibility pseudo-terminal driver SYNOPSIS
device pty DESCRIPTION
The pty driver provides support for the traditional BSD naming scheme that was used for accessing pseudo-terminals. When the device /dev/ptyXX is being opened, a new terminal shall be created with the pts(4) driver. A device node for this terminal shall be created, which has the name /dev/ttyXX. New code should not try to allocate pseudo-terminals using this interface. It is only provided for compatibility with older C libraries that tried to open such devices when posix_openpt(2) was being called. FILES
The BSD-style compatibility pseudo-terminal driver uses the following device names: /dev/pty[l-sL-S][0-9a-v] Pseudo-terminal master devices. /dev/tty[l-sL-S][0-9a-v] Pseudo-terminal slave devices. DIAGNOSTICS
None. SEE ALSO
posix_openpt(2), pts(4), tty(4) HISTORY
A pseudo-terminal driver appeared in 4.2BSD. BUGS
Unlike previous implementations, the master slave device nodes are destroyed when the PTY becomes unused. A call to stat(2) on a nonexistent master device will already cause a new master device node to be created. The master device can only be destroyed by opening and closing it. The pty driver cannot be unloaded, because it cannot determine if it is being used. BSD
August 20, 2008 BSD

Check Out this Related Man Page

PTY(4)							   BSD Kernel Interfaces Manual 						    PTY(4)

NAME
pty -- BSD-style compatibility pseudo-terminal driver SYNOPSIS
device pty DESCRIPTION
The pty driver provides support for the traditional BSD naming scheme that was used for accessing pseudo-terminals. When the device /dev/ptyXX is being opened, a new terminal shall be created with the pts(4) driver. A device node for this terminal shall be created, which has the name /dev/ttyXX. New code should not try to allocate pseudo-terminals using this interface. It is only provided for compatibility with older C libraries that tried to open such devices when posix_openpt(2) was being called. FILES
The BSD-style compatibility pseudo-terminal driver uses the following device names: /dev/pty[l-sL-S][0-9a-v] Pseudo-terminal master devices. /dev/tty[l-sL-S][0-9a-v] Pseudo-terminal slave devices. DIAGNOSTICS
None. SEE ALSO
posix_openpt(2), pts(4), tty(4) HISTORY
A pseudo-terminal driver appeared in 4.2BSD. BUGS
Unlike previous implementations, the master slave device nodes are destroyed when the PTY becomes unused. A call to stat(2) on a nonexistent master device will already cause a new master device node to be created. The master device can only be destroyed by opening and closing it. The pty driver cannot be unloaded, because it cannot determine if it is being used. BSD
August 20, 2008 BSD
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

terminal problem

Hi all While trying to upon a new window it is saying UNABLE TO GET PTY..what does this means how to solve it Thanks Prafulla (4 Replies)
Discussion started by: Prafulla
4 Replies

2. UNIX for Dummies Questions & Answers

redirecting one terminal into an other??

Hi guys; I want to show what am I doing on a terminal into another. I did something close but its not working really good. Example: cat /dev/pts/12 >/dev/pts/13 where 12 is my terminal and 13 its the other terminal. This is usefull for me to share my small unix knowledge to other people... (4 Replies)
Discussion started by: piltrafa
4 Replies

3. UNIX for Dummies Questions & Answers

what is /dev/pts/1

hi, i ran tty and get this /dev/pts/1? what does /dev/pts/1 indicates about my terminal and the device files? thanks (4 Replies)
Discussion started by: yls177
4 Replies

4. Programming

Pseudo Terminals

I need to spawn a number of foreground process by reading a configuration file. Each process needs some form of I/O. Hence I need to run it on different terminals. How it can be done programatically , i.e. , my module needs to find which terminal is not in use, then open it, execute the process... (2 Replies)
Discussion started by: S.P.Prasad
2 Replies

5. Programming

good example for pty usage ?

i am looking for a good example to explain *why* someone should use pty's. (3 Replies)
Discussion started by: grumpf
3 Replies

6. Programming

terminal device control through a C/C++ program

Hi, I want to fork a new process from a daemon that needs terminal attachment to some ttyN or pts/N device. Here is the code #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <string.h> int main(int... (5 Replies)
Discussion started by: ku@ntum
5 Replies

7. Shell Programming and Scripting

Pseudo code or description

hi I need a Pseudo code or a description of what a program is saying from this spec and code: Just so i can understand how this solution was achieved, thanks here is the spec: Specifications are as follows:- The books records are stored in one csv file and the layout and the contents... (7 Replies)
Discussion started by: ferrycorsten73
7 Replies

8. UNIX for Dummies Questions & Answers

Pseudo Terminal

How can i view what my colleague is doing in the terminal pts/1 while i have logged into terminal pts/2 ?? Both have remotely logged in via ssh. (4 Replies)
Discussion started by: proactiveaditya
4 Replies

9. UNIX for Dummies Questions & Answers

Msg before exiting pseudo-console

Hi! I want to display a message when I leave a pseudo-console (/dev/ptsX: konsole, xterm) e.g "Bye! There's still 3 pts open and 3 background processes" I can do it in login-terminals (via .bash_logout) but not in a non-login... Any ideas? (5 Replies)
Discussion started by: funyotros
5 Replies

10. UNIX for Dummies Questions & Answers

What are pseudo-tty devices? Is my /etc/securetty file contains any?

Hi , I have searched wiki for pseudo tty devices but it was very complex for me to understand. Can any one help me understanding concept behind pseudo-tty in layman language? According to security manual of our org /etc/securetty files shouldn't have any pseudo tty devices. i understand ttyX... (5 Replies)
Discussion started by: pinga123
5 Replies

11. Programming

questions about pseudo termial

I am studying APUE(advanced programming in the unix environment). I have read up to chapter19 pseudo terminal. I know that the pty is like a fake device for programs to direct STDIN and STDOUT to. But I don't know why we need it. Can someone tell me what is the use of pseudo terminal. Thanks. (4 Replies)
Discussion started by: tefino
4 Replies

12. Shell Programming and Scripting

Solaris Server dectects EMC dead path and send mail immediately

taus-itcapp1#powermt display dev=all Pseudo name=emcpower0a CLARiiON ID=APM00105201788 Logical device ID=60060160B2202B001094F0E0AF5CE011 state=alive; policy=CLAROpt; priority=0; queued-IOs=0; Owner: default=SP A, current=SP A Array failover mode: 1 ... (6 Replies)
Discussion started by: orafup
6 Replies

13. UNIX for Advanced & Expert Users

Unix terminal display related issue

Want few input related to unix environment and terminal settings: 1. Am trying to find a way to keep the unix terminal display intact even after opening and closing a vi/less file. Currently if I open a vim file in the unix terminal and then close the file,it displays the contents of vim file on... (4 Replies)
Discussion started by: talktovkjain
4 Replies

14. Shell Programming and Scripting

How to run .sh file in other script?

Hii friends, Actually, I am a beginner in shell scripting. I am trying to run a master .sh file. The master .sh file will open 2 different terminals and then run .sh file on first terminal, an executable file in second terminal. We, the beginners, can learn a lot if the "gurus" like you will... (6 Replies)
Discussion started by: sachinteotia
6 Replies

15. Shell Programming and Scripting

Redirecting terminal to variable

when i do something like this: bona=$(echo hi2 > /dev/pts/1 ; printf '%s\n' "" | sed '/^$/d') i get: hi2 and the $bona variable is empty, when I run: echo ${bona} i get the result "hi2" outside of the variable. I want it stored in the bona variable with nothing outputted to the... (6 Replies)
Discussion started by: SkySmart
6 Replies