The UNIX Operating System CHAPTER1

Total Page:16

File Type:pdf, Size:1020Kb

The UNIX Operating System CHAPTER1 6728_shah_01_cc.qxd 4/13/00 12:19 PM Page 1 PARTONE Know Your NT System 6728_shah_01_cc.qxd 4/13/00 12:19 PM Page 2 6728_shah_01_cc.qxd 4/13/00 12:19 PM Page 3 CHAPTER1 The UNIX Operating System nd on the 6.9th day, He created UNIX. Before we jump onto the trampoline of delights that is the process of A integrating UNIX and Windows 2000, we first need a stable position to jump from. In this respect, we begin by a succinct introduction to UNIX. It’s not that we don’t think you already know all there is to know about it, but we want to give comparable concepts between the two operating systems, so that when we begin talking about Windows 2000, you will understand what we mean. This isn’t an utter, complete, comprehensive, all-encompassing, every- bit-about-everything review of UNIX, only most of the basic ideas on how the system works and runs. It tries not to go too much into the pro- gramming depths of the operating system (OS), but then if you were interested in that, you’d be reading a hardcore book on the internals of UNIX instead. It also cannot cover every tool and command that is avail- able in UNIX across all the versions because of the years of variations between them. What’s more, we expect that you may have a bit of expe- rience with UNIX as it is. What this book will give you is a working understanding of how UNIX runs so that you can compare it against the Windows 2000 architecture. 3 6728_shah_01_cc.qxd 4/13/00 12:19 PM Page 4 4 UNIX AND WINDOWS 2000 INTEGRATION TOOLKIT UNIX Alive! UNIX is undoubtedly one of the most resilient operating systems ever. It is also the only operating system still in wide commercial use that’s almost 30 years old. It has evolved over the years to take advantage of new ideas in computer science as well as new hardware technology. Yet, there are ideas and concepts in UNIX that its progenitors could point to and see similarities in since its first inception. Today, UNIX can be seen running in the largest massively parallel computers in the world, as well as some of the smallest handheld devices. What we really see is not one operating system but a whole family of them, running on different processor types and system motherboards, and with different capabili- ties. And all it took to start the whole shebang was one idle programmer who wanted to play a game of Space Travel. UNIX Operating System Layers The UNIX operating system is layered like most others and was one of the first to introduce a separation between the kernel and the user space (see Figure 1.1). Essentially, the model is like a cross-section of a peanut. At the very center is the kernel, which constitutes the core components of Shell scripts User-mode system applications All user applications (shells, X Windows, (login, syslog, NFS, init, inetd, etc.) editors, games, developer tools, etc.) Standard System Libraries Shared or dynamically User space loadable Libraries Network Memory Processes and File system I/O processing protocols and Kernel space management threads communications Block and character device driver interfaces, STREAMS driver interface Device drivers Hardware Figure 1.1 The UNIX operating system layers, generalized. 6728_shah_01_cc.qxd 4/13/00 12:19 PM Page 5 The UNIX Operating System 5 UNIX in Retrovision In the summer of 1969 when Ken Thompson’s wife was away for vacation at her parents’ place, he sat down to build a toy on a Digital Equipment Corporation PDP-7. He had been working on the large computer development effort at Bell Labs known as the Multiplexed Information and Computing Service (MULTICS), which had recently been put to bed as a misadvised technical nightmare. But thankfully, our hero found better use of his time, working on his own pet operating systems project, known amusingly as UNICS. Soon others at Bell Labs, like Dennis Ritchie, who thought it a surprisingly impressive toy, joined in the project and began expanding it and bringing it to more modern machines like the PDP-11 series, and in the process created another little gem known as the C programming language. In 1974, when Thompson and Ritchie published their paper on UNIX in the pro- fessional journal Communications of the ACM, they received a great deal of attention from universities across the United States that also had PDP-11 series computers. AT&T soon licensed copies of this new OS to most of them for a fee. The first standard version came out as UNIX V6, named after the sixth edition of the UNIX Programmer’s Manual. This is where it begins to break up. The popularity was so overwhelming that several academic groups decided to enhance it with their own versions. The first two derivatives were XENIX and BSD. The former eventually went on to become SCO UNIX, and the latter can still be seen in FreeBSD, NetBSD, and all its derivatives. The University of California at Berkeley was primarily responsible for the Berkeley Systems Design (BSD) version. Other UNIX legendaries like Bill Joy, Kirk McKusick, and Rob Kolstad joined the BSD group over time to develop several versions. The BSD group also was the first introduce the TCP/IP protocol into UNIX, and created the standard communications model known as sockets. For the longest time this had stabilized into version 4.2 and then 4.3, and several compa- nies licensed this code to make their own operating systems, including Digital Ultrix and Sun Microsystems’ SunOS. On the commercial front, AT&T still owned the license and continued to develop its version of the standard, which split off after Version 8 and rejoined with several of the other UNIX efforts to eventually become System V Release 3. The last improvement to this was released as UNIX System Version 4. Today, com- mercial and noncommercial UNIX operating systems such as Sun Solaris, SGI IRIX, IBM AIX, Compaq Tru64 UNIX, SCO UnixWare, FreeBSD, and NetBSD are actually a combination of features from both these lineages. There have been attempts to merge or submerge the various different versions of UNIX, but pretty much through and through both BSD and System V have continues 6728_shah_01_cc.qxd 4/13/00 12:19 PM Page 6 6 UNIX AND WINDOWS 2000 INTEGRATION TOOLKIT UNIX in Retrovision (Continued) survived to the end. Most commercial UNIX from large vendors is still based on the System V model, although there have been so many changes, everyone has given up the pretense that they are compatible. Development now continues along the lines of each of these products through their respective vendors and developer communities, although there continue to be private individuals and groups working on the next best UNIX. The official UNIX standard is now in the hands of the Open Group (www .opengroup.org), an independent nonprofit organization. It was sold by AT&T to No- vell in the early 1990s, then by Novell to SCO, and then was handed over to the group. SCO’s UnixWare (formerly Novell’s and AT&T’s) is closest in specification to the official UNIX 98 standard, but then again, the standard is mostly a list of supported APIs and command tools. You want to know something really bizarre? By the definition and product testing of the Open Group, a number of other operating system platforms can also legally be called UNIX, including the IBM OS/390 running on mainframes (the same ones UNIX fought against decades ago) and another product called Interix from Softway Systems that—get this—actually runs on top of Windows NT! In any case, independent development of UNIXlike platforms never ceases. One famous example today is Linux. Back in 1991, a Finnish developer decided to put his free time into making a completely new version of UNIX, which borrowed the ideas but not the code and intellectual property of UNIX. Soon, Linus Torsvald and his friends combined their efforts with others across the Internet to build on this version, called Linux. It was picked up by enthusiasts everywhere, and today there are an estimated 7 million Linux users. A number of companies offer differ- ent distributions of Linux for sale for the packaging, not the actual OS itself. In recent years, Linux has become the best-selling OS from the UNIX-like group of operating systems, and continues to be so because of its model of open source contribution in which anyone is allowed to see, modify, and release versions of the operating system without any need for a license fee. The fact that it has a free license makes it very appealing to individuals and companies alike. Development of Linux is still controlled by Linus and his core developers, but most releases come packaged from organizations such as Red Hat, Debian, Caldera, SuSE, and TurboLinux. the operating system. Wrapped around this are other layers, which build up the applications and tools, and covered at the very outside is the shell, the environment that the users interact with. Although the original OS model was a monolithic design in which all kernel operations were combined together into the same 6728_shah_01_cc.qxd 4/13/00 12:19 PM Page 7 The UNIX Operating System 7 executive, today there are microkernel versions of the operating system as well, separating each component, such as memory management, file systems, input/output (I/O) processing, and so forth, into separately loadable kernel components.
Recommended publications
  • Digital Technical Journal, Number 3, September 1986: Networking
    Netwo;king Products Digital TechnicalJournal Digital Equipment Corporation Number 3 September I 986 Contents 8 Foreword William R. Johnson, Jr. New Products 10 Digital Network Architecture Overview Anthony G. Lauck, David R. Oran, and Radia J. Perlman 2 5 PerformanceAn alysis andModeling of Digital's Networking Architecture Raj Jain and William R. Hawe 35 The DECnetjSNA Gateway Product-A Case Study in Cross Vendor Networking John P:.. �orency, David Poner, Richard P. Pitkin, and David R. Oran ._ 54 The Extended Local Area Network Architecture and LANBridge 100 William R. Hawe, Mark F. Kempf, and Alan). Kirby 7 3 Terminal Servers on Ethernet Local Area Networks Bruce E. Mann, Colin Strutt, and Mark F. Kempf 88 The DECnet-VAXProduct -A n IntegratedAp proach to Networking Paul R. Beck and James A. Krycka 100 The DECnet-ULTRIXSoftware John Forecast, James L. Jackson, and Jeffrey A. Schriesheim 108 The DECnet-DOS System Peter 0. Mierswa, David). Mitton, and Ma�ha L. Spence 117 The Evolution of Network Management Products Nancy R. La Pelle, Mark). Seger, and Mark W. Sylor 129 The NMCCjDECnet Monitor Design Mark W. Sylor 1 Editor's Introduction The paper by Bill Hawe, Mark Kempf, and AI Kirby reports how studies of potential new broad­ band products led to the development of the Extended LAN Architecture. The design of the LANBridge 100, the first product incorporating that architecture, is described, along with the trade-offs made to achieve high performance. The speed of communication between terminals and systems depends on how they are connected. Bruce Mann, Colin Strutt, and Mark Kempf explain how they developed the LAT protocol to connect terminals to hosts on an Ethernet.
    [Show full text]
  • Name Description Files Notes See Also Colophon
    PTS(4) Linux Programmer’sManual PTS(4) NAME ptmx, pts − pseudoterminal master and slave DESCRIPTION The file /dev/ptmx is a character file with major number 5 and minor number 2, usually with mode 0666 and ownership root:root. It is used to create a pseudoterminal master and slave pair. When a process opens /dev/ptmx,itgets a file descriptor for a pseudoterminal master (PTM), and a pseu- doterminal slave (PTS) device is created in the /dev/pts directory.Each file descriptor obtained by opening /dev/ptmx is an independent PTM with its own associated PTS, whose path can be found by passing the file descriptor to ptsname(3). Before opening the pseudoterminal slave,you must pass the master’sfile descriptor to grantpt(3) and un- lockpt(3). Once both the pseudoterminal master and slave are open, the slave provides processes with an interface that is identical to that of a real terminal. Data written to the slave ispresented on the master file descriptor as input. Data written to the master is presented to the slave asinput. In practice, pseudoterminals are used for implementing terminal emulators such as xterm(1), in which data read from the pseudoterminal master is interpreted by the application in the same way a real terminal would interpret the data, and for implementing remote-login programs such as sshd(8), in which data read from the pseudoterminal master is sent across the network to a client program that is connected to a terminal or terminal emulator. Pseudoterminals can also be used to send input to programs that normally refuse to read input from pipes (such as su(1), and passwd(1)).
    [Show full text]
  • A Multiplatform Pseudo Terminal
    A Multi-Platform Pseudo Terminal API Project Report Submitted in Partial Fulfillment for the Masters' Degree in Computer Science By Qutaiba Mahmoud Supervised By Dr. Clinton Jeffery ABSTRACT This project is the construction of a pseudo-terminal API, which will provide a pseudo-terminal interface access to interactive programs. The API is aimed at developing an extension to the Unicon language to allow Unicon programs to easily utilize applications that require user interaction via a terminal. A pseudo-terminal is a pair of virtual devices that provide a bidirectional communication channel. This project was constructed to enable an enhancement to a collaborative virtual environment, because it will allow external tools such to be utilized within the same environment. In general the purpose of this API is to allow the UNICON runtime system to act as the user via the terminal which is provided by the API, the terminal is in turn connected to a client process such as a compiler, debugger, or an editor. It can also be viewed as a way for the UNICON environment to control and customize the input and output of external programs. Table of Contents: 1. Introduction 1.1 Pseudo Terminals 1.2 Other Terminals 1.3 Relation To Other Pseudo Terminal Applications. 2. Methodology 2.1 Pseudo Terminal API Function Description 3. Results 3.1 UNIX Implementation 3.2 Windows Implementation 4. Conclusion 5. Recommendations 6. References Acknowledgments I would like to thank my advisor, Dr. Clinton Jeffery, for his support, patience and understanding. Dr. Jeffery has always been prompt in delivering and sharing his knowledge and in providing his assistance.
    [Show full text]
  • Openextensions POSIX Conformance Document
    z/VM Version 7 Release 1 OpenExtensions POSIX Conformance Document IBM GC24-6298-00 Note: Before you use this information and the product it supports, read the information in “Notices” on page 73. This edition applies to version 7, release 1, modification 0 of IBM z/VM (product number 5741-A09) and to all subsequent releases and modifications until otherwise indicated in new editions. Last updated: 2018-09-12 © Copyright International Business Machines Corporation 1993, 2018. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents List of Tables........................................................................................................ ix About This Document............................................................................................xi Intended Audience......................................................................................................................................xi Conventions Used in This Document.......................................................................................................... xi Where to Find More Information.................................................................................................................xi Links to Other Documents and Websites.............................................................................................. xi How to Send Your Comments to IBM....................................................................xiii Summary of Changes for z/VM
    [Show full text]
  • 1.0', Packages=['Tester'], Install Requires=['Invoke'], Entry Points={ 'Console Scripts':['Tester = Tester.Main:Program.Run'] } )
    Invoke Release Jan 10, 2020 Contents 1 Getting started 3 1.1 Getting started..............................................3 2 The invoke CLI tool 9 2.1 inv[oke] core usage..........................................9 3 Concepts 13 3.1 Configuration............................................... 13 3.2 Invoking tasks.............................................. 19 3.3 Using Invoke as a library......................................... 28 3.4 Loading collections........................................... 32 3.5 Constructing namespaces........................................ 33 3.6 Testing Invoke-using codebases..................................... 39 3.7 Automatically responding to program output.............................. 41 4 API 43 4.1 __init__ ................................................ 43 4.2 collection .............................................. 43 4.3 config ................................................. 46 4.4 context ................................................ 52 4.5 exceptions .............................................. 56 4.6 executor ................................................ 59 4.7 loader ................................................. 61 4.8 parser ................................................. 61 4.9 program ................................................ 65 4.10 runners ................................................ 68 4.11 tasks .................................................. 76 4.12 terminals ............................................... 79 4.13 util ..................................................
    [Show full text]
  • Building Embedded Linux Systems ,Roadmap.18084 Page Ii Wednesday, August 6, 2008 9:05 AM
    Building Embedded Linux Systems ,roadmap.18084 Page ii Wednesday, August 6, 2008 9:05 AM Other Linux resources from O’Reilly Related titles Designing Embedded Programming Embedded Hardware Systems Linux Device Drivers Running Linux Linux in a Nutshell Understanding the Linux Linux Network Adminis- Kernel trator’s Guide Linux Books linux.oreilly.com is a complete catalog of O’Reilly’s books on Resource Center Linux and Unix and related technologies, including sample chapters and code examples. ONLamp.com is the premier site for the open source web plat- form: Linux, Apache, MySQL, and either Perl, Python, or PHP. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit con- ferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. main.title Page iii Monday, May 19, 2008 11:21 AM SECOND EDITION Building Embedded Linux SystemsTomcat ™ The Definitive Guide Karim Yaghmour, JonJason Masters, Brittain Gilad and Ben-Yossef, Ian F. Darwin and Philippe Gerum Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Building Embedded Linux Systems, Second Edition by Karim Yaghmour, Jon Masters, Gilad Ben-Yossef, and Philippe Gerum Copyright © 2008 Karim Yaghmour and Jon Masters.
    [Show full text]
  • UNIX System Services Z/OS Version 1 Release 7 Implementation
    Front cover UNIX System Services z/OS Version 1 Release 7 Implementation z/OS UNIX overview z/OS UNIX setup z/OS UNIX usage Paul Rogers Theodore Antoff Patrick Bruinsma Paul-Robert Hering Lutz Kühner Neil O’Connor Lívio Sousa ibm.com/redbooks International Technical Support Organization UNIX System Services z/OS Version 1 Release 7 Implementation March 2006 SG24-7035-01 Note: Before using this information and the product it supports, read the information in “Notices” on page xiii. Second Edition (March 2006) This edition applies to Version 1 Release 7 of z/OS (5637-A01), and Version 1, Release 7 of z/OS.e (5655-G52), and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2003, 2006. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xiii Trademarks . xiv Preface . .xv The team that wrote this redbook. .xv Become a published author . xvi Comments welcome. xvii Chapter 1. UNIX overview. 1 1.1 UNIX fundamentals . 2 1.1.1 UNIX objectives . 2 1.1.2 What people like about UNIX . 2 1.1.3 What people don’t like about UNIX . 3 1.1.4 UNIX operating system . 3 1.1.5 UNIX file system . 4 1.1.6 Parameter files . 6 1.1.7 Daemons. 6 1.1.8 Accessing UNIX . 6 1.1.9 UNIX standards. 7 1.1.10 MVS and UNIX functional comparison . 8 1.2 z/OS UNIX System Services fundamentals .
    [Show full text]
  • NSWI 0138: Advanced Unix Programming
    NSWI 0138: Advanced Unix programming (c) 2011-2016 Vladim´ırKotal (c) 2009-2010 Jan Pechanec, Vladim´ırKotal SISAL MFF UK, Malostransk´en´am.25, 118 00 Praha 1 Charles University Czech Republic Vladim´ırKotal [email protected] March 10, 2016 1 Vladim´ırKotal NSWI 0138 (Advanced Unix programming) Contents 1 Overview 5 1.1 What is this lecture about? . .5 1.2 The lecture will cover... .5 1.3 A few notes on source code files . .6 2 Testing 6 2.1 Why?...........................................6 2.2 When ? . .6 2.3 Types of testing . .7 3 Debugging 8 3.1 Debuging in general . .8 3.2 Observing . .9 3.3 Helper tools . .9 3.3.1 ctags . .9 3.3.2 cscope . 10 3.3.3 OpenGrok . 11 3.3.4 Other tools . 11 3.4 Debugging data . 11 3.4.1 stabs . 11 3.4.2 DWARF . 12 3.4.3 CTF (Compact C Type Format) . 12 3.5 Resource leaks . 13 3.6 libumem . 13 3.6.1 How does libumem work . 14 3.6.2 Using libumem+mdb to find memory leaks . 14 3.6.3 How does ::findleaks work . 16 3.7 watchmalloc . 17 3.8 Call tracing . 18 3.9 Using /proc . 19 3.10 Debugging dynamic libraries . 20 3.11 Debuggers . 20 3.12 Symbol search and interposition . 20 3.13 dtrace . 21 4 Terminals 21 4.1 Terminal I/O Overview . 21 4.2 Terminal I/O Overview (cont.) . 22 4.3 Physical (Hardware) Terminal . 24 4.4 stty(1) command . 24 4.5 TTY Driver Connected To a Phy Terminal .
    [Show full text]
  • Greg Kroah-Hartman [email protected] Github.Com/Gregkh/Presentation-Kdbus
    kdbus IPC for the modern world Greg Kroah-Hartman [email protected] github.com/gregkh/presentation-kdbus Interprocess Communication ● signal ● synchronization ● communication standard signals realtime The Linux Programming Interface, Michael Kerrisk, page 878 POSIX semaphore futex synchronization named eventfd unnamed semaphore System V semaphore “record” lock file lock file lock mutex threads condition variables barrier read/write lock The Linux Programming Interface, Michael Kerrisk, page 878 data transfer pipe communication FIFO stream socket pseudoterminal POSIX message queue message System V message queue memory mapping System V shared memory POSIX shared memory shared memory memory mapping Anonymous mapping mapped file The Linux Programming Interface, Michael Kerrisk, page 878 Android ● ashmem ● pmem ● binder ashmem ● POSIX shared memory for the lazy ● Uses virtual memory ● Can discard segments under pressure ● Unknown future pmem ● shares memory between kernel and user ● uses physically contigous memory ● GPUs ● Unknown future binder ● IPC bus for Android system ● Like D-Bus, but “different” ● Came from system without SysV types ● Works on object / message level ● Needs large userspace library ● NEVER use outside an Android system binder ● File descriptor passing ● Used for Intents and application separation ● Good for small messages ● Not for streams of data ● NEVER use outside an Android system QNX message passing ● Tight coupling to microkernel ● Send message and control, to another process ● Used to build complex messages
    [Show full text]
  • Openvms I/O User's Reference Manual
    OpenVMS I/O User’s Reference Manual Order Number: AA–PV6SD–TK April 2001 This manual contains the information necessary to interface directly with the I/O device drivers supplied as part of the Compaq OpenVMS operating system. Several examples of programming techniques are included. This document does not contain information on I/O operations using the OpenVMS Record Management Services. Revision/Update Information: This manual supersedes the OpenVMS I/O User’s Reference Manual, OpenVMS Alpha Version 7.2, OpenVMS VAX Version 7.2 Software Version: OpenVMS Alpha Version 7.3 OpenVMS VAX Version 7.3 Compaq Computer Corporation Houston, Texas © 2001 Compaq Computer Corporation Compaq, VAX, VMS, and the Compaq logo Registered in U.S. Patent and Trademark Office. OpenVMS and Tru64 are trademarks of Compaq Information Technologies Group, L.P in the United States and other countries. Microsoft, MS-DOS, Visual C++, Windows, and Windows NT are trademarks of Microsoft Corporation in the United States and other countries. Intel, Intel Inside, and Pentium are trademarks of Intel Corporation in the United States and other countries. Motif, OSF/1, and UNIX are trademarks of The Open Group in the United States and other countries. All other product names mentioned herein may be trademarks of their respective companies. Confidential computer software. Valid license from Compaq required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. Compaq shall not be liable for technical or editorial errors or omissions contained herein.
    [Show full text]
  • Linux-FAQ.Pdf
    The Linux FAQ David C. Merrill david −AT− lupercalia.net 2003−09−19 Revision History Revision 1.20 2001−12−04 Revised by: rk Revision 2.0 2002−04−25 Revised by: dcm Some reorganization and markup changes. Revision 2.1 2003−05−19 Revised by: dcm Fairly complete reorganization and conversion to WikiText. Revision 2.1.1 2003−09−19 Revised by: dcm Minor corrections. Revision 2.1.2 2004−02−28 Revised by: dcm Minor corrections. This is the list of Frequently Asked Questions for Linux, the Free/Open Source UNIX−like operating system kernel that runs on many modern computer systems. The Linux FAQ Table of Contents 1. Introduction.....................................................................................................................................................1 1.1. About the FAQ..................................................................................................................................1 1.2. Asking Questions and Sending Comments.......................................................................................1 1.3. Authorship and Acknowledgments...................................................................................................1 1.4. Copyright and License......................................................................................................................2 1.5. Disclaimer.........................................................................................................................................2 2. General Information.......................................................................................................................................3
    [Show full text]
  • Name Description Files
    PTY(7) Linux Programmer’sManual PTY(7) NAME pty − pseudoterminal interfaces DESCRIPTION Apseudoterminal (sometimes abbreviated "pty") is a pair of virtual character devices that provide a bidirec- tional communication channel. One end of the channel is called the master;the other end is called the slave.The slave end of the pseudoterminal provides an interface that behavesexactly likeaclassical termi- nal. A process that expects to be connected to a terminal, can open the slave end of a pseudoterminal and then be drivenbyaprogram that has opened the master end. Anything that is written on the master end is provided to the process on the slave end as though it was input typed on a terminal. Forexample, writing the interrupt character (usually control-C) to the master device would cause an interrupt signal (SIGINT)to be generated for the foreground process group that is connected to the slave.Conversely,anything that is written to the slave end of the pseudoterminal can be read by the process that is connected to the master end. Pseudoterminals are used by applications such as network login services (ssh(1), rlogin(1), telnet(1)), terminal emulators such as xterm(1), script(1), screen(1), tmux(1), unbuffer(1), and expect(1). Data flowbetween master and slave ishandled asynchronously,much likedata flowwith a physical termi- nal. Data written to the slave will be available at the master promptly,but may not be available immedi- ately.Similarly,there may be a small processing delay between a write to the master,and the effect being visible at the slave. Historically,two pseudoterminal APIs have evolved: BSD and System V.SUSv1 standardized a pseudoter- minal API based on the System V API, and this API should be employed in all newprograms that use pseu- doterminals.
    [Show full text]