home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6a 2e | 63 63 2e 70 75 72 64 75 |Path: j.|cc.purdu|
|00000010| 65 2e 65 64 75 21 6d 65 | 6e 74 6f 72 2e 63 63 2e |e.edu!me|ntor.cc.|
|00000020| 70 75 72 64 75 65 2e 65 | 64 75 21 70 75 72 64 75 |purdue.e|du!purdu|
|00000030| 65 21 62 75 2e 65 64 75 | 21 72 70 69 21 7a 61 70 |e!bu.edu|!rpi!zap|
|00000040| 68 6f 64 2e 6d 70 73 2e | 6f 68 69 6f 2d 73 74 61 |hod.mps.|ohio-sta|
|00000050| 74 65 2e 65 64 75 21 73 | 77 72 69 6e 64 65 21 63 |te.edu!s|wrinde!c|
|00000060| 73 2e 75 74 65 78 61 73 | 2e 65 64 75 21 75 75 6e |s.utexas|.edu!uun|
|00000070| 65 74 21 70 61 70 61 79 | 61 2e 62 62 6e 2e 63 6f |et!papay|a.bbn.co|
|00000080| 6d 21 72 73 61 6c 7a 0a | 46 72 6f 6d 3a 20 72 73 |m!rsalz.|From: rs|
|00000090| 61 6c 7a 40 62 62 6e 2e | 63 6f 6d 20 28 52 69 63 |alz@bbn.|com (Ric|
|000000a0| 68 20 53 61 6c 7a 29 0a | 4e 65 77 73 67 72 6f 75 |h Salz).|Newsgrou|
|000000b0| 70 73 3a 20 63 6f 6d 70 | 2e 73 6f 75 72 63 65 73 |ps: comp|.sources|
|000000c0| 2e 75 6e 69 78 0a 53 75 | 62 6a 65 63 74 3a 20 76 |.unix.Su|bject: v|
|000000d0| 32 33 69 30 33 33 3a 20 | 20 52 75 6e 20 61 20 70 |23i033: | Run a p|
|000000e0| 72 6f 67 72 61 6d 20 75 | 6e 64 65 72 20 61 20 70 |rogram u|nder a p|
|000000f0| 74 79 20 73 65 73 73 69 | 6f 6e 2c 20 50 61 72 74 |ty sessi|on, Part|
|00000100| 30 33 2f 30 36 0a 4d 65 | 73 73 61 67 65 2d 49 44 |03/06.Me|ssage-ID|
|00000110| 3a 20 3c 32 38 38 33 40 | 6c 69 74 63 68 69 2e 62 |: <2883@|litchi.b|
|00000120| 62 6e 2e 63 6f 6d 3e 0a | 44 61 74 65 3a 20 31 30 |bn.com>.|Date: 10|
|00000130| 20 4f 63 74 20 39 30 20 | 31 34 3a 31 36 3a 34 30 | Oct 90 |14:16:40|
|00000140| 20 47 4d 54 0a 4f 72 67 | 61 6e 69 7a 61 74 69 6f | GMT.Org|anizatio|
|00000150| 6e 3a 20 42 42 4e 20 53 | 79 73 74 65 6d 73 20 61 |n: BBN S|ystems a|
|00000160| 6e 64 20 54 65 63 68 6e | 6f 6c 6f 67 69 65 73 2c |nd Techn|ologies,|
|00000170| 20 43 61 6d 62 72 69 64 | 67 65 20 4d 41 0a 4c 69 | Cambrid|ge MA.Li|
|00000180| 6e 65 73 3a 20 32 31 37 | 30 0a 41 70 70 72 6f 76 |nes: 217|0.Approv|
|00000190| 65 64 3a 20 72 73 61 6c | 7a 40 75 75 6e 65 74 2e |ed: rsal|z@uunet.|
|000001a0| 55 55 2e 4e 45 54 0a 0a | 53 75 62 6d 69 74 74 65 |UU.NET..|Submitte|
|000001b0| 64 2d 62 79 3a 20 44 61 | 6e 20 42 65 72 6e 73 74 |d-by: Da|n Bernst|
|000001c0| 65 69 6e 20 3c 62 72 6e | 73 74 6e 64 40 6b 72 61 |ein <brn|stnd@kra|
|000001d0| 6d 64 65 6e 2e 61 63 66 | 2e 6e 79 75 2e 65 64 75 |mden.acf|.nyu.edu|
|000001e0| 3e 0a 50 6f 73 74 69 6e | 67 2d 6e 75 6d 62 65 72 |>.Postin|g-number|
|000001f0| 3a 20 56 6f 6c 75 6d 65 | 20 32 33 2c 20 49 73 73 |: Volume| 23, Iss|
|00000200| 75 65 20 33 33 0a 41 72 | 63 68 69 76 65 2d 6e 61 |ue 33.Ar|chive-na|
|00000210| 6d 65 3a 20 70 74 79 2f | 70 61 72 74 30 33 0a 0a |me: pty/|part03..|
|00000220| 23 21 20 2f 62 69 6e 2f | 73 68 0a 23 20 54 68 69 |#! /bin/|sh.# Thi|
|00000230| 73 20 69 73 20 61 20 73 | 68 65 6c 6c 20 61 72 63 |s is a s|hell arc|
|00000240| 68 69 76 65 2e 20 20 52 | 65 6d 6f 76 65 20 61 6e |hive. R|emove an|
|00000250| 79 74 68 69 6e 67 20 62 | 65 66 6f 72 65 20 74 68 |ything b|efore th|
|00000260| 69 73 20 6c 69 6e 65 2c | 20 74 68 65 6e 20 66 65 |is line,| then fe|
|00000270| 65 64 20 69 74 0a 23 20 | 69 6e 74 6f 20 61 20 73 |ed it.# |into a s|
|00000280| 68 65 6c 6c 20 76 69 61 | 20 22 73 68 20 66 69 6c |hell via| "sh fil|
|00000290| 65 22 20 6f 72 20 73 69 | 6d 69 6c 61 72 2e 20 20 |e" or si|milar. |
|000002a0| 54 6f 20 6f 76 65 72 77 | 72 69 74 65 20 65 78 69 |To overw|rite exi|
|000002b0| 73 74 69 6e 67 20 66 69 | 6c 65 73 2c 0a 23 20 74 |sting fi|les,.# t|
|000002c0| 79 70 65 20 22 73 68 20 | 66 69 6c 65 20 2d 63 22 |ype "sh |file -c"|
|000002d0| 2e 0a 23 20 54 68 65 20 | 74 6f 6f 6c 20 74 68 61 |..# The |tool tha|
|000002e0| 74 20 67 65 6e 65 72 61 | 74 65 64 20 74 68 69 73 |t genera|ted this|
|000002f0| 20 61 70 70 65 61 72 65 | 64 20 69 6e 20 74 68 65 | appeare|d in the|
|00000300| 20 63 6f 6d 70 2e 73 6f | 75 72 63 65 73 2e 75 6e | comp.so|urces.un|
|00000310| 69 78 20 6e 65 77 73 67 | 72 6f 75 70 3b 0a 23 20 |ix newsg|roup;.# |
|00000320| 73 65 6e 64 20 6d 61 69 | 6c 20 74 6f 20 63 6f 6d |send mai|l to com|
|00000330| 70 2d 73 6f 75 72 63 65 | 73 2d 75 6e 69 78 40 75 |p-source|s-unix@u|
|00000340| 75 6e 65 74 2e 75 75 2e | 6e 65 74 20 69 66 20 79 |unet.uu.|net if y|
|00000350| 6f 75 20 77 61 6e 74 20 | 74 68 61 74 20 74 6f 6f |ou want |that too|
|00000360| 6c 2e 0a 23 20 43 6f 6e | 74 65 6e 74 73 3a 20 20 |l..# Con|tents: |
|00000370| 63 6f 6e 66 69 67 2e 68 | 20 6c 6f 67 73 2e 63 20 |config.h| logs.c |
|00000380| 70 74 79 2e 31 20 73 69 | 67 6c 65 72 2e 63 20 73 |pty.1 si|gler.c s|
|00000390| 6f 63 6b 2e 63 20 74 74 | 79 2e 63 20 75 74 69 6c |ock.c tt|y.c util|
|000003a0| 2f 4d 61 6b 65 66 69 6c | 65 0a 23 20 57 72 61 70 |/Makefil|e.# Wrap|
|000003b0| 70 65 64 20 62 79 20 72 | 73 61 6c 7a 40 6c 69 74 |ped by r|salz@lit|
|000003c0| 63 68 69 2e 62 62 6e 2e | 63 6f 6d 20 6f 6e 20 57 |chi.bbn.|com on W|
|000003d0| 65 64 20 4f 63 74 20 31 | 30 20 31 30 3a 31 31 3a |ed Oct 1|0 10:11:|
|000003e0| 33 38 20 31 39 39 30 0a | 50 41 54 48 3d 2f 62 69 |38 1990.|PATH=/bi|
|000003f0| 6e 3a 2f 75 73 72 2f 62 | 69 6e 3a 2f 75 73 72 2f |n:/usr/b|in:/usr/|
|00000400| 75 63 62 20 3b 20 65 78 | 70 6f 72 74 20 50 41 54 |ucb ; ex|port PAT|
|00000410| 48 0a 65 63 68 6f 20 49 | 66 20 74 68 69 73 20 61 |H.echo I|f this a|
|00000420| 72 63 68 69 76 65 20 69 | 73 20 63 6f 6d 70 6c 65 |rchive i|s comple|
|00000430| 74 65 2c 20 79 6f 75 20 | 77 69 6c 6c 20 73 65 65 |te, you |will see|
|00000440| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|00000450| 65 73 73 61 67 65 3a 0a | 65 63 68 6f 20 27 20 20 |essage:.|echo ' |
|00000460| 20 20 20 20 20 20 20 20 | 22 73 68 61 72 3a 20 45 | |"shar: E|
|00000470| 6e 64 20 6f 66 20 61 72 | 63 68 69 76 65 20 33 20 |nd of ar|chive 3 |
|00000480| 28 6f 66 20 36 29 2e 22 | 27 0a 69 66 20 74 65 73 |(of 6)."|'.if tes|
|00000490| 74 20 2d 66 20 27 63 6f | 6e 66 69 67 2e 68 27 20 |t -f 'co|nfig.h' |
|000004a0| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|000004b0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|000004c0| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|000004d0| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|000004e0| 20 66 69 6c 65 20 5c 22 | 27 63 6f 6e 66 69 67 2e | file \"|'config.|
|000004f0| 68 27 5c 22 0a 65 6c 73 | 65 0a 20 20 65 63 68 6f |h'\".els|e. echo|
|00000500| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00000510| 67 20 5c 22 27 63 6f 6e | 66 69 67 2e 68 27 5c 22 |g \"'con|fig.h'\"|
|00000520| 20 5c 28 39 36 31 30 20 | 63 68 61 72 61 63 74 65 | \(9610 |characte|
|00000530| 72 73 5c 29 0a 20 20 73 | 65 64 20 22 73 2f 5e 58 |rs\). s|ed "s/^X|
|00000540| 2f 2f 22 20 3e 27 63 6f | 6e 66 69 67 2e 68 27 20 |//" >'co|nfig.h' |
|00000550| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00000560| 58 2f 2a 20 43 6f 70 79 | 72 69 67 68 74 20 31 39 |X/* Copy|right 19|
|00000570| 39 30 2c 20 44 61 6e 69 | 65 6c 20 4a 2e 20 42 65 |90, Dani|el J. Be|
|00000580| 72 6e 73 74 65 69 6e 2e | 20 41 6c 6c 20 72 69 67 |rnstein.| All rig|
|00000590| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 20 2a 2f |hts rese|rved. */|
|000005a0| 0a 58 0a 58 23 69 66 6e | 64 65 66 20 50 54 59 5f |.X.X#ifn|def PTY_|
|000005b0| 43 4f 4e 46 49 47 5f 48 | 0a 58 23 64 65 66 69 6e |CONFIG_H|.X#defin|
|000005c0| 65 20 50 54 59 5f 43 4f | 4e 46 49 47 5f 48 0a 58 |e PTY_CO|NFIG_H.X|
|000005d0| 0a 58 2f 2a 20 49 74 20 | 69 73 20 72 65 63 6f 6d |.X/* It |is recom|
|000005e0| 6d 65 6e 64 65 64 20 74 | 68 61 74 20 79 6f 75 20 |mended t|hat you |
|000005f0| 6d 61 6b 65 20 6c 6f 63 | 61 6c 20 63 68 61 6e 67 |make loc|al chang|
|00000600| 65 73 20 69 6e 20 74 68 | 65 20 4d 61 6b 65 66 69 |es in th|e Makefi|
|00000610| 6c 65 2c 20 2a 2f 0a 58 | 2f 2a 20 65 78 63 65 70 |le, */.X|/* excep|
|00000620| 74 20 66 6f 72 20 66 65 | 61 74 75 72 65 20 63 6f |t for fe|ature co|
|00000630| 6e 74 72 6f 6c 2c 20 77 | 68 69 63 68 20 69 73 20 |ntrol, w|hich is |
|00000640| 62 65 73 74 20 64 6f 6e | 65 20 68 65 72 65 2e 20 |best don|e here. |
|00000650| 2a 2f 0a 58 0a 58 2f 2a | 20 53 65 63 74 69 6f 6e |*/.X.X/*| Section|
|00000660| 20 31 3a 20 46 65 61 74 | 75 72 65 20 63 6f 6e 74 | 1: Feat|ure cont|
|00000670| 72 6f 6c 2e 20 2a 2f 0a | 58 2f 2a 20 53 65 63 74 |rol. */.|X/* Sect|
|00000680| 69 6f 6e 20 32 3a 20 50 | 73 65 75 64 6f 2d 74 65 |ion 2: P|seudo-te|
|00000690| 72 6d 69 6e 61 6c 20 70 | 61 74 68 6e 61 6d 65 73 |rminal p|athnames|
|000006a0| 2e 20 2a 2f 0a 58 2f 2a | 20 53 65 63 74 69 6f 6e |. */.X/*| Section|
|000006b0| 20 33 3a 20 4c 6f 67 67 | 69 6e 67 2e 20 2a 2f 0a | 3: Logg|ing. */.|
|000006c0| 58 2f 2a 20 53 65 63 74 | 69 6f 6e 20 34 3a 20 50 |X/* Sect|ion 4: P|
|000006d0| 72 6f 74 65 63 74 69 6f | 6e 2e 20 2a 2f 0a 58 2f |rotectio|n. */.X/|
|000006e0| 2a 20 53 65 63 74 69 6f | 6e 20 35 3a 20 4f 74 68 |* Sectio|n 5: Oth|
|000006f0| 65 72 2e 20 2a 2f 0a 58 | 2f 2a 20 53 65 63 74 69 |er. */.X|/* Secti|
|00000700| 6f 6e 20 36 3a 20 53 61 | 6e 69 74 79 20 63 68 65 |on 6: Sa|nity che|
|00000710| 63 6b 73 2e 20 2a 2f 0a | 58 0a 58 2f 2a 20 45 61 |cks. */.|X.X/* Ea|
|00000720| 63 68 20 73 65 63 74 69 | 6f 6e 20 73 74 61 72 74 |ch secti|on start|
|00000730| 73 20 77 69 74 68 20 74 | 68 65 20 6e 65 63 65 73 |s with t|he neces|
|00000740| 73 61 72 79 20 64 65 66 | 69 6e 65 73 20 61 6e 64 |sary def|ines and|
|00000750| 20 66 69 6e 69 73 68 65 | 73 20 77 69 74 68 20 2a | finishe|s with *|
|00000760| 2f 0a 58 2f 2a 20 61 6e | 20 65 78 70 6c 61 6e 61 |/.X/* an| explana|
|00000770| 74 69 6f 6e 2e 20 2a 2f | 0a 58 0a 58 0a 58 2f 2a |tion. */|.X.X.X/*|
|00000780| 20 53 65 63 74 69 6f 6e | 20 31 3a 20 46 65 61 74 | Section| 1: Feat|
|00000790| 75 72 65 20 63 6f 6e 74 | 72 6f 6c 2e 20 2a 2f 0a |ure cont|rol. */.|
|000007a0| 58 0a 58 2f 2a 23 64 65 | 66 69 6e 65 20 4d 55 53 |X.X/*#de|fine MUS|
|000007b0| 54 5f 55 54 4d 50 20 20 | 2f 2a 20 66 6f 72 63 65 |T_UTMP |/* force|
|000007c0| 20 75 74 6d 70 20 6c 6f | 67 67 69 6e 67 20 2a 2f | utmp lo|gging */|
|000007d0| 0a 58 2f 2a 23 64 65 66 | 69 6e 65 20 4e 4f 5f 55 |.X/*#def|ine NO_U|
|000007e0| 54 4d 50 20 20 2f 2a 20 | 70 72 6f 68 69 62 69 74 |TMP /* |prohibit|
|000007f0| 20 75 74 6d 70 20 6c 6f | 67 67 69 6e 67 20 2a 2f | utmp lo|gging */|
|00000800| 0a 58 2f 2a 23 64 65 66 | 69 6e 65 20 4d 55 53 54 |.X/*#def|ine MUST|
|00000810| 5f 57 54 4d 50 20 20 2f | 2a 20 66 6f 72 63 65 20 |_WTMP /|* force |
|00000820| 75 74 6d 70 20 6c 6f 67 | 67 69 6e 67 20 2a 2f 0a |utmp log|ging */.|
|00000830| 58 2f 2a 23 64 65 66 69 | 6e 65 20 4e 4f 5f 57 54 |X/*#defi|ne NO_WT|
|00000840| 4d 50 20 20 2f 2a 20 70 | 72 6f 68 69 62 69 74 20 |MP /* p|rohibit |
|00000850| 77 74 6d 70 20 6c 6f 67 | 67 69 6e 67 20 2a 2f 0a |wtmp log|ging */.|
|00000860| 58 2f 2a 23 64 65 66 69 | 6e 65 20 4d 55 53 54 5f |X/*#defi|ne MUST_|
|00000870| 53 45 53 53 49 4f 4e 20 | 20 2f 2a 20 66 6f 72 63 |SESSION | /* forc|
|00000880| 65 20 64 69 73 63 6f 6e | 6e 65 63 74 61 62 6c 65 |e discon|nectable|
|00000890| 20 73 65 73 73 69 6f 6e | 73 20 28 77 68 61 74 20 | session|s (what |
|000008a0| 66 6f 72 3f 29 20 2a 2f | 0a 58 2f 2a 23 64 65 66 |for?) */|.X/*#def|
|000008b0| 69 6e 65 20 4e 4f 5f 53 | 45 53 53 49 4f 4e 20 20 |ine NO_S|ESSION |
|000008c0| 2f 2a 20 70 72 6f 68 69 | 62 69 74 20 64 69 73 63 |/* prohi|bit disc|
|000008d0| 6f 6e 6e 65 63 74 61 62 | 6c 65 20 73 65 73 73 69 |onnectab|le sessi|
|000008e0| 6f 6e 73 20 2a 2f 0a 58 | 2f 2a 23 64 65 66 69 6e |ons */.X|/*#defin|
|000008f0| 65 20 4d 55 53 54 5f 43 | 48 4f 57 4e 20 20 2f 2a |e MUST_C|HOWN /*|
|00000900| 20 66 6f 72 63 65 20 63 | 68 61 6e 67 69 6e 67 20 | force c|hanging |
|00000910| 70 74 79 20 6f 77 6e 65 | 72 20 2a 2f 0a 58 2f 2a |pty owne|r */.X/*|
|00000920| 23 64 65 66 69 6e 65 20 | 4e 4f 5f 43 48 4f 57 4e |#define |NO_CHOWN|
|00000930| 20 20 2f 2a 20 70 72 6f | 68 69 62 69 74 20 63 68 | /* pro|hibit ch|
|00000940| 61 6e 67 69 6e 67 20 70 | 74 79 20 6f 77 6e 65 72 |anging p|ty owner|
|00000950| 20 2a 2f 0a 58 2f 2a 23 | 64 65 66 69 6e 65 20 4e | */.X/*#|define N|
|00000960| 4f 5f 46 44 50 41 53 53 | 49 4e 47 20 20 2f 2a 20 |O_FDPASS|ING /* |
|00000970| 70 72 6f 68 69 62 69 74 | 20 66 69 6c 65 20 64 65 |prohibit| file de|
|00000980| 73 63 72 69 70 74 6f 72 | 20 70 61 73 73 69 6e 67 |scriptor| passing|
|00000990| 20 2a 2f 0a 58 2f 2a 23 | 64 65 66 69 6e 65 20 4e | */.X/*#|define N|
|000009a0| 4f 5f 55 4e 49 58 53 4f | 43 4b 53 20 20 2f 2a 20 |O_UNIXSO|CKS /* |
|000009b0| 70 72 6f 68 69 62 69 74 | 20 75 73 65 20 6f 66 20 |prohibit| use of |
|000009c0| 55 4e 49 58 2d 64 6f 6d | 61 69 6e 20 73 6f 63 6b |UNIX-dom|ain sock|
|000009d0| 65 74 73 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |ets */.X|#define |
|000009e0| 54 54 59 5f 57 49 4e 44 | 4f 57 53 20 20 2f 2a 20 |TTY_WIND|OWS /* |
|000009f0| 68 61 76 65 20 77 69 6e | 73 69 7a 65 2c 20 57 49 |have win|size, WI|
|00000a00| 4e 43 48 2c 20 65 74 63 | 2e 20 69 6e 20 74 74 79 |NCH, etc|. in tty|
|00000a10| 20 28 34 2e 33 29 20 2a | 2f 0a 58 2f 2a 23 64 65 | (4.3) *|/.X/*#de|
|00000a20| 66 69 6e 65 20 54 54 59 | 5f 41 55 58 43 48 41 52 |fine TTY|_AUXCHAR|
|00000a30| 53 20 20 2f 2a 20 68 61 | 76 65 20 73 79 73 74 61 |S /* ha|ve systa|
|00000a40| 74 2c 20 65 2e 67 2e 20 | 77 69 74 68 20 5e 54 2c |t, e.g. |with ^T,|
|00000a50| 20 69 6e 20 74 74 79 20 | 2a 2f 0a 58 23 64 65 66 | in tty |*/.X#def|
|00000a60| 69 6e 65 20 44 45 53 50 | 45 52 41 54 45 5f 41 4c |ine DESP|ERATE_AL|
|00000a70| 41 52 4d 53 20 20 2f 2a | 20 69 66 20 4e 44 45 4c |ARMS /*| if NDEL|
|00000a80| 41 59 20 6d 61 79 20 6e | 6f 74 20 62 65 20 65 6e |AY may n|ot be en|
|00000a90| 6f 75 67 68 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |ough */.|X#define|
|00000aa0| 20 44 4f 4e 54 5f 4e 44 | 45 4c 41 59 20 20 2f 2a | DONT_ND|ELAY /*|
|00000ab0| 20 6d 69 67 68 74 20 61 | 73 20 77 65 6c 6c 2c 20 | might a|s well, |
|00000ac0| 77 69 74 68 20 44 45 53 | 50 45 52 41 54 45 5f 41 |with DES|PERATE_A|
|00000ad0| 4c 41 52 4d 53 20 2a 2f | 0a 58 23 64 65 66 69 6e |LARMS */|.X#defin|
|00000ae0| 65 20 53 49 47 49 4e 54 | 45 52 52 55 50 54 20 20 |e SIGINT|ERRUPT |
|00000af0| 2f 2a 20 69 66 20 79 6f | 75 20 68 61 76 65 20 73 |/* if yo|u have s|
|00000b00| 69 67 69 6e 74 65 72 72 | 75 70 74 28 29 20 28 34 |iginterr|upt() (4|
|00000b10| 2e 33 29 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |.3) */.X|#define |
|00000b20| 55 53 4c 45 45 50 20 20 | 2f 2a 20 69 66 20 79 6f |USLEEP |/* if yo|
|00000b30| 75 20 68 61 76 65 20 75 | 73 6c 65 65 70 28 29 20 |u have u|sleep() |
|00000b40| 2a 2f 0a 58 0a 58 2f 2a | 20 54 68 65 73 65 20 61 |*/.X.X/*| These a|
|00000b50| 72 65 20 6d 6f 73 74 6c | 79 20 73 65 6c 66 2d 65 |re mostl|y self-e|
|00000b60| 78 70 6c 61 6e 61 74 6f | 72 79 2e 20 49 66 20 79 |xplanato|ry. If y|
|00000b70| 6f 75 72 20 73 79 73 74 | 65 6d 20 64 6f 65 73 6e |our syst|em doesn|
|00000b80| 27 74 20 73 75 70 70 6f | 72 74 20 2a 2f 0a 58 2f |'t suppo|rt */.X/|
|00000b90| 2a 20 73 6f 6d 65 20 66 | 65 61 74 75 72 65 2c 20 |* some f|eature, |
|00000ba0| 79 6f 75 20 73 68 6f 75 | 6c 64 20 70 72 6f 68 69 |you shou|ld prohi|
|00000bb0| 62 69 74 20 69 74 20 62 | 79 20 64 65 66 69 6e 69 |bit it b|y defini|
|00000bc0| 6e 67 20 4e 4f 5f 57 48 | 41 54 45 56 45 52 2e 20 |ng NO_WH|ATEVER. |
|00000bd0| 2a 2f 0a 58 0a 58 2f 2a | 20 41 6e 79 20 42 53 44 |*/.X.X/*| Any BSD|
|00000be0| 20 34 2e 32 20 6f 72 20 | 34 2e 33 20 73 79 73 74 | 4.2 or |4.3 syst|
|00000bf0| 65 6d 20 73 68 6f 75 6c | 64 20 68 61 76 65 20 55 |em shoul|d have U|
|00000c00| 4e 49 58 53 4f 43 4b 53 | 20 61 6e 64 20 46 44 50 |NIXSOCKS| and FDP|
|00000c10| 41 53 53 49 4e 47 2e 20 | 4c 6f 6f 6b 20 2a 2f 0a |ASSING. |Look */.|
|00000c20| 58 2f 2a 20 66 6f 72 20 | 2f 73 79 73 2f 68 2f 75 |X/* for |/sys/h/u|
|00000c30| 6e 2e 68 20 74 6f 20 73 | 65 65 20 69 66 20 79 6f |n.h to s|ee if yo|
|00000c40| 75 20 68 61 76 65 20 55 | 4e 49 58 2d 64 6f 6d 61 |u have U|NIX-doma|
|00000c50| 69 6e 20 73 6f 63 6b 65 | 74 73 2e 20 4c 6f 6f 6b |in socke|ts. Look|
|00000c60| 20 66 6f 72 20 2a 2f 0a | 58 2f 2a 20 6d 73 67 5f | for */.|X/* msg_|
|00000c70| 61 63 63 72 69 67 68 74 | 73 20 69 6e 20 74 68 65 |accright|s in the|
|00000c80| 20 6d 61 6e 20 70 61 67 | 65 20 66 6f 72 20 72 65 | man pag|e for re|
|00000c90| 63 76 6d 73 67 28 29 20 | 74 6f 20 73 65 65 20 69 |cvmsg() |to see i|
|00000ca0| 66 20 79 6f 75 20 68 61 | 76 65 20 2a 2f 0a 58 2f |f you ha|ve */.X/|
|00000cb0| 2a 20 66 69 6c 65 20 64 | 65 73 72 69 70 74 6f 72 |* file d|esriptor|
|00000cc0| 20 70 61 73 73 69 6e 67 | 2e 20 28 53 6f 6d 65 74 | passing|. (Somet|
|00000cd0| 69 6d 65 73 20 66 64 20 | 70 61 73 73 69 6e 67 20 |imes fd |passing |
|00000ce0| 69 73 20 61 76 61 69 6c | 61 62 6c 65 20 62 75 74 |is avail|able but|
|00000cf0| 20 62 75 67 67 79 2c 20 | 2a 2f 0a 58 2f 2a 20 61 | buggy, |*/.X/* a|
|00000d00| 73 20 69 74 27 73 20 61 | 20 72 65 6c 61 74 69 76 |s it's a| relativ|
|00000d10| 65 6c 79 20 6e 65 77 2c | 20 70 6f 77 65 72 66 75 |ely new,| powerfu|
|00000d20| 6c 2c 20 61 6e 64 20 72 | 61 72 65 6c 79 20 65 78 |l, and r|arely ex|
|00000d30| 70 6c 6f 69 74 65 64 20 | 66 65 61 74 75 72 65 2e |ploited |feature.|
|00000d40| 20 49 6e 20 2a 2f 0a 58 | 2f 2a 20 74 68 69 73 20 | In */.X|/* this |
|00000d50| 63 61 73 65 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |case you| should |
|00000d60| 64 65 66 69 6e 65 20 4e | 4f 5f 46 44 50 41 53 53 |define N|O_FDPASS|
|00000d70| 49 4e 47 2e 29 20 49 6e | 20 74 68 65 20 63 75 72 |ING.) In| the cur|
|00000d80| 72 65 6e 74 20 76 65 72 | 73 69 6f 6e 2c 20 2a 2f |rent ver|sion, */|
|00000d90| 0a 58 2f 2a 20 4e 4f 5f | 55 4e 49 58 53 4f 43 4b |.X/* NO_|UNIXSOCK|
|00000da0| 53 20 69 6d 70 6c 69 65 | 73 20 4e 4f 5f 46 44 50 |S implie|s NO_FDP|
|00000db0| 41 53 53 49 4e 47 20 61 | 6e 64 20 4e 4f 5f 53 45 |ASSING a|nd NO_SE|
|00000dc0| 53 53 49 4f 4e 3b 20 73 | 65 65 20 53 65 63 74 69 |SSION; s|ee Secti|
|00000dd0| 6f 6e 20 36 2e 20 2a 2f | 0a 58 0a 58 2f 2a 20 46 |on 6. */|.X.X/* F|
|00000de0| 6f 72 20 54 54 59 5f 57 | 49 4e 44 4f 57 53 2c 20 |or TTY_W|INDOWS, |
|00000df0| 6c 6f 6f 6b 20 66 6f 72 | 20 73 74 72 75 63 74 20 |look for| struct |
|00000e00| 77 69 6e 73 69 7a 65 20 | 69 6e 20 2f 75 73 72 2f |winsize |in /usr/|
|00000e10| 69 6e 63 6c 75 64 65 2f | 73 67 74 74 79 2e 68 2e |include/|sgtty.h.|
|00000e20| 20 2a 2f 0a 58 2f 2a 20 | 46 6f 72 20 54 54 59 5f | */.X/* |For TTY_|
|00000e30| 41 55 58 43 48 41 52 53 | 2c 20 6c 6f 6f 6b 20 66 |AUXCHARS|, look f|
|00000e40| 6f 72 20 73 74 72 75 63 | 74 20 61 75 78 63 68 61 |or struc|t auxcha|
|00000e50| 72 73 20 69 6e 20 74 68 | 65 20 73 61 6d 65 20 70 |rs in th|e same p|
|00000e60| 6c 61 63 65 2e 20 2a 2f | 0a 58 2f 2a 20 41 6c 6c |lace. */|.X/* All|
|00000e70| 20 42 53 44 20 34 2e 33 | 20 73 79 73 74 65 6d 73 | BSD 4.3| systems|
|00000e80| 20 73 68 6f 75 6c 64 20 | 68 61 76 65 20 77 69 6e | should |have win|
|00000e90| 73 69 7a 65 3b 20 61 75 | 78 63 68 61 72 73 20 69 |size; au|xchars i|
|00000ea0| 73 6e 27 74 20 73 6f 20 | 63 6f 6d 6d 6f 6e 2e 20 |sn't so |common. |
|00000eb0| 2a 2f 0a 58 0a 58 2f 2a | 20 4f 70 65 6e 69 6e 67 |*/.X.X/*| Opening|
|00000ec0| 20 74 68 65 20 73 6c 61 | 76 65 20 73 69 64 65 20 | the sla|ve side |
|00000ed0| 6f 66 20 61 20 70 74 79 | 20 77 69 74 68 6f 75 74 |of a pty| without|
|00000ee0| 20 61 20 6d 61 73 74 65 | 72 20 73 68 6f 75 6c 64 | a maste|r should|
|00000ef0| 20 68 61 6e 67 20 74 68 | 65 20 2a 2f 0a 58 2f 2a | hang th|e */.X/*|
|00000f00| 20 70 72 6f 63 65 73 73 | 2e 20 4e 6f 72 6d 61 6c | process|. Normal|
|00000f10| 6c 79 2c 20 6f 70 65 6e | 69 6e 67 20 77 69 74 68 |ly, open|ing with|
|00000f20| 20 4e 44 45 4c 41 59 20 | 67 65 74 73 20 61 72 6f | NDELAY |gets aro|
|00000f30| 75 6e 64 20 74 68 69 73 | 20 65 66 66 65 63 74 3b |und this| effect;|
|00000f40| 20 2a 2f 0a 58 2f 2a 20 | 6f 70 65 6e 69 6e 67 20 | */.X/* |opening |
|00000f50| 74 68 65 20 73 6c 61 76 | 65 20 73 69 64 65 20 66 |the slav|e side f|
|00000f60| 69 72 73 74 20 69 73 20 | 6e 65 63 65 73 73 61 72 |irst is |necessar|
|00000f70| 79 20 66 6f 72 20 73 6f | 6d 65 20 73 65 63 75 72 |y for so|me secur|
|00000f80| 69 74 79 20 63 68 65 63 | 6b 73 2e 20 2a 2f 0a 58 |ity chec|ks. */.X|
|00000f90| 2f 2a 20 4f 6e 20 73 6f | 6d 65 20 73 79 73 74 65 |/* On so|me syste|
|00000fa0| 6d 73 2c 20 68 6f 77 65 | 76 65 72 2c 20 4e 44 45 |ms, howe|ver, NDE|
|00000fb0| 4c 41 59 20 64 6f 65 73 | 6e 27 74 20 64 6f 20 69 |LAY does|n't do i|
|00000fc0| 74 73 20 6a 6f 62 3b 20 | 79 6f 75 20 6d 75 73 74 |ts job; |you must|
|00000fd0| 20 2a 2f 0a 58 2f 2a 20 | 64 65 66 69 6e 65 20 44 | */.X/* |define D|
|00000fe0| 45 53 50 45 52 41 54 45 | 5f 41 4c 41 52 4d 53 20 |ESPERATE|_ALARMS |
|00000ff0| 74 6f 20 66 6f 72 63 69 | 62 6c 79 20 69 6e 74 65 |to forci|bly inte|
|00001000| 72 72 75 70 74 20 65 61 | 63 68 20 6f 70 65 6e 28 |rrupt ea|ch open(|
|00001010| 29 2e 20 54 68 65 72 65 | 20 2a 2f 0a 58 2f 2a 20 |). There| */.X/* |
|00001020| 73 68 6f 75 6c 64 6e 27 | 74 20 62 65 20 61 6e 79 |shouldn'|t be any|
|00001030| 20 70 72 6f 62 6c 65 6d | 20 69 6e 20 6c 65 61 76 | problem| in leav|
|00001040| 69 6e 67 20 74 68 69 73 | 20 28 61 6e 64 20 44 4f |ing this| (and DO|
|00001050| 4e 54 5f 4e 44 45 4c 41 | 59 29 20 64 65 66 69 6e |NT_NDELA|Y) defin|
|00001060| 65 64 20 2a 2f 0a 58 2f | 2a 20 61 6e 79 77 61 79 |ed */.X/|* anyway|
|00001070| 2e 20 28 4f 6e 20 61 20 | 66 65 77 20 73 79 73 74 |. (On a |few syst|
|00001080| 65 6d 73 2c 20 79 6f 75 | 20 6d 75 73 74 20 68 61 |ems, you| must ha|
|00001090| 76 65 20 44 4f 4e 54 5f | 4e 44 45 4c 41 59 20 66 |ve DONT_|NDELAY f|
|000010a0| 6f 72 20 2d 78 6e 2e 29 | 20 2a 2f 0a 58 0a 58 2f |or -xn.)| */.X.X/|
|000010b0| 2a 20 44 65 66 69 6e 65 | 20 53 49 47 49 4e 54 45 |* Define| SIGINTE|
|000010c0| 52 52 55 50 54 20 69 66 | 20 79 6f 75 20 68 61 76 |RRUPT if| you hav|
|000010d0| 65 20 73 69 67 69 6e 74 | 65 72 72 75 70 74 28 29 |e sigint|errupt()|
|000010e0| 20 28 69 2e 65 2e 2c 20 | 69 66 20 79 6f 75 27 72 | (i.e., |if you'r|
|000010f0| 65 20 2a 2f 0a 58 2f 2a | 20 72 75 6e 6e 69 6e 67 |e */.X/*| running|
|00001100| 20 42 53 44 20 34 2e 33 | 29 2e 20 57 69 74 68 6f | BSD 4.3|). Witho|
|00001110| 75 74 20 74 68 69 73 20 | 63 61 6c 6c 2c 20 74 68 |ut this |call, th|
|00001120| 65 72 65 27 73 20 6e 6f | 20 63 6f 72 72 65 63 74 |ere's no| correct|
|00001130| 20 77 61 79 20 74 6f 20 | 64 6f 20 2a 2f 0a 58 2f | way to |do */.X/|
|00001140| 2a 20 70 65 72 2d 70 72 | 6f 63 65 73 73 20 6e 6f |* per-pr|ocess no|
|00001150| 6e 62 6c 6f 63 6b 69 6e | 67 20 49 2f 4f 2c 20 61 |nblockin|g I/O, a|
|00001160| 6e 64 20 70 74 79 20 6d | 61 79 20 62 6c 6f 63 6b |nd pty m|ay block|
|00001170| 20 77 68 65 6e 20 69 74 | 20 73 68 6f 75 6c 64 6e | when it| shouldn|
|00001180| 27 74 20 2a 2f 0a 58 2f | 2a 20 28 6e 61 6d 65 6c |'t */.X/|* (namel|
|00001190| 79 2c 20 77 68 65 6e 20 | 69 74 20 68 61 73 20 4e |y, when |it has N|
|000011a0| 20 62 79 74 65 73 20 74 | 6f 20 77 72 69 74 65 20 | bytes t|o write |
|000011b0| 74 6f 20 74 68 65 20 6f | 75 74 70 75 74 2c 20 74 |to the o|utput, t|
|000011c0| 68 65 20 6f 75 74 70 75 | 74 20 69 73 20 2a 2f 0a |he outpu|t is */.|
|000011d0| 58 2f 2a 20 61 20 62 6c | 6f 63 6b 69 6e 67 20 70 |X/* a bl|ocking p|
|000011e0| 69 70 65 20 77 69 74 68 | 20 4d 20 62 79 74 65 73 |ipe with| M bytes|
|000011f0| 20 6f 66 20 73 70 61 63 | 65 2c 20 61 6e 64 20 4e | of spac|e, and N|
|00001200| 20 3e 20 4d 20 3e 20 30 | 29 2e 20 49 66 20 79 6f | > M > 0|). If yo|
|00001210| 75 20 64 65 66 69 6e 65 | 20 2a 2f 0a 58 2f 2a 20 |u define| */.X/* |
|00001220| 53 49 47 49 4e 54 45 52 | 52 55 50 54 2c 20 70 74 |SIGINTER|RUPT, pt|
|00001230| 79 20 77 69 6c 6c 20 74 | 61 6b 65 20 73 6f 6d 65 |y will t|ake some|
|00001240| 20 65 78 74 72 61 20 65 | 66 66 6f 72 74 20 74 6f | extra e|ffort to|
|00001250| 20 6e 65 76 65 72 2c 20 | 65 76 65 72 2c 20 65 76 | never, |ever, ev|
|00001260| 65 72 20 2a 2f 0a 58 2f | 2a 20 62 6c 6f 63 6b 20 |er */.X/|* block |
|00001270| 77 68 65 6e 20 69 74 20 | 64 6f 65 73 6e 27 74 20 |when it |doesn't |
|00001280| 68 61 76 65 20 74 6f 2e | 20 28 53 65 65 20 4f 55 |have to.| (See OU|
|00001290| 54 42 55 46 53 49 5a 45 | 2c 20 62 65 6c 6f 77 2e |TBUFSIZE|, below.|
|000012a0| 29 20 2a 2f 0a 58 0a 58 | 2f 2a 20 44 65 66 69 6e |) */.X.X|/* Defin|
|000012b0| 65 20 55 53 4c 45 45 50 | 20 69 66 20 79 6f 75 20 |e USLEEP| if you |
|000012c0| 68 61 76 65 20 75 73 6c | 65 65 70 28 29 2e 20 2a |have usl|eep(). *|
|000012d0| 2f 0a 58 0a 58 0a 58 2f | 2a 20 53 65 63 74 69 6f |/.X.X.X/|* Sectio|
|000012e0| 6e 20 32 3a 20 50 61 74 | 68 6e 61 6d 65 73 2e 20 |n 2: Pat|hnames. |
|000012f0| 2a 2f 0a 58 0a 58 23 69 | 66 6e 64 65 66 20 50 54 |*/.X.X#i|fndef PT|
|00001300| 59 44 49 52 0a 58 23 64 | 65 66 69 6e 65 20 50 54 |YDIR.X#d|efine PT|
|00001310| 59 44 49 52 20 22 2f 75 | 73 72 2f 65 74 63 2f 70 |YDIR "/u|sr/etc/p|
|00001320| 74 79 22 0a 58 23 65 6e | 64 69 66 0a 58 23 69 66 |ty".X#en|dif.X#if|
|00001330| 6e 64 65 66 20 44 45 56 | 4d 54 59 0a 58 23 64 65 |ndef DEV|MTY.X#de|
|00001340| 66 69 6e 65 20 44 45 56 | 4d 54 59 20 22 2f 64 65 |fine DEV|MTY "/de|
|00001350| 76 2f 70 74 79 20 20 22 | 0a 58 23 65 6e 64 69 66 |v/pty "|.X#endif|
|00001360| 0a 58 23 69 66 6e 64 65 | 66 20 44 45 56 53 54 59 |.X#ifnde|f DEVSTY|
|00001370| 0a 58 23 64 65 66 69 6e | 65 20 44 45 56 53 54 59 |.X#defin|e DEVSTY|
|00001380| 20 22 2f 64 65 76 2f 74 | 74 79 20 20 22 0a 58 23 | "/dev/t|ty ".X#|
|00001390| 65 6e 64 69 66 0a 58 23 | 69 66 6e 64 65 66 20 50 |endif.X#|ifndef P|
|000013a0| 54 59 31 0a 58 23 64 65 | 66 69 6e 65 20 50 54 59 |TY1.X#de|fine PTY|
|000013b0| 31 20 22 70 71 72 73 74 | 75 76 77 78 79 7a 61 62 |1 "pqrst|uvwxyzab|
|000013c0| 63 64 65 66 67 68 69 6a | 6b 6c 6d 6e 6f 22 0a 58 |cdefghij|klmno".X|
|000013d0| 23 65 6e 64 69 66 0a 58 | 23 69 66 6e 64 65 66 20 |#endif.X|#ifndef |
|000013e0| 50 54 59 32 0a 58 23 64 | 65 66 69 6e 65 20 50 54 |PTY2.X#d|efine PT|
|000013f0| 59 32 20 22 30 31 32 33 | 34 35 36 37 38 39 61 62 |Y2 "0123|456789ab|
|00001400| 63 64 65 66 22 0a 58 23 | 65 6e 64 69 66 0a 58 23 |cdef".X#|endif.X#|
|00001410| 69 66 6e 64 65 66 20 54 | 54 59 4e 41 4d 45 4c 45 |ifndef T|TYNAMELE|
|00001420| 4e 0a 58 23 64 65 66 69 | 6e 65 20 54 54 59 4e 41 |N.X#defi|ne TTYNA|
|00001430| 4d 45 4c 45 4e 20 33 30 | 0a 58 23 65 6e 64 69 66 |MELEN 30|.X#endif|
|00001440| 0a 58 0a 58 2f 2a 20 50 | 54 59 44 49 52 20 69 73 |.X.X/* P|TYDIR is|
|00001450| 20 77 68 65 72 65 20 70 | 74 79 20 73 65 73 73 69 | where p|ty sessi|
|00001460| 6f 6e 73 20 73 74 6f 72 | 65 20 74 68 65 69 72 20 |ons stor|e their |
|00001470| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 20 59 6f 75 |informat|ion. You|
|00001480| 20 73 68 6f 75 6c 64 20 | 2a 2f 0a 58 2f 2a 20 63 | should |*/.X/* c|
|00001490| 72 65 61 74 65 20 69 74 | 20 6d 6f 64 65 20 37 30 |reate it| mode 70|
|000014a0| 30 2c 20 6f 77 6e 65 72 | 20 70 74 79 2c 20 67 72 |0, owner| pty, gr|
|000014b0| 6f 75 70 20 69 72 72 65 | 6c 65 76 61 6e 74 2e 20 |oup irre|levant. |
|000014c0| 59 6f 75 20 6d 75 73 74 | 20 64 65 66 69 6e 65 20 |You must| define |
|000014d0| 2a 2f 0a 58 2f 2a 20 50 | 54 59 44 49 52 20 61 73 |*/.X/* P|TYDIR as|
|000014e0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 65 76 65 6e 20 | somethi|ng even |
|000014f0| 69 66 20 79 6f 75 20 64 | 6f 6e 27 74 20 61 6c 6c |if you d|on't all|
|00001500| 6f 77 20 73 65 73 73 69 | 6f 6e 73 2e 20 49 66 20 |ow sessi|ons. If |
|00001510| 79 6f 75 20 64 6f 6e 27 | 74 20 2a 2f 0a 58 2f 2a |you don'|t */.X/*|
|00001520| 20 73 65 74 20 75 70 20 | 50 54 59 44 49 52 20 61 | set up |PTYDIR a|
|00001530| 74 20 61 6c 6c 20 62 75 | 74 20 79 6f 75 20 64 6f |t all bu|t you do|
|00001540| 20 61 6c 6c 6f 77 20 73 | 65 73 73 69 6f 6e 73 2c | allow s|essions,|
|00001550| 20 70 74 79 20 77 69 6c | 6c 20 73 77 69 74 63 68 | pty wil|l switch|
|00001560| 20 2a 2f 0a 58 2f 2a 20 | 6f 75 74 20 6f 66 20 73 | */.X/* |out of s|
|00001570| 65 74 75 69 64 20 61 66 | 74 65 72 20 67 72 61 62 |etuid af|ter grab|
|00001580| 62 69 6e 67 20 61 20 70 | 74 79 2c 20 74 68 65 6e |bing a p|ty, then|
|00001590| 20 73 65 74 20 75 70 20 | 73 65 73 73 69 6f 6e 20 | set up |session |
|000015a0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 2a 2f 0a 58 |informat|ion */.X|
|000015b0| 2f 2a 20 69 6e 20 74 68 | 65 20 75 73 65 72 27 73 |/* in th|e user's|
|000015c0| 20 68 6f 6d 65 20 64 69 | 72 65 63 74 6f 72 79 2e | home di|rectory.|
|000015d0| 20 54 68 69 73 20 69 73 | 6e 27 74 20 74 6f 74 61 | This is|n't tota|
|000015e0| 6c 6c 79 20 73 65 63 75 | 72 65 20 62 75 74 20 69 |lly secu|re but i|
|000015f0| 74 27 73 20 2a 2f 0a 58 | 2f 2a 20 61 74 20 6c 65 |t's */.X|/* at le|
|00001600| 61 73 74 20 70 61 72 74 | 69 61 6c 6c 79 20 77 6f |ast part|ially wo|
|00001610| 72 6b 61 62 6c 65 2e 20 | 2a 2f 0a 58 0a 58 2f 2a |rkable. |*/.X.X/*|
|00001620| 20 44 45 56 4d 54 59 20 | 61 6e 64 20 44 45 56 53 | DEVMTY |and DEVS|
|00001630| 54 59 20 61 72 65 20 74 | 68 65 20 62 61 73 65 6e |TY are t|he basen|
|00001640| 61 6d 65 73 20 6f 66 20 | 74 68 65 20 6d 61 73 74 |ames of |the mast|
|00001650| 65 72 20 61 6e 64 20 73 | 6c 61 76 65 20 70 74 79 |er and s|lave pty|
|00001660| 73 20 2a 2f 0a 58 2f 2a | 20 72 65 73 70 65 63 74 |s */.X/*| respect|
|00001670| 69 76 65 6c 79 2e 20 54 | 68 65 79 20 6d 75 73 74 |ively. T|hey must|
|00001680| 20 65 61 63 68 20 65 6e | 64 20 77 69 74 68 20 74 | each en|d with t|
|00001690| 77 6f 20 73 70 61 63 65 | 73 2c 20 66 69 6c 6c 65 |wo space|s, fille|
|000016a0| 64 20 69 6e 20 77 69 74 | 68 20 2a 2f 0a 58 2f 2a |d in wit|h */.X/*|
|000016b0| 20 63 68 61 72 61 63 74 | 65 72 73 20 66 72 6f 6d | charact|ers from|
|000016c0| 20 50 54 59 31 20 61 6e | 64 20 50 54 59 32 20 72 | PTY1 an|d PTY2 r|
|000016d0| 65 73 70 65 63 74 69 76 | 65 6c 79 2e 20 49 66 20 |espectiv|ely. If |
|000016e0| 79 6f 75 72 20 70 74 79 | 73 20 61 72 65 6e 27 74 |your pty|s aren't|
|000016f0| 20 2a 2f 0a 58 2f 2a 20 | 6c 61 62 65 6c 6c 65 64 | */.X/* |labelled|
|00001700| 20 62 79 20 74 68 69 73 | 20 63 6f 6e 76 65 6e 74 | by this| convent|
|00001710| 69 6f 6e 2c 20 49 27 6d | 20 73 75 72 70 72 69 73 |ion, I'm| surpris|
|00001720| 65 64 20 79 6f 75 20 68 | 61 76 65 20 61 6e 79 74 |ed you h|ave anyt|
|00001730| 68 69 6e 67 20 77 6f 72 | 6b 69 6e 67 3b 20 2a 2f |hing wor|king; */|
|00001740| 0a 58 2f 2a 20 65 69 74 | 68 65 72 20 73 65 74 20 |.X/* eit|her set |
|00001750| 75 70 20 61 20 6e 65 77 | 20 70 74 79 20 62 61 6e |up a new| pty ban|
|00001760| 6b 20 77 69 74 68 20 6e | 6f 72 6d 61 6c 20 6e 61 |k with n|ormal na|
|00001770| 6d 65 73 20 6f 72 20 63 | 68 61 6e 67 65 20 74 68 |mes or c|hange th|
|00001780| 65 20 70 74 79 20 63 6f | 64 65 20 2a 2f 0a 58 2f |e pty co|de */.X/|
|00001790| 2a 20 74 68 61 74 20 61 | 6c 6c 6f 63 61 74 65 73 |* that a|llocates|
|000017a0| 20 70 74 79 73 2e 20 4e | 6f 74 65 20 74 68 61 74 | ptys. N|ote that|
|000017b0| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 20 61 6c 6c 6f | convent|ion allo|
|000017c0| 77 73 20 79 6f 75 20 74 | 6f 20 6f 6e 6c 79 20 68 |ws you t|o only h|
|000017d0| 61 76 65 20 2a 2f 0a 58 | 2f 2a 20 73 6f 6d 65 20 |ave */.X|/* some |
|000017e0| 6f 66 20 61 20 70 74 79 | 20 62 61 6e 6b 2c 20 61 |of a pty| bank, a|
|000017f0| 73 20 6c 6f 6e 67 20 61 | 73 20 6f 6e 65 20 6f 66 |s long a|s one of|
|00001800| 20 74 68 65 6d 20 69 73 | 20 74 68 65 72 65 3b 20 | them is| there; |
|00001810| 74 68 65 20 66 69 72 73 | 74 20 6c 65 74 74 65 72 |the firs|t letter|
|00001820| 20 2a 2f 0a 58 2f 2a 20 | 69 6e 20 50 54 59 32 20 | */.X/* |in PTY2 |
|00001830| 6d 75 73 74 20 69 6e 64 | 69 63 61 74 65 20 74 68 |must ind|icate th|
|00001840| 61 74 20 6f 6e 65 2e 20 | 2a 2f 0a 58 0a 58 2f 2a |at one. |*/.X.X/*|
|00001850| 20 54 68 65 20 6f 72 64 | 65 72 20 6f 66 20 50 54 | The ord|er of PT|
|00001860| 59 31 20 61 6e 64 20 50 | 54 59 32 20 69 73 20 74 |Y1 and P|TY2 is t|
|00001870| 68 65 20 70 74 79 20 73 | 65 61 72 63 68 69 6e 67 |he pty s|earching|
|00001880| 20 6f 72 64 65 72 2e 20 | 70 74 79 20 61 6c 6c 6f | order. |pty allo|
|00001890| 77 73 20 2a 2f 0a 58 2f | 2a 20 28 61 6e 64 2c 20 |ws */.X/|* (and, |
|000018a0| 61 73 20 61 20 62 72 65 | 61 6b 20 66 72 6f 6d 20 |as a bre|ak from |
|000018b0| 74 72 61 64 69 74 69 6f | 6e 2c 20 75 73 65 73 20 |traditio|n, uses |
|000018c0| 62 79 20 64 65 66 61 75 | 6c 74 29 20 72 61 6e 64 |by defau|lt) rand|
|000018d0| 6f 6d 20 73 65 61 72 63 | 68 65 73 2c 20 2a 2f 0a |om searc|hes, */.|
|000018e0| 58 2f 2a 20 73 74 61 72 | 74 69 6e 67 20 66 72 6f |X/* star|ting fro|
|000018f0| 6d 20 72 61 6e 64 6f 6d | 20 73 70 6f 74 73 20 69 |m random| spots i|
|00001900| 6e 20 50 54 59 31 20 61 | 6e 64 20 50 54 59 32 20 |n PTY1 a|nd PTY2 |
|00001910| 72 61 74 68 65 72 20 74 | 68 61 6e 20 74 68 65 20 |rather t|han the |
|00001920| 62 65 67 69 6e 6e 69 6e | 67 2e 20 2a 2f 0a 58 2f |beginnin|g. */.X/|
|00001930| 2a 20 54 68 69 73 20 68 | 61 73 20 73 65 76 65 72 |* This h|as sever|
|00001940| 61 6c 20 67 6f 6f 64 20 | 65 66 66 65 63 74 73 2c |al good |effects,|
|00001950| 20 61 6c 74 68 6f 75 67 | 68 20 79 6f 75 20 6d 61 | althoug|h you ma|
|00001960| 79 20 74 68 69 6e 6b 20 | 75 74 6d 70 20 77 69 6c |y think |utmp wil|
|00001970| 6c 20 6c 6f 6f 6b 20 2a | 2f 0a 58 2f 2a 20 61 20 |l look *|/.X/* a |
|00001980| 62 69 74 20 75 67 6c 79 | 2e 20 2a 2f 0a 58 0a 58 |bit ugly|. */.X.X|
|00001990| 2f 2a 20 49 66 20 79 6f | 75 20 77 61 6e 74 20 74 |/* If yo|u want t|
|000019a0| 6f 20 67 72 61 64 75 61 | 6c 6c 79 20 63 6f 6e 76 |o gradua|lly conv|
|000019b0| 65 72 74 20 79 6f 75 72 | 20 73 79 73 74 65 6d 20 |ert your| system |
|000019c0| 74 6f 20 75 73 69 6e 67 | 20 74 68 69 73 20 70 72 |to using| this pr|
|000019d0| 6f 67 72 61 6d 2c 20 2a | 2f 0a 58 2f 2a 20 50 54 |ogram, *|/.X/* PT|
|000019e0| 59 31 20 61 6e 64 20 50 | 54 59 32 20 73 68 6f 75 |Y1 and P|TY2 shou|
|000019f0| 6c 64 6e 27 74 20 72 65 | 66 65 72 65 6e 63 65 20 |ldn't re|ference |
|00001a00| 61 6c 6c 20 79 6f 75 72 | 20 70 74 79 73 2e 20 49 |all your| ptys. I|
|00001a10| 6e 73 74 65 61 64 2c 20 | 70 69 63 6b 20 61 20 2a |nstead, |pick a *|
|00001a20| 2f 0a 58 2f 2a 20 6c 61 | 72 67 65 20 65 6e 6f 75 |/.X/* la|rge enou|
|00001a30| 67 68 20 73 75 62 73 65 | 74 20 6f 66 20 79 6f 75 |gh subse|t of you|
|00001a40| 72 20 70 74 79 73 20 74 | 6f 20 62 65 20 75 73 61 |r ptys t|o be usa|
|00001a50| 62 6c 65 2c 20 61 6e 64 | 20 74 72 79 20 74 68 69 |ble, and| try thi|
|00001a60| 6e 67 73 20 6f 75 74 20 | 2a 2f 0a 58 2f 2a 20 77 |ngs out |*/.X/* w|
|00001a70| 69 74 68 20 6a 75 73 74 | 20 74 68 6f 73 65 2e 20 |ith just| those. |
|00001a80| 49 66 20 65 76 65 72 79 | 74 68 69 6e 67 20 77 6f |If every|thing wo|
|00001a90| 72 6b 73 20 61 6e 64 20 | 79 6f 75 20 6c 69 6b 65 |rks and |you like|
|00001aa0| 20 70 74 79 27 73 20 63 | 61 70 61 62 69 6c 69 74 | pty's c|apabilit|
|00001ab0| 69 65 73 2c 20 2a 2f 0a | 58 2f 2a 20 72 65 6d 6f |ies, */.|X/* remo|
|00001ac0| 76 65 20 79 6f 75 72 20 | 6f 6c 64 20 70 74 79 73 |ve your |old ptys|
|00001ad0| 2c 20 6f 72 20 72 65 63 | 6f 6d 70 69 6c 65 20 70 |, or rec|ompile p|
|00001ae0| 74 79 20 74 6f 20 72 65 | 66 65 72 65 6e 63 65 20 |ty to re|ference |
|00001af0| 61 6c 6c 20 6f 66 20 74 | 68 65 6d 2e 20 2a 2f 0a |all of t|hem. */.|
|00001b00| 58 0a 58 2f 2a 20 54 54 | 59 4e 41 4d 45 4c 45 4e |X.X/* TT|YNAMELEN|
|00001b10| 20 73 68 6f 75 6c 64 20 | 62 65 20 74 68 65 20 6d | should |be the m|
|00001b20| 61 78 69 6d 75 6d 20 6c | 65 6e 67 74 68 20 6f 66 |aximum l|ength of|
|00001b30| 20 61 20 74 74 79 20 28 | 6e 6f 74 20 6a 75 73 74 | a tty (|not just|
|00001b40| 20 70 74 79 21 29 20 2a | 2f 0a 58 2f 2a 20 6e 61 | pty!) *|/.X/* na|
|00001b50| 6d 65 2e 20 54 54 59 4e | 41 4d 45 4c 45 4e 20 73 |me. TTYN|AMELEN s|
|00001b60| 68 6f 75 6c 64 6e 27 74 | 20 68 61 76 65 20 74 6f |houldn't| have to|
|00001b70| 20 62 65 20 74 68 65 72 | 65 3b 20 69 74 27 73 20 | be ther|e; it's |
|00001b80| 75 73 65 64 20 74 6f 20 | 77 6f 72 6b 20 2a 2f 0a |used to |work */.|
|00001b90| 58 2f 2a 20 61 72 6f 75 | 6e 64 20 73 6f 6d 65 20 |X/* arou|nd some |
|00001ba0| 66 75 6e 64 61 6d 65 6e | 74 61 6c 20 66 61 69 6c |fundamen|tal fail|
|00001bb0| 75 72 65 73 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ures in |the curr|
|00001bc0| 65 6e 74 20 74 74 79 2f | 70 74 79 20 6d 6f 64 65 |ent tty/|pty mode|
|00001bd0| 6c 2e 20 2a 2f 0a 58 0a | 58 0a 58 2f 2a 20 53 65 |l. */.X.|X.X/* Se|
|00001be0| 63 74 69 6f 6e 20 33 3a | 20 4c 6f 67 67 69 6e 67 |ction 3:| Logging|
|00001bf0| 2e 20 2a 2f 0a 58 0a 58 | 23 69 66 6e 64 65 66 20 |. */.X.X|#ifndef |
|00001c00| 50 54 59 55 54 4d 50 5f | 46 49 4c 45 0a 58 23 64 |PTYUTMP_|FILE.X#d|
|00001c10| 65 66 69 6e 65 20 50 54 | 59 55 54 4d 50 5f 46 49 |efine PT|YUTMP_FI|
|00001c20| 4c 45 20 22 2f 65 74 63 | 2f 75 74 6d 70 22 0a 58 |LE "/etc|/utmp".X|
|00001c30| 23 65 6e 64 69 66 0a 58 | 23 69 66 6e 64 65 66 20 |#endif.X|#ifndef |
|00001c40| 50 54 59 57 54 4d 50 5f | 46 49 4c 45 0a 58 23 64 |PTYWTMP_|FILE.X#d|
|00001c50| 65 66 69 6e 65 20 50 54 | 59 57 54 4d 50 5f 46 49 |efine PT|YWTMP_FI|
|00001c60| 4c 45 20 22 2f 75 73 72 | 2f 61 64 6d 2f 77 74 6d |LE "/usr|/adm/wtm|
|00001c70| 70 22 0a 58 23 65 6e 64 | 69 66 0a 58 23 69 66 6e |p".X#end|if.X#ifn|
|00001c80| 64 65 66 20 50 54 59 55 | 54 4d 50 5f 4f 46 46 53 |def PTYU|TMP_OFFS|
|00001c90| 45 54 0a 58 23 64 65 66 | 69 6e 65 20 50 54 59 55 |ET.X#def|ine PTYU|
|00001ca0| 54 4d 50 5f 4f 46 46 53 | 45 54 20 35 0a 58 23 65 |TMP_OFFS|ET 5.X#e|
|00001cb0| 6e 64 69 66 0a 58 23 69 | 66 6e 64 65 66 20 50 54 |ndif.X#i|fndef PT|
|00001cc0| 59 57 54 4d 50 5f 4f 46 | 46 53 45 54 0a 58 23 64 |YWTMP_OF|FSET.X#d|
|00001cd0| 65 66 69 6e 65 20 50 54 | 59 57 54 4d 50 5f 4f 46 |efine PT|YWTMP_OF|
|00001ce0| 46 53 45 54 20 50 54 59 | 55 54 4d 50 5f 4f 46 46 |FSET PTY|UTMP_OFF|
|00001cf0| 53 45 54 0a 58 23 65 6e | 64 69 66 0a 58 23 69 66 |SET.X#en|dif.X#if|
|00001d00| 6e 64 65 66 20 50 54 59 | 55 54 4d 50 5f 48 4f 53 |ndef PTY|UTMP_HOS|
|00001d10| 54 0a 58 23 64 65 66 69 | 6e 65 20 50 54 59 55 54 |T.X#defi|ne PTYUT|
|00001d20| 4d 50 5f 48 4f 53 54 20 | 22 70 74 79 22 0a 58 23 |MP_HOST |"pty".X#|
|00001d30| 65 6e 64 69 66 0a 58 23 | 69 66 6e 64 65 66 20 50 |endif.X#|ifndef P|
|00001d40| 54 59 57 54 4d 50 5f 48 | 4f 53 54 0a 58 23 64 65 |TYWTMP_H|OST.X#de|
|00001d50| 66 69 6e 65 20 50 54 59 | 57 54 4d 50 5f 48 4f 53 |fine PTY|WTMP_HOS|
|00001d60| 54 20 50 54 59 55 54 4d | 50 5f 48 4f 53 54 0a 58 |T PTYUTM|P_HOST.X|
|00001d70| 23 65 6e 64 69 66 0a 58 | 23 69 66 6e 64 65 66 20 |#endif.X|#ifndef |
|00001d80| 50 54 59 55 54 4d 50 5f | 53 57 48 4f 53 54 0a 58 |PTYUTMP_|SWHOST.X|
|00001d90| 23 64 65 66 69 6e 65 20 | 50 54 59 55 54 4d 50 5f |#define |PTYUTMP_|
|00001da0| 53 57 48 4f 53 54 20 50 | 54 59 55 54 4d 50 5f 48 |SWHOST P|TYUTMP_H|
|00001db0| 4f 53 54 0a 58 23 65 6e | 64 69 66 0a 58 23 69 66 |OST.X#en|dif.X#if|
|00001dc0| 6e 64 65 66 20 50 54 59 | 57 54 4d 50 5f 53 57 48 |ndef PTY|WTMP_SWH|
|00001dd0| 4f 53 54 0a 58 23 64 65 | 66 69 6e 65 20 50 54 59 |OST.X#de|fine PTY|
|00001de0| 57 54 4d 50 5f 53 57 48 | 4f 53 54 20 22 70 74 79 |WTMP_SWH|OST "pty|
|00001df0| 2d 73 65 73 73 75 73 65 | 72 22 0a 58 23 65 6e 64 |-sessuse|r".X#end|
|00001e00| 69 66 0a 58 0a 58 2f 2a | 20 54 68 65 73 65 20 61 |if.X.X/*| These a|
|00001e10| 72 65 20 73 74 72 61 69 | 67 68 74 66 6f 72 77 61 |re strai|ghtforwa|
|00001e20| 72 64 2e 20 46 49 4c 45 | 20 69 73 20 77 68 65 72 |rd. FILE| is wher|
|00001e30| 65 20 79 6f 75 20 77 61 | 6e 74 20 74 68 65 20 6c |e you wa|nt the l|
|00001e40| 6f 67 73 2e 20 75 74 6d | 70 20 61 6e 64 20 2a 2f |ogs. utm|p and */|
|00001e50| 0a 58 2f 2a 20 77 74 6d | 70 20 61 72 65 20 61 62 |.X/* wtm|p are ab|
|00001e60| 6f 75 74 20 61 73 20 73 | 65 6e 73 69 62 6c 65 20 |out as s|ensible |
|00001e70| 61 73 20 2f 65 74 63 2f | 70 61 73 73 77 64 20 61 |as /etc/|passwd a|
|00001e80| 6e 64 20 75 6e 66 6f 72 | 74 75 6e 61 74 65 6c 79 |nd unfor|tunately|
|00001e90| 20 6a 75 73 74 20 61 73 | 20 2a 2f 0a 58 2f 2a 20 | just as| */.X/* |
|00001ea0| 70 6f 70 75 6c 61 72 3b | 20 74 79 70 69 63 61 6c |popular;| typical|
|00001eb0| 6c 79 20 74 68 65 79 27 | 72 65 20 69 6e 20 2f 65 |ly they'|re in /e|
|00001ec0| 74 63 2f 75 74 6d 70 20 | 61 6e 64 20 2f 75 73 72 |tc/utmp |and /usr|
|00001ed0| 2f 61 64 6d 2f 77 74 6d | 70 2c 20 61 6e 64 20 74 |/adm/wtm|p, and t|
|00001ee0| 68 65 20 2a 2f 0a 58 2f | 2a 20 75 74 69 6c 69 74 |he */.X/|* utilit|
|00001ef0| 79 20 70 72 6f 67 72 61 | 6d 73 20 69 6e 20 74 68 |y progra|ms in th|
|00001f00| 69 73 20 70 61 63 6b 61 | 67 65 20 73 75 70 70 6f |is packa|ge suppo|
|00001f10| 72 74 20 74 68 61 74 20 | 63 6f 6e 76 65 6e 74 69 |rt that |conventi|
|00001f20| 6f 6e 2e 20 28 77 74 6d | 70 20 6c 6f 67 73 20 2a |on. (wtm|p logs *|
|00001f30| 2f 0a 58 2f 2a 20 61 6c | 6c 20 69 6e 73 20 61 6e |/.X/* al|l ins an|
|00001f40| 64 20 6f 75 74 73 2e 20 | 75 74 6d 70 20 6f 6e 6c |d outs. |utmp onl|
|00001f50| 79 20 68 61 73 20 6f 6e | 65 20 65 6e 74 72 79 20 |y has on|e entry |
|00001f60| 70 65 72 20 6c 69 6e 65 | 2c 20 6e 61 6d 65 6c 79 |per line|, namely|
|00001f70| 20 74 68 65 20 6c 61 73 | 74 20 2a 2f 0a 58 2f 2a | the las|t */.X/*|
|00001f80| 20 77 74 6d 70 20 65 6e | 74 72 79 20 66 6f 72 20 | wtmp en|try for |
|00001f90| 69 74 2e 29 20 4f 46 46 | 53 45 54 20 69 73 20 74 |it.) OFF|SET is t|
|00001fa0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 68 61 |he numbe|r of cha|
|00001fb0| 72 73 20 66 72 6f 6d 20 | 61 20 70 74 79 20 65 78 |rs from |a pty ex|
|00001fc0| 74 65 6e 73 69 6f 6e 20 | 2a 2f 0a 58 2f 2a 20 74 |tension |*/.X/* t|
|00001fd0| 6f 20 72 65 6d 6f 76 65 | 20 66 72 6f 6d 20 61 20 |o remove| from a |
|00001fe0| 6c 6f 67 20 65 6e 74 72 | 79 3b 20 75 73 75 61 6c |log entr|y; usual|
|00001ff0| 6c 79 20 74 68 69 73 20 | 69 73 20 35 2c 20 74 6f |ly this |is 5, to|
|00002000| 20 6d 61 6b 65 20 2f 64 | 65 76 2f 74 74 79 78 78 | make /d|ev/ttyxx|
|00002010| 20 69 6e 74 6f 20 2a 2f | 0a 58 2f 2a 20 74 74 79 | into */|.X/* tty|
|00002020| 78 78 2e 20 46 69 6e 61 | 6c 6c 79 2c 20 48 4f 53 |xx. Fina|lly, HOS|
|00002030| 54 20 69 73 20 74 68 65 | 20 6e 61 6d 65 20 74 68 |T is the| name th|
|00002040| 61 74 20 79 6f 75 20 77 | 61 6e 74 20 69 6e 20 74 |at you w|ant in t|
|00002050| 68 65 20 60 60 72 65 6d | 6f 74 65 27 27 20 66 69 |he ``rem|ote'' fi|
|00002060| 65 6c 64 20 2a 2f 0a 58 | 2f 2a 20 6f 66 20 74 68 |eld */.X|/* of th|
|00002070| 65 20 6c 6f 67 3b 20 74 | 68 61 74 20 66 69 65 6c |e log; t|hat fiel|
|00002080| 64 20 69 73 20 72 61 74 | 68 65 72 20 69 6c 6c 6f |d is rat|her illo|
|00002090| 67 69 63 61 6c 2c 20 62 | 75 74 20 69 74 27 73 20 |gical, b|ut it's |
|000020a0| 74 68 65 72 65 2e 20 2a | 2f 0a 58 0a 58 2f 2a 20 |there. *|/.X.X/* |
|000020b0| 53 57 48 4f 53 54 20 69 | 73 20 61 20 76 61 72 69 |SWHOST i|s a vari|
|000020c0| 61 6e 74 20 6f 66 20 48 | 4f 53 54 2c 20 66 6f 72 |ant of H|OST, for|
|000020d0| 20 77 68 61 74 27 73 20 | 6c 6f 67 67 65 64 20 75 | what's |logged u|
|000020e0| 70 6f 6e 20 61 20 73 65 | 73 73 69 6f 6e 20 75 69 |pon a se|ssion ui|
|000020f0| 64 20 2a 2f 0a 58 2f 2a | 20 73 77 69 74 63 68 2e |d */.X/*| switch.|
|00002100| 20 2a 2f 0a 58 0a 58 2f | 2a 20 49 66 20 79 6f 75 | */.X.X/|* If you|
|00002110| 27 72 65 20 75 73 69 6e | 67 20 70 74 79 20 75 6e |'re usin|g pty un|
|00002120| 64 65 72 20 74 65 6c 6e | 65 74 2f 6c 6f 67 69 6e |der teln|et/login|
|00002130| 2f 77 68 61 74 65 76 65 | 72 2c 20 77 68 69 63 68 |/whateve|r, which|
|00002140| 20 64 6f 20 74 68 65 69 | 72 20 6f 77 6e 20 2a 2f | do thei|r own */|
|00002150| 0a 58 2f 2a 20 75 74 6d | 70 20 61 6e 64 20 77 74 |.X/* utm|p and wt|
|00002160| 6d 70 20 68 61 6e 64 6c | 69 6e 67 2c 20 74 68 65 |mp handl|ing, the|
|00002170| 6e 20 70 74 79 20 77 69 | 6c 6c 20 75 73 75 61 6c |n pty wi|ll usual|
|00002180| 6c 79 20 68 61 76 65 20 | 2d 78 55 57 2c 20 73 6f |ly have |-xUW, so|
|00002190| 20 74 68 65 73 65 20 2a | 2f 0a 58 2f 2a 20 64 65 | these *|/.X/* de|
|000021a0| 66 69 6e 65 73 20 61 72 | 65 6e 27 74 20 74 6f 6f |fines ar|en't too|
|000021b0| 20 69 6d 70 6f 72 74 61 | 6e 74 2e 20 45 78 63 65 | importa|nt. Exce|
|000021c0| 70 74 20 66 6f 72 20 53 | 57 48 4f 53 54 2c 20 77 |pt for S|WHOST, w|
|000021d0| 68 69 63 68 20 69 73 20 | 6e 65 63 65 73 73 61 72 |hich is |necessar|
|000021e0| 79 20 2a 2f 0a 58 2f 2a | 20 66 6f 72 20 73 65 73 |y */.X/*| for ses|
|000021f0| 73 75 73 65 72 27 73 20 | 61 63 74 69 6f 6e 20 74 |suser's |action t|
|00002200| 6f 20 6d 61 6b 65 20 73 | 65 6e 73 65 2e 20 2a 2f |o make s|ense. */|
|00002210| 0a 58 0a 58 0a 58 2f 2a | 20 53 65 63 74 69 6f 6e |.X.X.X/*| Section|
|00002220| 20 34 3a 20 50 72 6f 74 | 65 63 74 69 6f 6e 2e 20 | 4: Prot|ection. |
|00002230| 2a 2f 0a 58 0a 58 23 69 | 66 6e 64 65 66 20 55 53 |*/.X.X#i|fndef US|
|00002240| 45 44 50 54 59 4d 4f 44 | 45 0a 58 23 64 65 66 69 |EDPTYMOD|E.X#defi|
|00002250| 6e 65 20 55 53 45 44 50 | 54 59 4d 4f 44 45 20 30 |ne USEDP|TYMODE 0|
|00002260| 36 30 30 0a 58 23 65 6e | 64 69 66 0a 58 23 69 66 |600.X#en|dif.X#if|
|00002270| 6e 64 65 66 20 55 4e 55 | 53 45 44 50 54 59 4d 4f |ndef UNU|SEDPTYMO|
|00002280| 44 45 0a 58 23 64 65 66 | 69 6e 65 20 55 4e 55 53 |DE.X#def|ine UNUS|
|00002290| 45 44 50 54 59 4d 4f 44 | 45 20 30 36 30 30 0a 58 |EDPTYMOD|E 0600.X|
|000022a0| 23 65 6e 64 69 66 0a 58 | 23 69 66 6e 64 65 66 20 |#endif.X|#ifndef |
|000022b0| 50 54 59 4f 57 4e 45 52 | 0a 58 23 64 65 66 69 6e |PTYOWNER|.X#defin|
|000022c0| 65 20 50 54 59 4f 57 4e | 45 52 20 65 75 69 64 0a |e PTYOWN|ER euid.|
|000022d0| 58 23 65 6e 64 69 66 0a | 58 23 69 66 6e 64 65 66 |X#endif.|X#ifndef|
|000022e0| 20 50 54 59 47 52 4f 55 | 50 0a 58 23 64 65 66 69 | PTYGROU|P.X#defi|
|000022f0| 6e 65 20 50 54 59 47 52 | 4f 55 50 20 34 0a 58 23 |ne PTYGR|OUP 4.X#|
|00002300| 65 6e 64 69 66 0a 58 0a | 58 2f 2a 20 70 74 79 20 |endif.X.|X/* pty |
|00002310| 2d 78 63 20 77 69 6c 6c | 20 63 68 61 6e 67 65 20 |-xc will| change |
|00002320| 74 68 65 20 6f 77 6e 65 | 72 20 6f 66 20 74 68 65 |the owne|r of the|
|00002330| 20 70 74 79 20 62 61 63 | 6b 20 74 6f 20 50 54 59 | pty bac|k to PTY|
|00002340| 4f 57 4e 45 52 20 61 66 | 74 65 72 20 74 68 65 20 |OWNER af|ter the |
|00002350| 2a 2f 0a 58 2f 2a 20 63 | 68 69 6c 64 20 68 61 73 |*/.X/* c|hild has|
|00002360| 20 65 78 69 74 65 64 2e | 20 54 68 69 73 20 73 68 | exited.| This sh|
|00002370| 6f 75 6c 64 20 62 65 20 | 65 75 69 64 2c 20 66 6f |ould be |euid, fo|
|00002380| 72 20 74 68 65 20 65 66 | 66 65 63 74 69 76 65 20 |r the ef|fective |
|00002390| 75 69 64 20 6f 66 20 74 | 68 65 20 2a 2f 0a 58 2f |uid of t|he */.X/|
|000023a0| 2a 20 70 74 79 20 70 72 | 6f 63 65 73 73 2e 20 49 |* pty pr|ocess. I|
|000023b0| 66 20 61 20 75 73 65 72 | 20 72 75 6e 73 20 70 74 |f a user| runs pt|
|000023c0| 79 20 61 73 20 68 69 6d | 73 65 6c 66 2c 20 68 65 |y as him|self, he|
|000023d0| 20 77 6f 6e 27 74 20 67 | 65 74 20 74 6f 20 63 68 | won't g|et to ch|
|000023e0| 61 6e 67 65 20 2a 2f 0a | 58 2f 2a 20 74 68 65 20 |ange */.|X/* the |
|000023f0| 6f 77 6e 65 72 20 6f 66 | 20 74 68 65 20 70 73 65 |owner of| the pse|
|00002400| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 20 69 6e 20 |udo-term|inal in |
|00002410| 74 68 65 20 66 69 72 73 | 74 20 70 6c 61 63 65 2e |the firs|t place.|
|00002420| 20 2a 2f 0a 58 0a 58 2f | 2a 20 50 54 59 47 52 4f | */.X.X/|* PTYGRO|
|00002430| 55 50 20 73 68 6f 75 6c | 64 20 62 65 20 74 68 65 |UP shoul|d be the|
|00002440| 20 60 60 74 74 79 27 27 | 20 67 72 6f 75 70 20 69 | ``tty''| group i|
|00002450| 6e 20 2f 65 74 63 2f 67 | 72 6f 75 70 2c 20 6e 6f |n /etc/g|roup, no|
|00002460| 72 6d 61 6c 6c 79 20 34 | 2e 20 41 6c 6c 20 2a 2f |rmally 4|. All */|
|00002470| 0a 58 2f 2a 20 70 74 79 | 73 20 61 6e 64 20 74 74 |.X/* pty|s and tt|
|00002480| 79 73 20 73 68 6f 75 6c | 64 20 62 65 20 69 6e 20 |ys shoul|d be in |
|00002490| 74 68 69 73 20 67 72 6f | 75 70 20 61 74 20 61 6c |this gro|up at al|
|000024a0| 6c 20 74 69 6d 65 73 2e | 20 2a 2f 0a 58 0a 58 2f |l times.| */.X.X/|
|000024b0| 2a 20 55 53 45 44 50 54 | 59 4d 4f 44 45 20 69 73 |* USEDPT|YMODE is|
|000024c0| 20 74 68 65 20 6d 6f 64 | 65 20 6f 66 20 70 74 79 | the mod|e of pty|
|000024d0| 73 20 77 68 69 6c 65 20 | 74 68 65 79 27 72 65 20 |s while |they're |
|000024e0| 62 65 69 6e 67 20 75 73 | 65 64 2e 20 36 30 30 20 |being us|ed. 600 |
|000024f0| 69 73 20 61 20 2a 2f 0a | 58 2f 2a 20 67 6f 6f 64 |is a */.|X/* good|
|00002500| 20 63 68 6f 69 63 65 3b | 20 69 74 20 6d 65 61 6e | choice;| it mean|
|00002510| 73 20 6d 65 73 73 61 67 | 65 73 20 6f 66 66 2e 20 |s messag|es off. |
|00002520| 49 66 20 79 6f 75 20 77 | 61 6e 74 20 6d 73 67 73 |If you w|ant msgs|
|00002530| 20 79 20 62 79 20 64 65 | 66 61 75 6c 74 2c 20 2a | y by de|fault, *|
|00002540| 2f 0a 58 2f 2a 20 74 72 | 79 20 36 32 30 2e 20 44 |/.X/* tr|y 620. D|
|00002550| 6f 6e 27 74 20 75 73 65 | 20 74 68 65 20 6f 6c 64 |on't use| the old|
|00002560| 20 36 32 32 3a 20 69 74 | 27 73 20 65 78 63 65 65 | 622: it|'s excee|
|00002570| 64 69 6e 67 6c 79 20 69 | 6e 73 65 63 75 72 65 2e |dingly i|nsecure.|
|00002580| 20 2a 2f 0a 58 0a 58 2f | 2a 20 55 4e 55 53 45 44 | */.X.X/|* UNUSED|
|00002590| 50 54 59 4d 4f 44 45 20 | 69 73 20 74 68 65 20 6d |PTYMODE |is the m|
|000025a0| 6f 64 65 20 6f 66 20 70 | 74 79 73 20 77 68 69 6c |ode of p|tys whil|
|000025b0| 65 20 74 68 65 79 27 72 | 65 20 75 6e 75 73 65 64 |e they'r|e unused|
|000025c0| 2e 20 54 72 61 64 69 74 | 69 6f 6e 61 6c 6c 79 20 |. Tradit|ionally |
|000025d0| 2a 2f 0a 58 2f 2a 20 74 | 68 69 73 20 77 6f 75 6c |*/.X/* t|his woul|
|000025e0| 64 20 62 65 20 36 36 36 | 2c 20 73 6f 20 74 68 61 |d be 666|, so tha|
|000025f0| 74 20 61 6e 79 20 70 72 | 6f 63 65 73 73 20 6e 65 |t any pr|ocess ne|
|00002600| 65 64 69 6e 67 20 61 20 | 70 74 79 20 63 61 6e 20 |eding a |pty can |
|00002610| 6a 75 73 74 20 67 72 61 | 62 20 2a 2f 0a 58 2f 2a |just gra|b */.X/*|
|00002620| 20 6f 6e 65 2e 20 48 6f | 77 65 76 65 72 2c 20 74 | one. Ho|wever, t|
|00002630| 68 69 73 20 6c 65 61 64 | 73 20 74 6f 20 71 75 69 |his lead|s to qui|
|00002640| 74 65 20 61 20 66 65 77 | 20 73 65 63 75 72 69 74 |te a few| securit|
|00002650| 79 20 68 6f 6c 65 73 2e | 20 49 66 20 79 6f 75 20 |y holes.| If you |
|00002660| 68 61 76 65 20 2a 2f 0a | 58 2f 2a 20 6c 6f 74 73 |have */.|X/* lots|
|00002670| 20 6f 66 20 70 72 6f 67 | 72 61 6d 73 20 6c 69 6b | of prog|rams lik|
|00002680| 65 20 65 6d 61 63 73 20 | 74 68 61 74 20 72 65 61 |e emacs |that rea|
|00002690| 6c 6c 79 2c 20 72 65 61 | 6c 6c 79 2c 20 72 65 61 |lly, rea|lly, rea|
|000026a0| 6c 6c 79 20 77 61 6e 74 | 20 74 6f 20 75 73 65 20 |lly want| to use |
|000026b0| 2a 2f 0a 58 2f 2a 20 70 | 74 79 73 20 61 6e 64 20 |*/.X/* p|tys and |
|000026c0| 64 6f 6e 27 74 20 73 75 | 70 70 6f 72 74 20 74 68 |don't su|pport th|
|000026d0| 69 73 20 69 6e 74 65 72 | 66 61 63 65 2c 20 74 72 |is inter|face, tr|
|000026e0| 79 20 30 36 36 30 2c 20 | 61 6e 64 20 6d 61 6b 65 |y 0660, |and make|
|000026f0| 20 74 68 6f 73 65 20 2a | 2f 0a 58 2f 2a 20 70 72 | those *|/.X/* pr|
|00002700| 6f 67 72 61 6d 73 20 73 | 65 74 67 69 64 20 74 74 |ograms s|etgid tt|
|00002710| 79 2e 20 4f 74 68 65 72 | 77 69 73 65 2c 20 73 74 |y. Other|wise, st|
|00002720| 69 63 6b 20 74 6f 20 30 | 36 30 30 2e 20 2a 2f 0a |ick to 0|600. */.|
|00002730| 58 0a 58 0a 58 2f 2a 20 | 53 65 63 74 69 6f 6e 20 |X.X.X/* |Section |
|00002740| 35 3a 20 4f 74 68 65 72 | 2e 20 2a 2f 0a 58 0a 58 |5: Other|. */.X.X|
|00002750| 23 69 66 6e 64 65 66 20 | 53 49 47 52 45 54 5f 54 |#ifndef |SIGRET_T|
|00002760| 59 50 45 0a 58 23 64 65 | 66 69 6e 65 20 53 49 47 |YPE.X#de|fine SIG|
|00002770| 52 45 54 5f 54 59 50 45 | 20 69 6e 74 0a 58 23 65 |RET_TYPE| int.X#e|
|00002780| 6e 64 69 66 0a 58 0a 58 | 23 69 66 6e 64 65 66 20 |ndif.X.X|#ifndef |
|00002790| 4f 55 54 42 55 46 53 49 | 5a 45 0a 58 23 64 65 66 |OUTBUFSI|ZE.X#def|
|000027a0| 69 6e 65 20 4f 55 54 42 | 55 46 53 49 5a 45 20 31 |ine OUTB|UFSIZE 1|
|000027b0| 36 33 38 34 0a 58 23 65 | 6e 64 69 66 0a 58 0a 58 |6384.X#e|ndif.X.X|
|000027c0| 23 69 66 6e 64 65 66 20 | 47 45 4e 45 52 49 43 0a |#ifndef |GENERIC.|
|000027d0| 58 23 64 65 66 69 6e 65 | 20 47 45 4e 45 52 49 43 |X#define| GENERIC|
|000027e0| 20 63 68 61 72 0a 58 23 | 65 6e 64 69 66 0a 58 0a | char.X#|endif.X.|
|000027f0| 58 23 69 66 64 65 66 20 | 54 54 59 5f 41 55 58 43 |X#ifdef |TTY_AUXC|
|00002800| 48 41 52 53 0a 58 23 64 | 65 66 69 6e 65 20 55 53 |HARS.X#d|efine US|
|00002810| 45 53 54 41 54 0a 58 23 | 65 6e 64 69 66 0a 58 0a |ESTAT.X#|endif.X.|
|00002820| 58 2f 2a 20 53 49 47 52 | 45 54 5f 54 59 50 45 20 |X/* SIGR|ET_TYPE |
|00002830| 69 73 20 74 68 65 20 74 | 79 70 65 20 72 65 74 75 |is the t|ype retu|
|00002840| 72 6e 65 64 20 62 79 20 | 73 69 67 6e 61 6c 20 68 |rned by |signal h|
|00002850| 61 6e 64 6c 65 72 73 2e | 20 4c 6f 67 69 63 61 6c |andlers.| Logical|
|00002860| 6c 79 2c 20 69 74 20 2a | 2f 0a 58 2f 2a 20 73 68 |ly, it *|/.X/* sh|
|00002870| 6f 75 6c 64 20 62 65 20 | 76 6f 69 64 2c 20 62 75 |ould be |void, bu|
|00002880| 74 20 43 20 61 6e 64 20 | 73 69 67 6e 61 6c 73 20 |t C and |signals |
|00002890| 77 65 72 65 20 61 72 6f | 75 6e 64 20 62 65 66 6f |were aro|und befo|
|000028a0| 72 65 20 76 6f 69 64 20 | 77 61 73 2e 20 2a 2f 0a |re void |was. */.|
|000028b0| 58 0a 58 2f 2a 20 4f 55 | 54 42 55 46 53 49 5a 45 |X.X/* OU|TBUFSIZE|
|000028c0| 20 69 73 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 | is the |size of |
|000028d0| 74 68 65 20 65 78 74 72 | 61 20 62 75 66 66 65 72 |the extr|a buffer|
|000028e0| 73 20 70 72 6f 76 69 64 | 65 64 20 62 79 20 70 74 |s provid|ed by pt|
|000028f0| 79 2c 20 62 6f 74 68 20 | 2a 2f 0a 58 2f 2a 20 66 |y, both |*/.X/* f|
|00002900| 6f 72 20 64 61 74 61 20 | 63 6f 6d 69 6e 67 20 69 |or data |coming i|
|00002910| 6e 20 74 6f 20 74 68 65 | 20 70 73 65 75 64 6f 2d |n to the| pseudo-|
|00002920| 74 65 72 6d 69 6e 61 6c | 20 61 6e 64 20 66 6f 72 |terminal| and for|
|00002930| 20 64 61 74 61 20 67 6f | 69 6e 67 20 6f 75 74 2e | data go|ing out.|
|00002940| 20 2a 2f 0a 58 0a 58 2f | 2a 20 49 74 20 73 68 6f | */.X.X/|* It sho|
|00002950| 75 6c 64 20 62 65 20 70 | 6f 73 73 69 62 6c 65 20 |uld be p|ossible |
|00002960| 74 6f 20 63 61 73 74 20 | 61 6e 79 20 70 6f 69 6e |to cast |any poin|
|00002970| 74 65 72 20 74 6f 20 61 | 20 47 45 4e 45 52 49 43 |ter to a| GENERIC|
|00002980| 20 2a 20 70 6f 69 6e 74 | 65 72 20 2a 2f 0a 58 2f | * point|er */.X/|
|00002990| 2a 20 61 6e 64 20 62 61 | 63 6b 2e 20 41 67 61 69 |* and ba|ck. Agai|
|000029a0| 6e 2c 20 76 6f 69 64 20 | 6d 61 6b 65 73 20 74 68 |n, void |makes th|
|000029b0| 65 20 6d 6f 73 74 20 73 | 65 6e 73 65 20 61 6e 64 |e most s|ense and|
|000029c0| 20 69 73 20 74 68 65 20 | 62 65 73 74 20 63 68 6f | is the |best cho|
|000029d0| 69 63 65 20 2a 2f 0a 58 | 2f 2a 20 75 6e 64 65 72 |ice */.X|/* under|
|000029e0| 20 41 4e 53 49 2c 20 62 | 75 74 20 63 68 61 72 20 | ANSI, b|ut char |
|000029f0| 69 73 20 63 6f 72 72 65 | 63 74 20 61 6e 64 20 6d |is corre|ct and m|
|00002a00| 75 63 68 20 6d 6f 72 65 | 20 70 6f 72 74 61 62 6c |uch more| portabl|
|00002a10| 65 2e 20 2a 2f 0a 58 0a | 58 2f 2a 20 53 65 74 74 |e. */.X.|X/* Sett|
|00002a20| 69 6e 67 20 55 53 45 53 | 54 41 54 20 69 73 20 6e |ing USES|TAT is n|
|00002a30| 65 63 65 73 73 61 72 79 | 20 66 6f 72 20 73 79 73 |ecessary| for sys|
|00002a40| 74 65 6d 73 20 73 75 70 | 70 6f 72 74 69 6e 67 20 |tems sup|porting |
|00002a50| 61 75 78 63 68 61 72 73 | 2e 20 2a 2f 0a 58 0a 58 |auxchars|. */.X.X|
|00002a60| 0a 58 2f 2a 20 53 65 63 | 74 69 6f 6e 20 36 3a 20 |.X/* Sec|tion 6: |
|00002a70| 53 61 6e 69 74 79 20 63 | 68 65 63 6b 73 2e 20 2a |Sanity c|hecks. *|
|00002a80| 2f 0a 58 0a 58 23 69 66 | 64 65 66 20 4e 4f 5f 55 |/.X.X#if|def NO_U|
|00002a90| 4e 49 58 53 4f 43 4b 53 | 0a 58 23 64 65 66 69 6e |NIXSOCKS|.X#defin|
|00002aa0| 65 20 4e 4f 5f 46 44 50 | 41 53 53 49 4e 47 0a 58 |e NO_FDP|ASSING.X|
|00002ab0| 23 64 65 66 69 6e 65 20 | 4e 4f 5f 53 45 53 53 49 |#define |NO_SESSI|
|00002ac0| 4f 4e 0a 58 23 65 6e 64 | 69 66 0a 58 0a 58 23 69 |ON.X#end|if.X.X#i|
|00002ad0| 66 64 65 66 20 4e 4f 5f | 53 45 53 53 49 4f 4e 0a |fdef NO_|SESSION.|
|00002ae0| 58 23 69 66 64 65 66 20 | 4d 55 53 54 5f 53 45 53 |X#ifdef |MUST_SES|
|00002af0| 53 49 4f 4e 0a 58 23 75 | 6e 64 65 66 20 4d 55 53 |SION.X#u|ndef MUS|
|00002b00| 54 5f 53 45 53 53 49 4f | 4e 0a 58 23 65 6e 64 69 |T_SESSIO|N.X#endi|
|00002b10| 66 0a 58 23 65 6e 64 69 | 66 0a 58 0a 58 23 69 66 |f.X#endi|f.X.X#if|
|00002b20| 64 65 66 20 4e 4f 5f 55 | 54 4d 50 0a 58 23 69 66 |def NO_U|TMP.X#if|
|00002b30| 64 65 66 20 4d 55 53 54 | 5f 55 54 4d 50 0a 58 23 |def MUST|_UTMP.X#|
|00002b40| 75 6e 64 65 66 20 4d 55 | 53 54 5f 55 54 4d 50 0a |undef MU|ST_UTMP.|
|00002b50| 58 23 65 6e 64 69 66 0a | 58 23 65 6e 64 69 66 0a |X#endif.|X#endif.|
|00002b60| 58 0a 58 23 69 66 64 65 | 66 20 4e 4f 5f 57 54 4d |X.X#ifde|f NO_WTM|
|00002b70| 50 0a 58 23 69 66 64 65 | 66 20 4d 55 53 54 5f 57 |P.X#ifde|f MUST_W|
|00002b80| 54 4d 50 0a 58 23 75 6e | 64 65 66 20 4d 55 53 54 |TMP.X#un|def MUST|
|00002b90| 5f 57 54 4d 50 0a 58 23 | 65 6e 64 69 66 0a 58 23 |_WTMP.X#|endif.X#|
|00002ba0| 65 6e 64 69 66 0a 58 0a | 58 23 69 66 64 65 66 20 |endif.X.|X#ifdef |
|00002bb0| 4e 4f 5f 43 48 4f 57 4e | 0a 58 23 69 66 64 65 66 |NO_CHOWN|.X#ifdef|
|00002bc0| 20 4d 55 53 54 5f 43 48 | 4f 57 4e 0a 58 23 75 6e | MUST_CH|OWN.X#un|
|00002bd0| 64 65 66 20 4d 55 53 54 | 5f 43 48 4f 57 4e 0a 58 |def MUST|_CHOWN.X|
|00002be0| 23 65 6e 64 69 66 0a 58 | 23 65 6e 64 69 66 0a 58 |#endif.X|#endif.X|
|00002bf0| 0a 58 23 65 6e 64 69 66 | 0a 45 4e 44 5f 4f 46 5f |.X#endif|.END_OF_|
|00002c00| 46 49 4c 45 0a 20 20 69 | 66 20 74 65 73 74 20 39 |FILE. i|f test 9|
|00002c10| 36 31 30 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |610 -ne |`wc -c <|
|00002c20| 27 63 6f 6e 66 69 67 2e | 68 27 60 3b 20 74 68 65 |'config.|h'`; the|
|00002c30| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00002c40| 20 5c 22 27 63 6f 6e 66 | 69 67 2e 68 27 5c 22 20 | \"'conf|ig.h'\" |
|00002c50| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00002c60| 6f 6e 67 20 73 69 7a 65 | 21 0a 20 20 66 69 0a 20 |ong size|!. fi. |
|00002c70| 20 23 20 65 6e 64 20 6f | 66 20 27 63 6f 6e 66 69 | # end o|f 'confi|
|00002c80| 67 2e 68 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |g.h'.fi.|if test |
|00002c90| 2d 66 20 27 6c 6f 67 73 | 2e 63 27 20 2d 61 20 22 |-f 'logs|.c' -a "|
|00002ca0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00002cb0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00002cc0| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|00002cd0| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|00002ce0| 65 20 5c 22 27 6c 6f 67 | 73 2e 63 27 5c 22 0a 65 |e \"'log|s.c'\".e|
|00002cf0| 6c 73 65 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |lse. ec|ho shar:|
|00002d00| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 6c | Extract|ing \"'l|
|00002d10| 6f 67 73 2e 63 27 5c 22 | 20 5c 28 31 38 35 33 20 |ogs.c'\"| \(1853 |
|00002d20| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 20 20 73 |characte|rs\). s|
|00002d30| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 6c 6f |ed "s/^X|//" >'lo|
|00002d40| 67 73 2e 63 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |gs.c' <<|'END_OF_|
|00002d50| 46 49 4c 45 27 0a 58 2f | 2a 20 43 6f 70 79 72 69 |FILE'.X/|* Copyri|
|00002d60| 67 68 74 20 31 39 39 30 | 2c 20 44 61 6e 69 65 6c |ght 1990|, Daniel|
|00002d70| 20 4a 2e 20 42 65 72 6e | 73 74 65 69 6e 2e 20 41 | J. Bern|stein. A|
|00002d80| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|00002d90| 65 64 2e 20 2a 2f 0a 58 | 0a 58 23 69 6e 63 6c 75 |ed. */.X|.X#inclu|
|00002da0| 64 65 20 22 63 6f 6e 66 | 69 67 2e 68 22 0a 58 23 |de "conf|ig.h".X#|
|00002db0| 69 6e 63 6c 75 64 65 20 | 22 6c 6f 67 73 2e 68 22 |include |"logs.h"|
|00002dc0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 66 69 6c 65 |.X#inclu|de "file|
|00002dd0| 2e 68 22 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 75 |.h".X#in|clude <u|
|00002de0| 74 6d 70 2e 68 3e 0a 58 | 23 69 6e 63 6c 75 64 65 |tmp.h>.X|#include|
|00002df0| 20 3c 73 74 72 69 6e 67 | 73 2e 68 3e 0a 58 0a 58 | <string|s.h>.X.X|
|00002e00| 2f 2a 20 75 74 6d 70 20 | 61 6e 64 20 77 74 6d 70 |/* utmp |and wtmp|
|00002e10| 20 61 72 65 20 61 62 6f | 75 74 20 61 73 20 73 65 | are abo|ut as se|
|00002e20| 6e 73 69 62 6c 65 20 61 | 73 20 2f 65 74 63 2f 70 |nsible a|s /etc/p|
|00002e30| 61 73 73 77 64 2e 20 2a | 2f 0a 58 0a 58 2f 2a 20 |asswd. *|/.X.X/* |
|00002e40| 57 65 20 6e 65 76 65 72 | 20 62 6f 74 68 65 72 20 |We never| bother |
|00002e50| 74 6f 20 73 68 72 69 6e | 6b 20 2f 65 74 63 2f 75 |to shrin|k /etc/u|
|00002e60| 74 6d 70 2e 20 2a 2f 0a | 58 0a 58 65 78 74 65 72 |tmp. */.|X.Xexter|
|00002e70| 6e 20 6c 6f 6e 67 20 74 | 69 6d 65 28 29 3b 0a 58 |n long t|ime();.X|
|00002e80| 0a 58 6c 6f 6e 67 20 6e | 6f 77 28 29 0a 58 7b 0a |.Xlong n|ow().X{.|
|00002e90| 58 20 72 65 74 75 72 6e | 20 74 69 6d 65 28 28 6c |X return| time((l|
|00002ea0| 6f 6e 67 20 2a 29 20 30 | 29 3b 0a 58 7d 0a 58 0a |ong *) 0|);.X}.X.|
|00002eb0| 58 69 6e 74 20 75 74 6d | 70 28 6c 69 6e 65 2c 6e |Xint utm|p(line,n|
|00002ec0| 61 6d 65 2c 68 6f 73 74 | 2c 64 61 74 65 29 0a 58 |ame,host|,date).X|
|00002ed0| 63 68 61 72 20 2a 6c 69 | 6e 65 3b 0a 58 63 68 61 |char *li|ne;.Xcha|
|00002ee0| 72 20 2a 6e 61 6d 65 3b | 0a 58 63 68 61 72 20 2a |r *name;|.Xchar *|
|00002ef0| 68 6f 73 74 3b 0a 58 6c | 6f 6e 67 20 64 61 74 65 |host;.Xl|ong date|
|00002f00| 3b 0a 58 7b 0a 58 20 73 | 74 72 75 63 74 20 75 74 |;.X{.X s|truct ut|
|00002f10| 6d 70 20 75 74 3b 0a 58 | 20 73 74 72 75 63 74 20 |mp ut;.X| struct |
|00002f20| 75 74 6d 70 20 78 74 3b | 0a 58 20 69 6e 74 20 66 |utmp xt;|.X int f|
|00002f30| 64 3b 0a 58 20 69 6e 74 | 20 69 3b 0a 58 20 69 6e |d;.X int| i;.X in|
|00002f40| 74 20 6a 3b 0a 58 0a 58 | 20 2f 2a 20 6f 6e 6c 79 |t j;.X.X| /* only|
|00002f50| 20 75 73 65 20 6f 66 20 | 73 74 72 6e 63 70 79 2c | use of |strncpy,|
|00002f60| 20 65 76 65 72 20 2a 2f | 0a 58 20 28 76 6f 69 64 | ever */|.X (void|
|00002f70| 29 20 73 74 72 6e 63 70 | 79 28 75 74 2e 75 74 5f |) strncp|y(ut.ut_|
|00002f80| 6c 69 6e 65 2c 6c 69 6e | 65 2c 73 69 7a 65 6f 66 |line,lin|e,sizeof|
|00002f90| 28 75 74 2e 75 74 5f 6c | 69 6e 65 29 29 3b 0a 58 |(ut.ut_l|ine));.X|
|00002fa0| 20 28 76 6f 69 64 29 20 | 73 74 72 6e 63 70 79 28 | (void) |strncpy(|
|00002fb0| 75 74 2e 75 74 5f 6e 61 | 6d 65 2c 6e 61 6d 65 2c |ut.ut_na|me,name,|
|00002fc0| 73 69 7a 65 6f 66 28 75 | 74 2e 75 74 5f 6e 61 6d |sizeof(u|t.ut_nam|
|00002fd0| 65 29 29 3b 0a 58 20 28 | 76 6f 69 64 29 20 73 74 |e));.X (|void) st|
|00002fe0| 72 6e 63 70 79 28 75 74 | 2e 75 74 5f 68 6f 73 74 |rncpy(ut|.ut_host|
|00002ff0| 2c 68 6f 73 74 2c 73 69 | 7a 65 6f 66 28 75 74 2e |,host,si|zeof(ut.|
|00003000| 75 74 5f 68 6f 73 74 29 | 29 3b 0a 58 20 75 74 2e |ut_host)|);.X ut.|
|00003010| 75 74 5f 74 69 6d 65 20 | 3d 20 64 61 74 65 3b 0a |ut_time |= date;.|
|00003020| 58 0a 58 20 66 64 20 3d | 20 6f 70 65 6e 28 50 54 |X.X fd =| open(PT|
|00003030| 59 55 54 4d 50 5f 46 49 | 4c 45 2c 4f 5f 52 44 57 |YUTMP_FI|LE,O_RDW|
|00003040| 52 29 3b 0a 58 20 69 66 | 20 28 66 64 20 3d 3d 20 |R);.X if| (fd == |
|00003050| 2d 31 29 0a 58 20 20 20 | 72 65 74 75 72 6e 20 2d |-1).X |return -|
|00003060| 31 3b 0a 58 20 6a 20 3d | 20 69 20 3d 20 30 3b 0a |1;.X j =| i = 0;.|
|00003070| 58 20 77 68 69 6c 65 20 | 28 72 65 61 64 28 66 64 |X while |(read(fd|
|00003080| 2c 28 63 68 61 72 20 2a | 29 20 26 78 74 2c 73 69 |,(char *|) &xt,si|
|00003090| 7a 65 6f 66 28 78 74 29 | 29 20 3d 3d 20 73 69 7a |zeof(xt)|) == siz|
|000030a0| 65 6f 66 28 78 74 29 29 | 0a 58 20 20 7b 0a 58 20 |eof(xt))|.X {.X |
|000030b0| 20 20 69 2b 2b 3b 0a 58 | 20 20 20 69 66 20 28 73 | i++;.X| if (s|
|000030c0| 74 72 6e 63 6d 70 28 78 | 74 2e 75 74 5f 6c 69 6e |trncmp(x|t.ut_lin|
|000030d0| 65 2c 75 74 2e 75 74 5f | 6c 69 6e 65 2c 73 69 7a |e,ut.ut_|line,siz|
|000030e0| 65 6f 66 28 75 74 2e 75 | 74 5f 6c 69 6e 65 29 29 |eof(ut.u|t_line))|
|000030f0| 20 3d 3d 20 30 29 0a 58 | 20 20 20 20 7b 0a 58 20 | == 0).X| {.X |
|00003100| 20 20 20 20 6a 20 3d 20 | 69 3b 0a 58 20 20 20 20 | j = |i;.X |
|00003110| 20 62 72 65 61 6b 3b 0a | 58 20 20 20 20 7d 0a 58 | break;.|X }.X|
|00003120| 20 20 7d 0a 58 20 69 66 | 20 28 6a 29 0a 58 20 20 | }.X if| (j).X |
|00003130| 7b 0a 58 20 20 20 69 66 | 20 28 6c 73 65 65 6b 28 |{.X if| (lseek(|
|00003140| 66 64 2c 28 6c 6f 6e 67 | 29 20 28 28 6a 20 2d 20 |fd,(long|) ((j - |
|00003150| 31 29 20 2a 20 73 69 7a | 65 6f 66 28 78 74 29 29 |1) * siz|eof(xt))|
|00003160| 2c 4c 5f 53 45 54 29 20 | 3d 3d 20 2d 31 29 0a 58 |,L_SET) |== -1).X|
|00003170| 20 20 20 20 7b 0a 58 20 | 20 20 20 20 28 76 6f 69 | {.X | (voi|
|00003180| 64 29 20 63 6c 6f 73 65 | 28 66 64 29 3b 0a 58 20 |d) close|(fd);.X |
|00003190| 20 20 20 20 72 65 74 75 | 72 6e 20 2d 31 3b 0a 58 | retu|rn -1;.X|
|000031a0| 20 20 20 20 7d 0a 58 20 | 20 7d 0a 58 20 65 6c 73 | }.X | }.X els|
|000031b0| 65 0a 58 20 20 7b 0a 58 | 20 20 20 2f 2a 20 57 65 |e.X {.X| /* We|
|000031c0| 20 68 61 76 65 20 74 6f | 20 72 65 6f 70 65 6e 20 | have to| reopen |
|000031d0| 74 6f 20 61 76 6f 69 64 | 20 61 20 72 61 63 65 20 |to avoid| a race |
|000031e0| 77 69 74 68 20 6f 74 68 | 65 72 20 65 6e 64 2d 6f |with oth|er end-o|
|000031f0| 66 2d 75 74 6d 70 20 65 | 6e 74 72 69 65 73 2e 20 |f-utmp e|ntries. |
|00003200| 2a 2f 0a 58 20 20 20 28 | 76 6f 69 64 29 20 63 6c |*/.X (|void) cl|
|00003210| 6f 73 65 28 66 64 29 3b | 0a 58 20 20 20 69 66 20 |ose(fd);|.X if |
|00003220| 28 28 66 64 20 3d 20 6f | 70 65 6e 28 50 54 59 55 |((fd = o|pen(PTYU|
|00003230| 54 4d 50 5f 46 49 4c 45 | 2c 4f 5f 52 44 57 52 20 |TMP_FILE|,O_RDWR |
|00003240| 7c 20 4f 5f 41 50 50 45 | 4e 44 29 29 20 3d 3d 20 || O_APPE|ND)) == |
|00003250| 2d 31 29 0a 58 20 20 20 | 20 20 72 65 74 75 72 6e |-1).X | return|
|00003260| 20 2d 31 3b 0a 58 20 20 | 7d 0a 58 20 69 66 20 28 | -1;.X |}.X if (|
|00003270| 77 72 69 74 65 28 66 64 | 2c 28 63 68 61 72 20 2a |write(fd|,(char *|
|00003280| 29 20 26 75 74 2c 73 69 | 7a 65 6f 66 28 75 74 29 |) &ut,si|zeof(ut)|
|00003290| 29 20 3c 20 73 69 7a 65 | 6f 66 28 75 74 29 29 0a |) < size|of(ut)).|
|000032a0| 58 20 20 7b 0a 58 20 20 | 20 28 76 6f 69 64 29 20 |X {.X | (void) |
|000032b0| 63 6c 6f 73 65 28 66 64 | 29 3b 0a 58 20 20 20 72 |close(fd|);.X r|
|000032c0| 65 74 75 72 6e 20 2d 31 | 3b 0a 58 20 20 7d 0a 58 |eturn -1|;.X }.X|
|000032d0| 20 28 76 6f 69 64 29 20 | 63 6c 6f 73 65 28 66 64 | (void) |close(fd|
|000032e0| 29 3b 0a 58 20 72 65 74 | 75 72 6e 20 30 3b 0a 58 |);.X ret|urn 0;.X|
|000032f0| 7d 0a 58 0a 58 69 6e 74 | 20 77 74 6d 70 28 6c 69 |}.X.Xint| wtmp(li|
|00003300| 6e 65 2c 6e 61 6d 65 2c | 68 6f 73 74 2c 64 61 74 |ne,name,|host,dat|
|00003310| 65 29 0a 58 63 68 61 72 | 20 2a 6c 69 6e 65 3b 0a |e).Xchar| *line;.|
|00003320| 58 63 68 61 72 20 2a 6e | 61 6d 65 3b 0a 58 63 68 |Xchar *n|ame;.Xch|
|00003330| 61 72 20 2a 68 6f 73 74 | 3b 0a 58 6c 6f 6e 67 20 |ar *host|;.Xlong |
|00003340| 64 61 74 65 3b 0a 58 7b | 0a 58 20 73 74 72 75 63 |date;.X{|.X struc|
|00003350| 74 20 75 74 6d 70 20 77 | 74 3b 0a 58 20 69 6e 74 |t utmp w|t;.X int|
|00003360| 20 66 64 3b 0a 58 0a 58 | 20 28 76 6f 69 64 29 20 | fd;.X.X| (void) |
|00003370| 73 74 72 6e 63 70 79 28 | 77 74 2e 75 74 5f 6c 69 |strncpy(|wt.ut_li|
|00003380| 6e 65 2c 6c 69 6e 65 2c | 73 69 7a 65 6f 66 28 77 |ne,line,|sizeof(w|
|00003390| 74 2e 75 74 5f 6c 69 6e | 65 29 29 3b 0a 58 20 28 |t.ut_lin|e));.X (|
|000033a0| 76 6f 69 64 29 20 73 74 | 72 6e 63 70 79 28 77 74 |void) st|rncpy(wt|
|000033b0| 2e 75 74 5f 6e 61 6d 65 | 2c 6e 61 6d 65 2c 73 69 |.ut_name|,name,si|
|000033c0| 7a 65 6f 66 28 77 74 2e | 75 74 5f 6e 61 6d 65 29 |zeof(wt.|ut_name)|
|000033d0| 29 3b 0a 58 20 28 76 6f | 69 64 29 20 73 74 72 6e |);.X (vo|id) strn|
|000033e0| 63 70 79 28 77 74 2e 75 | 74 5f 68 6f 73 74 2c 68 |cpy(wt.u|t_host,h|
|000033f0| 6f 73 74 2c 73 69 7a 65 | 6f 66 28 77 74 2e 75 74 |ost,size|of(wt.ut|
|00003400| 5f 68 6f 73 74 29 29 3b | 0a 58 20 77 74 2e 75 74 |_host));|.X wt.ut|
|00003410| 5f 74 69 6d 65 20 3d 20 | 64 61 74 65 3b 0a 58 0a |_time = |date;.X.|
|00003420| 58 20 66 64 20 3d 20 6f | 70 65 6e 28 50 54 59 57 |X fd = o|pen(PTYW|
|00003430| 54 4d 50 5f 46 49 4c 45 | 2c 4f 5f 57 52 4f 4e 4c |TMP_FILE|,O_WRONL|
|00003440| 59 20 7c 20 4f 5f 41 50 | 50 45 4e 44 29 3b 0a 58 |Y | O_AP|PEND);.X|
|00003450| 20 69 66 20 28 66 64 20 | 3d 3d 20 2d 31 29 0a 58 | if (fd |== -1).X|
|00003460| 20 20 20 72 65 74 75 72 | 6e 20 2d 31 3b 0a 58 20 | retur|n -1;.X |
|00003470| 69 66 20 28 77 72 69 74 | 65 28 66 64 2c 28 63 68 |if (writ|e(fd,(ch|
|00003480| 61 72 20 2a 29 20 26 77 | 74 2c 73 69 7a 65 6f 66 |ar *) &w|t,sizeof|
|00003490| 28 77 74 29 29 20 3c 20 | 73 69 7a 65 6f 66 28 77 |(wt)) < |sizeof(w|
|000034a0| 74 29 29 0a 58 20 20 7b | 0a 58 20 20 20 28 76 6f |t)).X {|.X (vo|
|000034b0| 69 64 29 20 63 6c 6f 73 | 65 28 66 64 29 3b 0a 58 |id) clos|e(fd);.X|
|000034c0| 20 20 20 72 65 74 75 72 | 6e 20 2d 31 3b 0a 58 20 | retur|n -1;.X |
|000034d0| 20 7d 0a 58 20 28 76 6f | 69 64 29 20 63 6c 6f 73 | }.X (vo|id) clos|
|000034e0| 65 28 66 64 29 3b 0a 58 | 20 72 65 74 75 72 6e 20 |e(fd);.X| return |
|000034f0| 30 3b 0a 58 7d 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |0;.X}.EN|D_OF_FIL|
|00003500| 45 0a 20 20 69 66 20 74 | 65 73 74 20 31 38 35 33 |E. if t|est 1853|
|00003510| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 6c 6f | -ne `wc| -c <'lo|
|00003520| 67 73 2e 63 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |gs.c'`; |then. |
|00003530| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 6c | echo sh|ar: \"'l|
|00003540| 6f 67 73 2e 63 27 5c 22 | 20 75 6e 70 61 63 6b 65 |ogs.c'\"| unpacke|
|00003550| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00003560| 65 21 0a 20 20 66 69 0a | 20 20 23 20 65 6e 64 20 |e!. fi.| # end |
|00003570| 6f 66 20 27 6c 6f 67 73 | 2e 63 27 0a 66 69 0a 69 |of 'logs|.c'.fi.i|
|00003580| 66 20 74 65 73 74 20 2d | 66 20 27 70 74 79 2e 31 |f test -|f 'pty.1|
|00003590| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|000035a0| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|000035b0| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|000035c0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|000035d0| 6e 67 20 66 69 6c 65 20 | 5c 22 27 70 74 79 2e 31 |ng file |\"'pty.1|
|000035e0| 27 5c 22 0a 65 6c 73 65 | 0a 20 20 65 63 68 6f 20 |'\".else|. echo |
|000035f0| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00003600| 20 5c 22 27 70 74 79 2e | 31 27 5c 22 20 5c 28 31 | \"'pty.|1'\" \(1|
|00003610| 32 30 34 39 20 63 68 61 | 72 61 63 74 65 72 73 5c |2049 cha|racters\|
|00003620| 29 0a 20 20 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |). sed |"s/^X//"|
|00003630| 20 3e 27 70 74 79 2e 31 | 27 20 3c 3c 27 45 4e 44 | >'pty.1|' <<'END|
|00003640| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2e 54 48 20 70 |_OF_FILE|'.X.TH p|
|00003650| 74 79 20 31 0a 58 2e 53 | 48 20 4e 41 4d 45 0a 58 |ty 1.X.S|H NAME.X|
|00003660| 70 74 79 20 5c 2d 20 72 | 75 6e 20 61 20 70 72 6f |pty \- r|un a pro|
|00003670| 67 72 61 6d 20 75 6e 64 | 65 72 20 61 20 70 73 65 |gram und|er a pse|
|00003680| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 20 73 65 73 |udo-term|inal ses|
|00003690| 73 69 6f 6e 0a 58 2e 53 | 48 20 53 59 4e 54 41 58 |sion.X.S|H SYNTAX|
|000036a0| 0a 58 70 74 79 0a 58 5b | 0a 58 5c 66 42 5c 2d 71 |.Xpty.X[|.X\fB\-q|
|000036b0| 51 76 64 44 65 33 45 6a | 4a 73 53 74 54 30 5c 66 |QvdDe3Ej|JsStT0\f|
|000036c0| 49 0a 58 5d 20 5b 0a 58 | 5c 66 42 5c 2d 46 5c 66 |I.X] [.X|\fB\-F\f|
|000036d0| 49 0a 58 5d 20 5b 0a 58 | 5c 66 42 5c 2d 66 5c 66 |I.X] [.X|\fB\-f\f|
|000036e0| 49 6e 0a 58 5d 20 5b 0a | 58 5c 66 42 5c 2d 70 5c |In.X] [.|X\fB\-p\|
|000036f0| 66 49 5b 63 43 64 44 65 | 45 6e 4e 72 52 73 53 30 |fI[cCdDe|EnNrRsS0|
|00003700| 5d 0a 58 5d 20 5b 0a 58 | 5c 66 42 5c 2d 78 5c 66 |].X] [.X|\fB\-x\f|
|00003710| 49 5b 63 43 65 45 6e 4e | 6f 4f 72 52 73 53 75 55 |I[cCeEnN|oOrRsSuU|
|00003720| 77 57 78 58 5d 0a 58 5d | 20 5b 0a 58 5c 66 42 5c |wWxX].X]| [.X\fB\|
|00003730| 2d 41 43 48 55 56 57 5c | 66 49 0a 58 5d 0a 58 70 |-ACHUVW\|fI.X].Xp|
|00003740| 72 6f 67 72 61 6d 0a 58 | 5b 0a 58 61 72 67 20 2e |rogram.X|[.Xarg .|
|00003750| 2e 2e 0a 58 5d 0a 58 2e | 53 48 20 44 45 53 43 52 |...X].X.|SH DESCR|
|00003760| 49 50 54 49 4f 4e 0a 58 | 2e 49 20 70 74 79 0a 58 |IPTION.X|.I pty.X|
|00003770| 64 65 74 61 63 68 65 73 | 20 69 74 73 65 6c 66 20 |detaches| itself |
|00003780| 66 72 6f 6d 20 69 74 73 | 20 6f 72 69 67 69 6e 61 |from its| origina|
|00003790| 6c 0a 58 74 65 72 6d 69 | 6e 61 6c 2c 0a 58 61 6c |l.Xtermi|nal,.Xal|
|000037a0| 6c 6f 63 61 74 65 73 20 | 61 20 70 73 65 75 64 6f |locates |a pseudo|
|000037b0| 2d 74 65 72 6d 69 6e 61 | 6c 2c 0a 58 61 6e 64 20 |-termina|l,.Xand |
|000037c0| 72 75 6e 73 0a 58 2e 49 | 20 70 72 6f 67 72 61 6d |runs.X.I| program|
|000037d0| 0a 58 6f 6e 20 74 68 61 | 74 20 70 73 65 75 64 6f |.Xon tha|t pseudo|
|000037e0| 2d 74 65 72 6d 69 6e 61 | 6c 0a 58 77 69 74 68 20 |-termina|l.Xwith |
|000037f0| 61 6e 79 20 67 69 76 65 | 6e 20 61 72 67 75 6d 65 |any give|n argume|
|00003800| 6e 74 73 2e 0a 58 2e 49 | 20 70 74 79 0a 58 6c 65 |nts..X.I| pty.Xle|
|00003810| 74 73 20 79 6f 75 20 65 | 61 73 69 6c 79 20 64 69 |ts you e|asily di|
|00003820| 73 63 6f 6e 6e 65 63 74 | 20 66 72 6f 6d 20 61 6e |sconnect| from an|
|00003830| 64 20 72 65 63 6f 6e 6e | 65 63 74 20 74 6f 0a 58 |d reconn|ect to.X|
|00003840| 73 65 73 73 69 6f 6e 73 | 3b 0a 58 69 74 20 68 61 |sessions|;.Xit ha|
|00003850| 73 20 6f 76 65 72 20 66 | 69 66 74 79 20 6f 70 74 |s over f|ifty opt|
|00003860| 69 6f 6e 73 20 66 6f 72 | 20 70 72 65 63 69 73 65 |ions for| precise|
|00003870| 20 63 6f 6e 74 72 6f 6c | 2c 0a 58 61 6e 64 20 69 | control|,.Xand i|
|00003880| 73 20 6d 65 61 6e 74 20 | 74 6f 20 61 63 74 20 61 |s meant |to act a|
|00003890| 73 20 74 68 65 20 73 6f | 6c 65 20 69 6e 74 65 72 |s the so|le inter|
|000038a0| 66 61 63 65 0a 58 62 65 | 74 77 65 65 6e 20 70 73 |face.Xbe|tween ps|
|000038b0| 65 75 64 6f 2d 74 65 72 | 6d 69 6e 61 6c 73 20 61 |eudo-ter|minals a|
|000038c0| 6e 64 20 74 68 65 20 72 | 65 73 74 20 6f 66 20 74 |nd the r|est of t|
|000038d0| 68 65 20 73 79 73 74 65 | 6d 2e 0a 58 2e 50 50 0a |he syste|m..X.PP.|
|000038e0| 58 54 68 65 72 65 20 61 | 72 65 20 61 20 66 65 77 |XThere a|re a few|
|000038f0| 20 76 65 72 79 20 63 6f | 6d 6d 6f 6e 20 69 6e 76 | very co|mmon inv|
|00003900| 6f 63 61 74 69 6f 6e 73 | 20 6f 66 0a 58 2e 49 20 |ocations| of.X.I |
|00003910| 70 74 79 2e 0a 58 54 68 | 65 20 6d 6f 73 74 20 63 |pty..XTh|e most c|
|00003920| 6f 6d 6d 6f 6e 20 69 73 | 20 6a 75 73 74 0a 58 2e |ommon is| just.X.|
|00003930| 49 20 70 74 79 20 70 72 | 6f 67 72 61 6d 2c 0a 58 |I pty pr|ogram,.X|
|00003940| 77 69 74 68 20 6e 6f 20 | 6f 70 74 69 6f 6e 73 3b |with no |options;|
|00003950| 0a 58 74 68 69 73 20 68 | 61 73 20 73 65 76 65 72 |.Xthis h|as sever|
|00003960| 61 6c 20 65 66 66 65 63 | 74 73 20 61 73 20 64 65 |al effec|ts as de|
|00003970| 73 63 72 69 62 65 64 20 | 62 65 6c 6f 77 2e 0a 58 |scribed |below..X|
|00003980| 2e 49 20 70 74 79 20 5c | 2d 73 20 70 72 6f 67 72 |.I pty \|-s progr|
|00003990| 61 6d 0a 58 73 65 74 73 | 20 75 70 20 61 20 64 69 |am.Xsets| up a di|
|000039a0| 73 63 6f 6e 6e 65 63 74 | 61 62 6c 65 20 73 65 73 |sconnect|able ses|
|000039b0| 73 69 6f 6e 3b 0a 58 69 | 74 20 69 73 20 64 65 73 |sion;.Xi|t is des|
|000039c0| 63 72 69 62 65 64 20 66 | 75 72 74 68 65 72 20 69 |cribed f|urther i|
|000039d0| 6e 0a 58 2e 49 20 73 65 | 73 73 28 31 29 2e 0a 58 |n.X.I se|ss(1)..X|
|000039e0| 2e 49 20 70 74 79 20 5c | 2d 30 20 70 72 6f 67 72 |.I pty \|-0 progr|
|000039f0| 61 6d 0a 58 69 73 6f 6c | 61 74 65 73 20 74 68 65 |am.Xisol|ates the|
|00003a00| 20 72 65 73 74 20 6f 66 | 20 74 68 65 20 77 6f 72 | rest of| the wor|
|00003a10| 6c 64 20 66 72 6f 6d 0a | 58 2e 49 20 70 72 6f 67 |ld from.|X.I prog|
|00003a20| 72 61 6d 0a 58 69 6e 20 | 73 65 76 65 72 61 6c 20 |ram.Xin |several |
|00003a30| 77 61 79 73 3b 0a 58 69 | 74 20 69 73 20 64 65 73 |ways;.Xi|t is des|
|00003a40| 63 72 69 62 65 64 20 66 | 75 72 74 68 65 72 20 69 |cribed f|urther i|
|00003a50| 6e 0a 58 2e 49 20 63 6f | 6e 64 6f 6d 28 31 29 2e |n.X.I co|ndom(1).|
|00003a60| 0a 58 2e 50 50 0a 58 54 | 68 65 20 74 77 6f 20 6e |.X.PP.XT|he two n|
|00003a70| 65 78 74 20 6d 6f 73 74 | 20 63 6f 6d 6d 6f 6e 6c |ext most| commonl|
|00003a80| 79 20 75 73 65 64 20 6f | 70 74 69 6f 6e 73 0a 58 |y used o|ptions.X|
|00003a90| 61 72 65 20 0a 58 2e 49 | 5c 2d 64 2c 0a 58 69 66 |are .X.I|\-d,.Xif|
|00003aa0| 0a 58 2e 49 20 70 74 79 | 0a 58 69 73 20 73 74 61 |.X.I pty|.Xis sta|
|00003ab0| 72 74 65 64 20 77 69 74 | 68 6f 75 74 20 61 20 63 |rted wit|hout a c|
|00003ac0| 6f 6e 74 72 6f 6c 6c 69 | 6e 67 20 74 65 72 6d 69 |ontrolli|ng termi|
|00003ad0| 6e 61 6c 3b 0a 58 61 6e | 64 0a 58 2e 49 5c 2d 78 |nal;.Xan|d.X.I\-x|
|00003ae0| 75 2c 0a 58 77 68 69 63 | 68 20 6d 61 6b 65 73 20 |u,.Xwhic|h makes |
|00003af0| 61 6e 20 65 6e 74 72 79 | 20 69 6e 0a 58 2f 65 74 |an entry| in.X/et|
|00003b00| 63 2f 75 74 6d 70 2e 0a | 58 2e 50 50 0a 58 53 6f |c/utmp..|X.PP.XSo|
|00003b10| 6d 65 20 70 72 6f 67 72 | 61 6d 73 20 28 73 75 63 |me progr|ams (suc|
|00003b20| 68 20 61 73 0a 58 2e 49 | 20 76 69 29 0a 58 64 6f |h as.X.I| vi).Xdo|
|00003b30| 6e 27 74 20 6c 69 6b 65 | 20 74 61 6b 69 6e 67 20 |n't like| taking |
|00003b40| 69 6e 70 75 74 20 6f 72 | 20 6f 75 74 70 75 74 0a |input or| output.|
|00003b50| 58 66 72 6f 6d 20 61 20 | 70 69 70 65 3b 20 75 6e |Xfrom a |pipe; un|
|00003b60| 64 65 72 0a 58 2e 49 20 | 70 74 79 2c 0a 58 74 68 |der.X.I |pty,.Xth|
|00003b70| 65 79 20 77 6f 6e 27 74 | 20 6e 6f 74 69 63 65 20 |ey won't| notice |
|00003b80| 61 20 74 68 69 6e 67 2e | 0a 58 4f 74 68 65 72 20 |a thing.|.XOther |
|00003b90| 70 72 6f 67 72 61 6d 73 | 20 62 75 66 66 65 72 20 |programs| buffer |
|00003ba0| 61 73 20 6d 75 63 68 20 | 6f 75 74 70 75 74 20 61 |as much |output a|
|00003bb0| 73 20 70 6f 73 73 69 62 | 6c 65 0a 58 69 66 20 74 |s possib|le.Xif t|
|00003bc0| 68 65 79 27 72 65 20 69 | 6e 20 61 20 70 69 70 65 |hey're i|n a pipe|
|00003bd0| 3b 0a 58 75 6e 64 65 72 | 0a 58 2e 49 20 70 74 79 |;.Xunder|.X.I pty|
|00003be0| 2c 0a 58 74 68 65 79 27 | 6c 6c 20 62 75 66 66 65 |,.Xthey'|ll buffe|
|00003bf0| 72 20 61 74 20 6d 6f 73 | 74 20 61 20 6c 69 6e 65 |r at mos|t a line|
|00003c00| 20 6f 66 20 6f 75 74 70 | 75 74 2e 0a 58 2e 49 20 | of outp|ut..X.I |
|00003c10| 70 74 79 0a 58 69 73 20 | 76 65 72 79 20 63 61 72 |pty.Xis |very car|
|00003c20| 65 66 75 6c 20 74 6f 20 | 72 65 73 74 6f 72 65 20 |eful to |restore |
|00003c30| 74 65 72 6d 69 6e 61 6c | 20 6d 6f 64 65 73 20 75 |terminal| modes u|
|00003c40| 70 6f 6e 0a 58 73 74 6f | 70 70 69 6e 67 20 6f 72 |pon.Xsto|pping or|
|00003c50| 20 65 78 69 74 69 6e 67 | 3b 0a 58 61 20 63 61 72 | exiting|;.Xa car|
|00003c60| 65 6c 65 73 73 0a 58 2e | 49 20 70 72 6f 67 72 61 |eless.X.|I progra|
|00003c70| 6d 0a 58 69 73 20 73 68 | 69 65 6c 64 65 64 20 66 |m.Xis sh|ielded f|
|00003c80| 72 6f 6d 20 79 6f 75 72 | 20 74 65 72 6d 69 6e 61 |rom your| termina|
|00003c90| 6c 2e 0a 58 4f 74 68 65 | 72 77 69 73 65 2c 0a 58 |l..XOthe|rwise,.X|
|00003ca0| 2e 49 20 70 74 79 20 70 | 72 6f 67 72 61 6d 0a 58 |.I pty p|rogram.X|
|00003cb0| 73 68 6f 75 6c 64 20 66 | 65 65 6c 20 6a 75 73 74 |should f|eel just|
|00003cc0| 20 6c 69 6b 65 0a 58 2e | 49 20 70 72 6f 67 72 61 | like.X.|I progra|
|00003cd0| 6d 2e 0a 58 2e 50 50 0a | 58 2e 49 20 70 74 79 0a |m..X.PP.|X.I pty.|
|00003ce0| 58 63 68 61 6e 67 65 73 | 20 74 68 65 20 6f 72 69 |Xchanges| the ori|
|00003cf0| 67 69 6e 61 6c 20 74 65 | 72 6d 69 6e 61 6c 20 74 |ginal te|rminal t|
|00003d00| 6f 20 63 68 61 72 61 63 | 74 65 72 2d 61 74 2d 61 |o charac|ter-at-a|
|00003d10| 2d 74 69 6d 65 0a 58 28 | 72 61 77 2c 20 63 62 72 |-time.X(|raw, cbr|
|00003d20| 65 61 6b 2c 20 61 6e 64 | 20 6e 6f 65 63 68 6f 29 |eak, and| noecho)|
|00003d30| 20 6d 6f 64 65 3b 20 69 | 74 20 73 65 74 73 20 74 | mode; i|t sets t|
|00003d40| 68 65 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |he pseud|o-termin|
|00003d50| 61 6c 20 74 6f 0a 58 74 | 68 65 20 6f 72 69 67 69 |al to.Xt|he origi|
|00003d60| 6e 61 6c 20 6d 6f 64 65 | 2e 20 57 68 65 6e 0a 58 |nal mode|. When.X|
|00003d70| 2e 49 20 70 72 6f 67 72 | 61 6d 0a 58 66 69 6e 69 |.I progr|am.Xfini|
|00003d80| 73 68 65 73 2c 0a 58 2e | 49 20 70 74 79 0a 58 77 |shes,.X.|I pty.Xw|
|00003d90| 69 6c 6c 20 73 65 74 20 | 74 68 65 20 6f 72 69 67 |ill set |the orig|
|00003da0| 69 6e 61 6c 20 74 65 72 | 6d 69 6e 61 6c 20 62 61 |inal ter|minal ba|
|00003db0| 63 6b 20 74 6f 20 69 74 | 73 20 6f 72 69 67 69 6e |ck to it|s origin|
|00003dc0| 61 6c 20 6d 6f 64 65 2e | 0a 58 41 6e 79 20 6d 6f |al mode.|.XAny mo|
|00003dd0| 64 65 20 63 68 61 6e 67 | 65 73 20 6f 6e 20 74 68 |de chang|es on th|
|00003de0| 65 20 70 73 65 75 64 6f | 2d 74 65 72 6d 69 6e 61 |e pseudo|-termina|
|00003df0| 6c 20 77 69 6c 6c 20 62 | 65 20 6c 6f 73 74 2e 0a |l will b|e lost..|
|00003e00| 58 2e 50 50 0a 58 2e 49 | 20 70 74 79 0a 58 73 65 |X.PP.X.I| pty.Xse|
|00003e10| 74 73 20 66 69 6c 65 20 | 64 65 73 63 72 69 70 74 |ts file |descript|
|00003e20| 6f 72 20 30 20 74 6f 20 | 69 6e 70 75 74 20 66 72 |or 0 to |input fr|
|00003e30| 6f 6d 20 74 68 65 0a 58 | 70 73 65 75 64 6f 2d 74 |om the.X|pseudo-t|
|00003e40| 65 72 6d 69 6e 61 6c 2c | 20 31 20 61 6e 64 20 32 |erminal,| 1 and 2|
|00003e50| 20 74 6f 20 6f 75 74 70 | 75 74 2e 0a 58 2e 49 20 | to outp|ut..X.I |
|00003e60| 70 74 79 0a 58 61 6c 73 | 6f 20 73 75 70 70 6f 72 |pty.Xals|o suppor|
|00003e70| 74 73 20 74 68 65 20 60 | 60 33 20 69 73 20 2f 64 |ts the `|`3 is /d|
|00003e80| 65 76 2f 74 74 79 27 27 | 20 63 6f 6e 76 65 6e 74 |ev/tty''| convent|
|00003e90| 69 6f 6e 3a 0a 58 69 74 | 20 73 65 74 73 20 75 70 |ion:.Xit| sets up|
|00003ea0| 20 66 69 6c 65 20 64 65 | 73 63 72 69 70 74 6f 72 | file de|scriptor|
|00003eb0| 20 33 20 66 6f 72 20 69 | 6e 70 75 74 20 66 72 6f | 3 for i|nput fro|
|00003ec0| 6d 2c 20 6f 75 74 70 75 | 74 20 74 6f 2c 0a 58 61 |m, outpu|t to,.Xa|
|00003ed0| 6e 64 20 74 65 72 6d 69 | 6e 61 6c 20 63 6f 6d 6d |nd termi|nal comm|
|00003ee0| 61 6e 64 73 20 66 6f 72 | 0a 58 2f 64 65 76 2f 74 |ands for|.X/dev/t|
|00003ef0| 74 79 0a 58 28 6e 6f 74 | 20 74 68 65 20 6f 72 69 |ty.X(not| the ori|
|00003f00| 67 69 6e 61 6c 20 74 74 | 79 2c 20 62 75 74 20 74 |ginal tt|y, but t|
|00003f10| 68 65 20 70 73 65 75 64 | 6f 20 74 74 79 29 2e 0a |he pseud|o tty)..|
|00003f20| 58 2e 50 50 0a 58 4f 70 | 74 69 6f 6e 73 0a 58 2e |X.PP.XOp|tions.X.|
|00003f30| 42 20 41 43 48 55 56 57 | 0a 58 70 72 69 6e 74 20 |B ACHUVW|.Xprint |
|00003f40| 74 68 65 20 61 75 74 68 | 6f 72 73 68 69 70 20 6e |the auth|orship n|
|00003f50| 6f 74 69 63 65 2c 0a 58 | 63 6f 70 79 72 69 67 68 |otice,.X|copyrigh|
|00003f60| 74 20 6e 6f 74 69 63 65 | 2c 0a 58 68 65 6c 70 20 |t notice|,.Xhelp |
|00003f70| 6e 6f 74 69 63 65 2c 0a | 58 73 68 6f 72 74 20 75 |notice,.|Xshort u|
|00003f80| 73 61 67 65 20 73 75 6d | 6d 61 72 79 2c 0a 58 76 |sage sum|mary,.Xv|
|00003f90| 65 72 73 69 6f 6e 20 6e | 75 6d 62 65 72 2c 0a 58 |ersion n|umber,.X|
|00003fa0| 61 6e 64 20 77 61 72 72 | 61 6e 74 79 20 69 6e 66 |and warr|anty inf|
|00003fb0| 6f 72 6d 61 74 69 6f 6e | 20 72 65 73 70 65 63 74 |ormation| respect|
|00003fc0| 69 76 65 6c 79 2e 0a 58 | 2e 50 50 0a 58 2e 49 20 |ively..X|.PP.X.I |
|00003fd0| 70 74 79 0a 58 68 61 73 | 20 71 75 69 74 65 20 61 |pty.Xhas| quite a|
|00003fe0| 20 66 65 77 20 66 6c 61 | 67 73 2c 0a 58 70 72 6f | few fla|gs,.Xpro|
|00003ff0| 63 65 73 73 65 64 20 6c | 65 66 74 20 74 6f 20 72 |cessed l|eft to r|
|00004000| 69 67 68 74 3a 0a 58 2e | 54 50 20 31 32 0a 58 5c |ight:.X.|TP 12.X\|
|00004010| 66 42 5c 2d 64 5c 66 49 | 0a 58 2e 49 20 70 74 79 |fB\-d\fI|.X.I pty|
|00004020| 0a 58 77 69 6c 6c 20 61 | 73 73 75 6d 65 20 69 74 |.Xwill a|ssume it|
|00004030| 20 69 73 20 61 6c 72 65 | 61 64 79 20 64 65 74 61 | is alre|ady deta|
|00004040| 63 68 65 64 20 66 72 6f | 6d 20 74 68 65 20 74 65 |ched fro|m the te|
|00004050| 72 6d 69 6e 61 6c 2e 0a | 58 54 68 69 73 20 66 6f |rminal..|XThis fo|
|00004060| 72 63 65 73 0a 58 2e 42 | 5c 2d 54 3b 0a 58 69 74 |rces.X.B|\-T;.Xit|
|00004070| 20 73 65 74 73 20 62 75 | 74 20 64 6f 65 73 6e 27 | sets bu|t doesn'|
|00004080| 74 20 66 6f 72 63 65 0a | 58 2e 42 5c 2d 4a 2e 0a |t force.|X.B\-J..|
|00004090| 58 41 6c 73 6f 2c 20 69 | 6e 73 74 65 61 64 20 6f |XAlso, i|nstead o|
|000040a0| 66 20 63 6f 70 79 69 6e | 67 20 70 73 65 75 64 6f |f copyin|g pseudo|
|000040b0| 2d 74 65 72 6d 69 6e 61 | 6c 20 6d 6f 64 65 73 20 |-termina|l modes |
|000040c0| 66 72 6f 6d 0a 58 74 68 | 65 20 6f 72 69 67 69 6e |from.Xth|e origin|
|000040d0| 61 6c 20 74 65 72 6d 69 | 6e 61 6c 2c 0a 58 2e 49 |al termi|nal,.X.I|
|000040e0| 20 70 74 79 0a 58 77 69 | 6c 6c 20 73 65 74 20 75 | pty.Xwi|ll set u|
|000040f0| 70 20 61 20 67 65 6e 65 | 72 69 63 20 6e 65 77 2d |p a gene|ric new-|
|00004100| 64 69 73 63 69 70 6c 69 | 6e 65 20 6c 69 6e 65 2d |discipli|ne line-|
|00004110| 61 74 2d 61 2d 74 69 6d | 65 20 6d 6f 64 65 2e 0a |at-a-tim|e mode..|
|00004120| 58 2e 54 50 0a 58 5c 66 | 42 5c 2d 44 5c 66 49 0a |X.TP.X\f|B\-D\fI.|
|00004130| 58 2e 49 20 70 74 79 0a | 58 77 69 6c 6c 20 61 73 |X.I pty.|Xwill as|
|00004140| 73 75 6d 65 20 74 68 61 | 74 20 69 74 20 69 73 20 |sume tha|t it is |
|00004150| 61 74 74 61 63 68 65 64 | 20 74 6f 20 61 20 74 65 |attached| to a te|
|00004160| 72 6d 69 6e 61 6c 20 28 | 64 65 66 61 75 6c 74 29 |rminal (|default)|
|00004170| 2e 0a 58 54 68 69 73 20 | 73 65 74 73 0a 58 2e 42 |..XThis |sets.X.B|
|00004180| 5c 2d 6a 74 2e 0a 58 2e | 54 50 0a 58 5c 66 42 5c |\-jt..X.|TP.X\fB\|
|00004190| 2d 65 5c 66 49 0a 58 50 | 72 65 73 65 72 76 65 0a |-e\fI.XP|reserve.|
|000041a0| 58 73 74 61 6e 64 61 72 | 64 20 65 72 72 6f 72 20 |Xstandar|d error |
|000041b0| 28 66 69 6c 65 20 64 65 | 73 63 72 69 70 74 6f 72 |(file de|scriptor|
|000041c0| 20 32 29 0a 58 61 6e 64 | 20 73 74 61 6e 64 61 72 | 2).Xand| standar|
|000041d0| 64 20 74 74 79 20 28 66 | 69 6c 65 20 64 65 73 63 |d tty (f|ile desc|
|000041e0| 72 69 70 74 6f 72 20 33 | 29 2e 0a 58 2e 54 50 0a |riptor 3|)..X.TP.|
|000041f0| 58 5c 66 42 5c 2d 33 5c | 66 49 0a 58 50 72 65 73 |X\fB\-3\|fI.XPres|
|00004200| 65 72 76 65 20 66 64 20 | 33 2c 20 62 75 74 20 70 |erve fd |3, but p|
|00004210| 6f 69 6e 74 20 66 64 20 | 32 20 61 74 20 74 68 65 |oint fd |2 at the|
|00004220| 20 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c | pseudo-|terminal|
|00004230| 2e 0a 58 2e 54 50 0a 58 | 5c 66 42 5c 2d 45 5c 66 |..X.TP.X|\fB\-E\f|
|00004240| 49 0a 58 44 69 72 65 63 | 74 20 62 6f 74 68 20 66 |I.XDirec|t both f|
|00004250| 69 6c 65 20 64 65 73 63 | 72 69 70 74 6f 72 73 20 |ile desc|riptors |
|00004260| 74 6f 20 74 68 65 20 70 | 73 65 75 64 6f 2d 74 65 |to the p|seudo-te|
|00004270| 72 6d 69 6e 61 6c 20 28 | 64 65 66 61 75 6c 74 29 |rminal (|default)|
|00004280| 2e 0a 58 28 41 63 74 75 | 61 6c 6c 79 2c 0a 58 2e |..X(Actu|ally,.X.|
|00004290| 49 20 70 74 79 0a 58 77 | 69 6c 6c 20 70 6f 69 6e |I pty.Xw|ill poin|
|000042a0| 74 20 73 74 61 6e 64 61 | 72 64 20 65 72 72 6f 72 |t standa|rd error|
|000042b0| 20 61 74 20 74 68 65 20 | 74 74 79 20 62 79 20 6e | at the |tty by n|
|000042c0| 61 6d 65 2c 0a 58 62 75 | 74 20 66 64 20 33 20 61 |ame,.Xbu|t fd 3 a|
|000042d0| 74 20 2f 64 65 76 2f 74 | 74 79 2c 0a 58 73 6f 20 |t /dev/t|ty,.Xso |
|000042e0| 74 68 61 74 20 76 61 72 | 69 6f 75 73 0a 58 2e 49 |that var|ious.X.I|
|000042f0| 20 69 6f 63 74 6c 28 29 | 0a 58 63 6f 6d 6d 61 6e | ioctl()|.Xcomman|
|00004300| 64 73 20 6f 6e 20 66 64 | 20 33 20 77 69 6c 6c 20 |ds on fd| 3 will |
|00004310| 77 6f 72 6b 2e 29 0a 58 | 41 6c 73 6f 20 63 6c 6f |work.).X|Also clo|
|00004320| 73 65 20 61 6c 6c 20 68 | 69 67 68 65 72 2d 6e 75 |se all h|igher-nu|
|00004330| 6d 62 65 72 65 64 20 66 | 69 6c 65 20 64 65 73 63 |mbered f|ile desc|
|00004340| 72 69 70 74 6f 72 73 2e | 0a 58 2e 54 50 0a 58 5c |riptors.|.X.TP.X\|
|00004350| 66 42 5c 2d 6a 5c 66 49 | 0a 58 4a 6f 62 20 63 6f |fB\-j\fI|.XJob co|
|00004360| 6e 74 72 6f 6c 20 28 64 | 65 66 61 75 6c 74 29 3a |ntrol (d|efault):|
|00004370| 20 57 68 65 6e 0a 58 2e | 49 20 70 72 6f 67 72 61 | When.X.|I progra|
|00004380| 6d 0a 58 73 74 6f 70 73 | 2c 0a 58 2e 49 20 70 74 |m.Xstops|,.X.I pt|
|00004390| 79 0a 58 73 74 6f 70 73 | 2e 0a 58 57 68 65 6e 20 |y.Xstops|..XWhen |
|000043a0| 0a 58 2e 49 20 70 74 79 | 0a 58 69 73 20 72 65 73 |.X.I pty|.Xis res|
|000043b0| 74 61 72 74 65 64 2c 0a | 58 69 74 20 72 65 73 74 |tarted,.|Xit rest|
|000043c0| 61 72 74 73 0a 58 2e 49 | 20 70 72 6f 67 72 61 6d |arts.X.I| program|
|000043d0| 2e 0a 58 2e 54 50 0a 58 | 5c 66 42 5c 2d 4a 5c 66 |..X.TP.X|\fB\-J\f|
|000043e0| 49 0a 58 4e 6f 20 6a 6f | 62 20 63 6f 6e 74 72 6f |I.XNo jo|b contro|
|000043f0| 6c 2e 0a 58 49 66 0a 58 | 2e 49 20 70 72 6f 67 72 |l..XIf.X|.I progr|
|00004400| 61 6d 0a 58 73 74 6f 70 | 73 2c 0a 58 2e 49 20 70 |am.Xstop|s,.X.I p|
|00004410| 74 79 0a 58 77 69 6c 6c | 20 69 67 6e 6f 72 65 20 |ty.Xwill| ignore |
|00004420| 69 74 0a 58 28 74 68 6f | 75 67 68 20 69 74 20 77 |it.X(tho|ugh it w|
|00004430| 69 6c 6c 20 61 6c 77 61 | 79 73 20 72 65 73 74 61 |ill alwa|ys resta|
|00004440| 72 74 20 69 74 20 75 70 | 6f 6e 20 61 20 72 65 63 |rt it up|on a rec|
|00004450| 6f 6e 6e 65 63 74 29 2e | 0a 58 54 68 69 73 20 62 |onnect).|.XThis b|
|00004460| 65 68 61 76 69 6f 72 20 | 69 73 20 6d 75 63 68 20 |ehavior |is much |
|00004470| 6c 65 73 73 0a 58 61 6e | 74 69 73 6f 63 69 61 6c |less.Xan|tisocial|
|00004480| 20 74 68 61 6e 0a 58 74 | 68 65 20 62 65 68 61 76 | than.Xt|he behav|
|00004490| 69 6f 72 20 6f 66 20 74 | 68 65 20 70 72 65 76 69 |ior of t|he previ|
|000044a0| 6f 75 73 0a 58 2e 49 20 | 70 74 79 0a 58 76 65 72 |ous.X.I |pty.Xver|
|000044b0| 73 69 6f 6e 2e 0a 58 2e | 54 50 0a 58 5c 66 42 5c |sion..X.|TP.X\fB\|
|000044c0| 2d 74 5c 66 49 0a 58 2e | 49 20 70 74 79 0a 58 77 |-t\fI.X.|I pty.Xw|
|000044d0| 69 6c 6c 20 73 65 74 20 | 74 68 65 0a 58 6f 72 69 |ill set |the.Xori|
|000044e0| 67 69 6e 61 6c 20 74 65 | 72 6d 69 6e 61 6c 20 74 |ginal te|rminal t|
|000044f0| 6f 0a 58 6e 6f 2d 65 63 | 68 6f 2c 20 63 68 61 72 |o.Xno-ec|ho, char|
|00004500| 61 63 74 65 72 2d 61 74 | 2d 61 2d 74 69 6d 65 20 |acter-at|-a-time |
|00004510| 6d 6f 64 65 20 28 64 65 | 66 61 75 6c 74 29 2e 0a |mode (de|fault)..|
|00004520| 58 2e 54 50 0a 58 5c 66 | 42 5c 2d 54 5c 66 49 0a |X.TP.X\f|B\-T\fI.|
|00004530| 58 2e 49 20 70 74 79 0a | 58 77 69 6c 6c 20 6e 6f |X.I pty.|Xwill no|
|00004540| 74 20 74 6f 75 63 68 20 | 74 68 65 20 6f 72 69 67 |t touch |the orig|
|00004550| 69 6e 61 6c 20 74 65 72 | 6d 69 6e 61 6c 2c 20 69 |inal ter|minal, i|
|00004560| 66 20 74 68 65 72 65 20 | 69 73 20 6f 6e 65 2e 0a |f there |is one..|
|00004570| 58 49 74 20 69 73 20 61 | 6c 77 61 79 73 20 64 61 |XIt is a|lways da|
|00004580| 6e 67 65 72 6f 75 73 20 | 74 6f 20 70 75 74 20 74 |ngerous |to put t|
|00004590| 77 6f 20 70 72 6f 67 72 | 61 6d 73 20 69 6e 20 61 |wo progr|ams in a|
|000045a0| 20 70 69 70 65 20 69 66 | 20 62 6f 74 68 0a 58 63 | pipe if| both.Xc|
|000045b0| 68 61 6e 67 65 20 74 74 | 79 20 6d 6f 64 65 73 3b |hange tt|y modes;|
|000045c0| 0a 58 2e 49 20 70 74 79 | 2c 0a 58 2e 49 20 76 69 |.X.I pty|,.X.I vi|
|000045d0| 2c 0a 58 61 6e 64 0a 58 | 2e 49 20 6d 6f 72 65 0a |,.Xand.X|.I more.|
|000045e0| 58 61 72 65 20 65 78 61 | 6d 70 6c 65 73 20 6f 66 |Xare exa|mples of|
|000045f0| 20 73 75 63 68 20 70 72 | 6f 67 72 61 6d 73 2e 20 | such pr|ograms. |
|00004600| 49 66 20 79 6f 75 20 75 | 73 65 0a 58 2e 49 20 70 |If you u|se.X.I p|
|00004610| 74 79 0a 58 69 6e 20 61 | 20 70 69 70 65 0a 58 77 |ty.Xin a| pipe.Xw|
|00004620| 69 74 68 20 61 6e 6f 74 | 68 65 72 20 74 74 79 2d |ith anot|her tty-|
|00004630| 6d 6f 64 65 2d 63 68 61 | 6e 67 69 6e 67 20 70 72 |mode-cha|nging pr|
|00004640| 6f 67 72 61 6d 2c 0a 58 | 6d 61 6b 65 20 73 75 72 |ogram,.X|make sur|
|00004650| 65 20 74 6f 20 73 70 65 | 63 69 66 79 0a 58 2e 42 |e to spe|cify.X.B|
|00004660| 5c 2d 30 0a 58 28 77 68 | 69 63 68 20 69 73 20 61 |\-0.X(wh|ich is a|
|00004670| 6e 20 61 62 62 72 65 76 | 69 61 74 69 6f 6e 20 66 |n abbrev|iation f|
|00004680| 6f 72 0a 58 2e 42 5c 2d | 65 53 54 70 30 29 0a 58 |or.X.B\-|eSTp0).X|
|00004690| 73 6f 20 74 68 61 74 0a | 58 2e 49 20 70 74 79 0a |so that.|X.I pty.|
|000046a0| 58 77 69 6c 6c 20 6e 65 | 69 74 68 65 72 20 61 66 |Xwill ne|ither af|
|000046b0| 66 65 63 74 20 6e 6f 72 | 20 62 65 20 61 66 66 65 |fect nor| be affe|
|000046c0| 63 74 65 64 20 62 79 20 | 74 68 65 20 6f 74 68 65 |cted by |the othe|
|000046d0| 72 20 70 72 6f 67 72 61 | 6d 2e 0a 58 49 66 20 79 |r progra|m..XIf y|
|000046e0| 6f 75 20 75 73 65 20 61 | 20 70 69 70 65 20 6f 66 |ou use a| pipe of|
|000046f0| 20 70 74 79 73 2c 0a 58 | 79 6f 75 20 73 68 6f 75 | ptys,.X|you shou|
|00004700| 6c 64 20 70 72 6f 62 61 | 62 6c 79 20 73 70 65 63 |ld proba|bly spec|
|00004710| 69 66 79 0a 58 2e 42 5c | 2d 30 0a 58 69 6e 20 61 |ify.X.B\|-0.Xin a|
|00004720| 6c 6c 20 62 75 74 20 6f | 6e 65 2e 0a 58 2e 54 50 |ll but o|ne..X.TP|
|00004730| 0a 58 5c 66 42 5c 2d 73 | 5c 66 49 0a 58 53 65 73 |.X\fB\-s|\fI.XSes|
|00004740| 73 69 6f 6e 2e 0a 58 57 | 68 65 6e 20 74 68 65 20 |sion..XW|hen the |
|00004750| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 69 73 20 68 75 |connecti|on is hu|
|00004760| 6e 67 20 75 70 20 6f 72 | 20 6d 61 6e 75 61 6c 6c |ng up or| manuall|
|00004770| 79 20 64 69 73 63 6f 6e | 6e 65 63 74 65 64 2c 0a |y discon|nected,.|
|00004780| 58 2e 49 20 70 74 79 0a | 58 77 69 6c 6c 20 70 61 |X.I pty.|Xwill pa|
|00004790| 74 69 65 6e 74 6c 79 20 | 77 61 69 74 20 66 6f 72 |tiently |wait for|
|000047a0| 20 61 0a 58 72 65 63 6f | 6e 6e 65 63 74 69 6f 6e | a.Xreco|nnection|
|000047b0| 2e 0a 58 2e 49 20 70 72 | 6f 67 72 61 6d 0a 58 77 |..X.I pr|ogram.Xw|
|000047c0| 6f 6e 27 74 20 6e 6f 74 | 69 63 65 20 61 20 74 68 |on't not|ice a th|
|000047d0| 69 6e 67 2e 0a 58 2e 42 | 5c 2d 73 0a 58 73 65 74 |ing..X.B|\-s.Xset|
|000047e0| 73 20 62 75 74 20 64 6f | 65 73 20 6e 6f 74 20 66 |s but do|es not f|
|000047f0| 6f 72 63 65 0a 58 2e 42 | 5c 2d 78 75 2e 0a 58 49 |orce.X.B|\-xu..XI|
|00004800| 74 20 66 6f 72 63 65 73 | 0a 58 2e 42 5c 2d 45 2e |t forces|.X.B\-E.|
|00004810| 0a 58 2e 54 50 0a 58 5c | 66 42 5c 2d 53 5c 66 49 |.X.TP.X\|fB\-S\fI|
|00004820| 0a 58 4e 6f 20 73 65 73 | 73 69 6f 6e 20 28 64 65 |.XNo ses|sion (de|
|00004830| 66 61 75 6c 74 29 2e 0a | 58 57 68 65 6e 20 74 68 |fault)..|XWhen th|
|00004840| 65 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 69 73 20 |e connec|tion is |
|00004850| 68 75 6e 67 20 75 70 2c | 0a 58 2e 49 20 70 74 79 |hung up,|.X.I pty|
|00004860| 0a 58 77 69 6c 6c 20 73 | 65 6e 64 20 61 20 48 55 |.Xwill s|end a HU|
|00004870| 50 20 74 6f 0a 58 2e 49 | 20 70 72 6f 67 72 61 6d |P to.X.I| program|
|00004880| 2e 0a 58 2e 42 5c 2d 53 | 0a 58 73 65 74 73 20 62 |..X.B\-S|.Xsets b|
|00004890| 75 74 20 64 6f 65 73 20 | 6e 6f 74 20 66 6f 72 63 |ut does |not forc|
|000048a0| 65 0a 58 2e 42 5c 2d 78 | 55 2e 0a 58 2e 54 50 0a |e.X.B\-x|U..X.TP.|
|000048b0| 58 5c 66 42 5c 2d 71 5c | 66 49 0a 58 51 75 69 65 |X\fB\-q\|fI.XQuie|
|000048c0| 74 2e 0a 58 2e 49 20 70 | 74 79 0a 58 77 69 6c 6c |t..X.I p|ty.Xwill|
|000048d0| 20 70 72 69 6e 74 20 61 | 62 73 6f 6c 75 74 65 6c | print a|bsolutel|
|000048e0| 79 20 6e 6f 74 68 69 6e | 67 20 6f 6e 20 73 74 61 |y nothin|g on sta|
|000048f0| 6e 64 61 72 64 20 65 72 | 72 6f 72 2e 0a 58 49 74 |ndard er|ror..XIt|
|00004900| 20 77 69 6c 6c 20 63 6f | 6d 6d 75 6e 69 63 61 74 | will co|mmunicat|
|00004910| 65 20 73 74 72 61 6e 67 | 65 20 65 76 65 6e 74 73 |e strang|e events|
|00004920| 20 74 68 72 6f 75 67 68 | 20 69 74 73 20 65 78 69 | through| its exi|
|00004930| 74 20 63 6f 64 65 2e 0a | 58 2e 54 50 0a 58 5c 66 |t code..|X.TP.X\f|
|00004940| 42 5c 2d 51 5c 66 49 0a | 58 4e 6f 74 20 71 75 69 |B\-Q\fI.|XNot qui|
|00004950| 65 74 20 28 64 65 66 61 | 75 6c 74 29 2e 0a 58 2e |et (defa|ult)..X.|
|00004960| 49 20 70 74 79 0a 58 77 | 69 6c 6c 20 67 65 6e 65 |I pty.Xw|ill gene|
|00004970| 72 61 74 65 20 62 69 74 | 73 20 6f 66 20 63 68 61 |rate bit|s of cha|
|00004980| 74 74 65 72 20 61 62 6f | 75 74 20 69 6e 74 65 72 |tter abo|ut inter|
|00004990| 65 73 74 69 6e 67 0a 58 | 65 76 65 6e 74 73 2e 0a |esting.X|events..|
|000049a0| 58 2e 54 50 0a 58 5c 66 | 42 5c 2d 76 5c 66 49 0a |X.TP.X\f|B\-v\fI.|
|000049b0| 58 56 65 72 62 6f 73 65 | 2e 0a 58 2e 49 20 70 74 |XVerbose|..X.I pt|
|000049c0| 79 0a 58 77 69 6c 6c 20 | 62 6c 61 62 62 65 72 20 |y.Xwill |blabber |
|000049d0| 6f 6e 20 61 6e 64 20 6f | 6e 20 61 6e 64 20 6f 6e |on and o|n and on|
|000049e0| 20 61 6e 64 20 6f 6e 20 | 61 6e 64 20 6f 6e 20 61 | and on |and on a|
|000049f0| 6e 64 20 6f 6e 20 61 6e | 64 20 6f 6e 20 61 6e 64 |nd on an|d on and|
|00004a00| 20 6f 6e 2e 0a 58 49 74 | 20 6b 65 65 70 73 20 67 | on..XIt| keeps g|
|00004a10| 6f 69 6e 67 2c 0a 58 61 | 6e 64 20 67 6f 69 6e 67 |oing,.Xa|nd going|
|00004a20| 2c 0a 58 61 6e 64 20 67 | 6f 69 6e 67 2c 0a 58 61 |,.Xand g|oing,.Xa|
|00004a30| 6e 64 20 67 6f 69 6e 67 | 20 2e 2e 2e 0a 58 2e 54 |nd going| ....X.T|
|00004a40| 50 0a 58 5c 66 42 5c 2d | 66 5c 66 49 66 64 0a 58 |P.X\fB\-|f\fIfd.X|
|00004a50| 50 61 73 73 20 74 68 65 | 20 6d 61 73 74 65 72 20 |Pass the| master |
|00004a60| 61 6e 64 20 73 6c 61 76 | 65 20 73 69 64 65 73 20 |and slav|e sides |
|00004a70| 6f 66 20 74 68 65 20 70 | 73 65 75 64 6f 2d 74 65 |of the p|seudo-te|
|00004a80| 72 6d 69 6e 61 6c 0a 58 | 75 70 20 69 6e 20 66 69 |rminal.X|up in fi|
|00004a90| 6c 65 20 64 65 73 63 72 | 69 70 74 6f 72 0a 58 2e |le descr|iptor.X.|
|00004aa0| 49 20 66 64 2e 0a 58 54 | 68 69 73 20 69 73 20 6f |I fd..XT|his is o|
|00004ab0| 6e 6c 79 20 61 76 61 69 | 6c 61 62 6c 65 20 69 66 |nly avai|lable if|
|00004ac0| 20 79 6f 75 72 20 6d 61 | 63 68 69 6e 65 20 73 75 | your ma|chine su|
|00004ad0| 70 70 6f 72 74 73 20 64 | 65 73 63 72 69 70 74 6f |pports d|escripto|
|00004ae0| 72 20 70 61 73 73 69 6e | 67 2e 0a 58 0a 58 54 68 |r passin|g..X.XTh|
|00004af0| 65 20 70 72 6f 74 6f 63 | 6f 6c 2c 20 66 72 6f 6d |e protoc|ol, from|
|00004b00| 20 74 68 65 20 70 6f 69 | 6e 74 20 6f 66 20 76 69 | the poi|nt of vi|
|00004b10| 65 77 20 6f 66 20 74 68 | 65 20 72 65 63 65 69 76 |ew of th|e receiv|
|00004b20| 65 72 20 28 60 60 63 6f | 6e 74 72 6f 6c 6c 65 72 |er (``co|ntroller|
|00004b30| 27 27 29 2c 0a 58 69 73 | 20 74 6f 20 70 74 79 5f |''),.Xis| to pty_|
|00004b40| 67 65 74 63 68 20 61 20 | 63 68 61 72 61 63 74 65 |getch a |characte|
|00004b50| 72 20 6f 66 66 20 74 68 | 65 20 6f 74 68 65 72 20 |r off th|e other |
|00004b60| 73 69 64 65 0a 58 6f 66 | 20 74 68 65 20 70 61 73 |side.Xof| the pas|
|00004b70| 73 69 6e 67 20 64 65 73 | 63 72 69 70 74 6f 72 2c |sing des|criptor,|
|00004b80| 20 70 65 72 68 61 70 73 | 20 63 68 65 63 6b 20 74 | perhaps| check t|
|00004b90| 68 61 74 20 69 74 20 69 | 73 20 61 20 47 2c 0a 58 |hat it i|s a G,.X|
|00004ba0| 61 6e 64 20 70 74 79 5f | 70 75 74 67 65 74 69 6e |and pty_|putgetin|
|00004bb0| 74 20 61 20 47 20 66 6f | 72 20 74 68 65 20 70 72 |t a G fo|r the pr|
|00004bc0| 6f 63 65 73 73 20 69 64 | 20 6f 66 20 74 68 65 20 |ocess id| of the |
|00004bd0| 73 69 67 6e 61 6c 6c 65 | 72 0a 58 28 74 68 65 20 |signalle|r.X(the |
|00004be0| 70 72 6f 63 65 73 73 20 | 74 6f 20 72 65 63 69 65 |process |to recie|
|00004bf0| 76 65 20 61 20 48 55 50 | 20 69 66 20 74 68 65 20 |ve a HUP| if the |
|00004c00| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 64 72 6f 70 73 |connecti|on drops|
|00004c10| 29 3b 0a 58 70 74 79 5f | 67 65 74 63 68 20 61 20 |);.Xpty_|getch a |
|00004c20| 63 68 61 72 61 63 74 65 | 72 2c 20 70 65 72 68 61 |characte|r, perha|
|00004c30| 70 73 20 63 68 65 63 6b | 20 74 68 61 74 20 69 74 |ps check| that it|
|00004c40| 20 69 73 20 6d 2c 0a 58 | 61 6e 64 20 70 74 79 5f | is m,.X|and pty_|
|00004c50| 70 75 74 67 65 74 66 64 | 20 61 6e 20 6d 20 66 6f |putgetfd| an m fo|
|00004c60| 72 20 74 68 65 20 6d 61 | 73 74 65 72 20 73 69 64 |r the ma|ster sid|
|00004c70| 65 20 6f 66 20 74 68 65 | 20 70 73 65 75 64 6f 2d |e of the| pseudo-|
|00004c80| 74 65 72 6d 69 6e 61 6c | 3b 0a 58 61 6e 64 20 73 |terminal|;.Xand s|
|00004c90| 69 6d 69 6c 61 72 6c 79 | 20 66 6f 72 20 73 20 61 |imilarly| for s a|
|00004ca0| 6e 64 20 74 68 65 20 73 | 6c 61 76 65 20 73 69 64 |nd the s|lave sid|
|00004cb0| 65 2e 20 28 54 68 65 73 | 65 20 66 75 6e 63 74 69 |e. (Thes|e functi|
|00004cc0| 6f 6e 73 20 61 72 65 20 | 61 6c 6c 0a 58 61 76 61 |ons are |all.Xava|
|00004cd0| 69 6c 61 62 6c 65 20 69 | 6e 20 73 6f 63 6b 2e 63 |ilable i|n sock.c|
|00004ce0| 20 69 6e 20 74 68 65 0a | 58 2e 49 20 70 74 79 0a | in the.|X.I pty.|
|00004cf0| 58 73 6f 75 72 63 65 20 | 63 6f 64 65 2e 29 0a 58 |Xsource |code.).X|
|00004d00| 0a 58 57 68 65 6e 20 74 | 68 65 20 63 6f 6e 6e 65 |.XWhen t|he conne|
|00004d10| 63 74 69 6f 6e 20 69 73 | 20 64 72 6f 70 70 65 64 |ction is| dropped|
|00004d20| 2c 0a 58 2e 49 20 70 74 | 79 0a 58 77 69 6c 6c 20 |,.X.I pt|y.Xwill |
|00004d30| 73 65 6e 64 20 75 70 20 | 61 20 70 65 72 69 6f 64 |send up |a period|
|00004d40| 2c 0a 58 66 6f 6c 6c 6f | 77 65 64 20 62 79 20 6f |,.Xfollo|wed by o|
|00004d50| 6e 65 20 70 69 64 20 61 | 6e 64 20 74 77 6f 20 6e |ne pid a|nd two n|
|00004d60| 65 77 20 64 65 73 63 72 | 69 70 74 6f 72 73 20 61 |ew descr|iptors a|
|00004d70| 73 20 61 62 6f 76 65 0a | 58 69 66 20 69 74 20 72 |s above.|Xif it r|
|00004d80| 65 63 6f 6e 6e 65 63 74 | 73 2e 0a 58 49 6e 20 74 |econnect|s..XIn t|
|00004d90| 68 65 20 6d 65 61 6e 74 | 69 6d 65 2c 20 74 68 65 |he meant|ime, the|
|00004da0| 20 63 6f 6e 74 72 6f 6c | 6c 65 72 20 68 61 73 20 | control|ler has |
|00004db0| 66 75 6c 6c 20 72 65 73 | 70 6f 6e 73 69 62 69 6c |full res|ponsibil|
|00004dc0| 69 74 79 20 66 6f 72 0a | 58 70 65 72 66 6f 72 6d |ity for.|Xperform|
|00004dd0| 69 6e 67 20 74 65 72 6d | 69 6e 61 6c 20 49 2f 4f |ing term|inal I/O|
|00004de0| 2e 0a 58 2e 54 50 0a 58 | 5c 66 42 5c 2d 46 5c 66 |..X.TP.X|\fB\-F\f|
|00004df0| 49 0a 58 44 6f 20 6e 6f | 74 20 70 61 73 73 20 61 |I.XDo no|t pass a|
|00004e00| 6e 79 74 68 69 6e 67 20 | 28 64 65 66 61 75 6c 74 |nything |(default|
|00004e10| 29 2e 0a 58 2e 54 50 0a | 58 5c 66 42 5c 2d 70 5c |)..X.TP.|X\fB\-p\|
|00004e20| 66 49 6d 6d 6d 0a 58 53 | 65 74 20 74 68 65 0a 58 |fImmm.XS|et the.X|
|00004e30| 70 73 65 75 64 6f 2d 74 | 65 72 6d 69 6e 61 6c 20 |pseudo-t|erminal |
|00004e40| 74 6f 20 6d 6f 64 65 73 | 20 73 70 65 63 69 66 69 |to modes| specifi|
|00004e50| 65 64 20 62 79 0a 58 2e | 49 20 6d 2e 0a 58 55 6e |ed by.X.|I m..XUn|
|00004e60| 64 65 72 0a 58 2e 42 5c | 2d 64 2c 0a 58 64 65 66 |der.X.B\|-d,.Xdef|
|00004e70| 61 75 6c 74 73 20 61 72 | 65 20 74 61 6b 65 6e 20 |aults ar|e taken |
|00004e80| 66 72 6f 6d 20 74 68 65 | 0a 58 63 75 72 72 65 6e |from the|.Xcurren|
|00004e90| 74 20 74 65 72 6d 69 6e | 61 6c 3b 0a 58 75 6e 64 |t termin|al;.Xund|
|00004ea0| 65 72 0a 58 2e 42 5c 2d | 44 2c 0a 58 64 65 66 61 |er.X.B\-|D,.Xdefa|
|00004eb0| 75 6c 74 73 20 61 72 65 | 20 61 73 20 62 65 6c 6f |ults are| as belo|
|00004ec0| 77 2e 0a 58 50 72 65 64 | 65 66 69 6e 65 64 20 6d |w..XPred|efined m|
|00004ed0| 6f 64 65 73 3a 0a 58 2e | 52 53 0a 58 2e 54 50 20 |odes:.X.|RS.X.TP |
|00004ee0| 35 0a 58 2e 49 20 63 0a | 58 53 65 74 20 63 62 72 |5.X.I c.|XSet cbr|
|00004ef0| 65 61 6b 20 28 63 68 61 | 72 61 63 74 65 72 2d 61 |eak (cha|racter-a|
|00004f00| 74 2d 61 2d 74 69 6d 65 | 29 20 6d 6f 64 65 2e 0a |t-a-time|) mode..|
|00004f10| 58 2e 54 50 0a 58 2e 49 | 20 43 0a 58 44 6f 20 6e |X.TP.X.I| C.XDo n|
|00004f20| 6f 74 20 73 65 74 20 63 | 62 72 65 61 6b 20 6d 6f |ot set c|break mo|
|00004f30| 64 65 20 28 64 65 66 61 | 75 6c 74 29 2e 20 0a 58 |de (defa|ult). .X|
|00004f40| 2e 54 50 0a 58 2e 49 20 | 64 0a 58 55 73 65 20 74 |.TP.X.I |d.XUse t|
|00004f50| 68 65 20 6e 65 77 20 64 | 69 73 63 69 70 6c 69 6e |he new d|isciplin|
|00004f60| 65 20 28 64 65 66 61 75 | 6c 74 2c 20 62 72 65 61 |e (defau|lt, brea|
|00004f70| 6b 69 6e 67 20 77 69 74 | 68 20 74 72 61 64 69 74 |king wit|h tradit|
|00004f80| 69 6f 6e 29 2e 0a 58 2e | 54 50 0a 58 2e 49 20 44 |ion)..X.|TP.X.I D|
|00004f90| 0a 58 55 73 65 20 74 68 | 65 20 6f 6c 64 20 64 69 |.XUse th|e old di|
|00004fa0| 73 63 69 70 6c 69 6e 65 | 2c 20 77 69 74 68 6f 75 |scipline|, withou|
|00004fb0| 74 20 6a 6f 62 20 63 6f | 6e 74 72 6f 6c 20 6f 72 |t job co|ntrol or|
|00004fc0| 20 6f 74 68 65 72 20 66 | 61 6e 63 79 20 74 74 79 | other f|ancy tty|
|00004fd0| 20 66 65 61 74 75 72 65 | 73 2e 0a 58 2e 54 50 0a | feature|s..X.TP.|
|00004fe0| 58 2e 49 20 65 0a 58 45 | 63 68 6f 20 63 68 61 72 |X.I e.XE|cho char|
|00004ff0| 61 63 74 65 72 73 20 28 | 64 65 66 61 75 6c 74 29 |acters (|default)|
|00005000| 2e 0a 58 2e 54 50 0a 58 | 2e 49 20 45 0a 58 44 6f |..X.TP.X|.I E.XDo|
|00005010| 20 6e 6f 74 20 65 63 68 | 6f 2e 0a 58 2e 54 50 0a | not ech|o..X.TP.|
|00005020| 58 2e 49 20 6e 0a 58 43 | 68 61 6e 67 65 20 72 65 |X.I n.XC|hange re|
|00005030| 74 75 72 6e 20 74 6f 20 | 6e 65 77 6c 69 6e 65 20 |turn to |newline |
|00005040| 28 64 65 66 61 75 6c 74 | 29 2e 0a 58 2e 54 50 0a |(default|)..X.TP.|
|00005050| 58 2e 49 20 4e 0a 58 44 | 6f 20 6e 6f 74 20 63 68 |X.I N.XD|o not ch|
|00005060| 61 6e 67 65 20 72 65 74 | 75 72 6e 20 74 6f 20 6e |ange ret|urn to n|
|00005070| 65 77 6c 69 6e 65 2e 0a | 58 2e 54 50 0a 58 2e 49 |ewline..|X.TP.X.I|
|00005080| 20 72 0a 58 53 65 74 20 | 72 61 77 20 6d 6f 64 65 | r.XSet |raw mode|
|00005090| 3a 20 64 6f 20 6e 6f 74 | 20 70 72 6f 64 75 63 65 |: do not| produce|
|000050a0| 20 73 69 67 6e 61 6c 73 | 2c 20 61 6e 64 20 70 61 | signals|, and pa|
|000050b0| 73 73 20 65 69 67 68 74 | 2d 62 69 74 20 63 68 61 |ss eight|-bit cha|
|000050c0| 72 61 63 74 65 72 73 2e | 0a 58 2e 54 50 0a 58 2e |racters.|.X.TP.X.|
|000050d0| 49 20 52 0a 58 53 65 74 | 20 6e 6f 6e 2d 72 61 77 |I R.XSet| non-raw|
|000050e0| 20 28 60 60 63 6f 6f 6b | 65 64 27 27 29 20 6d 6f | (``cook|ed'') mo|
|000050f0| 64 65 20 28 64 65 66 61 | 75 6c 74 29 2e 0a 58 2e |de (defa|ult)..X.|
|00005100| 54 50 0a 58 2e 49 20 73 | 0a 58 53 65 74 20 6c 69 |TP.X.I s|.XSet li|
|00005110| 6e 65 20 65 64 69 74 69 | 6e 67 20 6d 6f 64 65 73 |ne editi|ng modes|
|00005120| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 66 6f 72 | appropr|iate for|
|00005130| 20 61 20 73 63 72 65 65 | 6e 20 28 64 65 66 61 75 | a scree|n (defau|
|00005140| 6c 74 29 2e 0a 58 2e 54 | 50 0a 58 2e 49 20 53 0a |lt)..X.T|P.X.I S.|
|00005150| 58 44 6f 20 6e 6f 74 20 | 73 65 74 20 63 72 74 20 |XDo not |set crt |
|00005160| 6c 69 6e 65 20 65 64 69 | 74 69 6e 67 20 6d 6f 64 |line edi|ting mod|
|00005170| 65 73 2e 0a 58 2e 54 50 | 0a 58 2e 49 20 30 0a 58 |es..X.TP|.X.I 0.X|
|00005180| 41 6e 20 61 62 62 72 65 | 76 69 61 74 69 6f 6e 20 |An abbre|viation |
|00005190| 66 6f 72 20 70 63 45 4e | 2e 0a 58 2e 52 45 0a 58 |for pcEN|..X.RE.X|
|000051a0| 2e 54 50 0a 58 5c 66 42 | 5c 2d 78 5c 66 49 73 73 |.TP.X\fB|\-x\fIss|
|000051b0| 73 0a 58 55 73 65 20 73 | 65 63 75 72 69 74 79 2c |s.XUse s|ecurity,|
|000051c0| 20 65 78 70 65 72 69 6d | 65 6e 74 61 6c 2c 20 6f | experim|ental, o|
|000051d0| 72 20 65 78 74 65 6e 64 | 65 64 20 6d 65 61 73 75 |r extend|ed measu|
|000051e0| 72 65 73 20 73 70 65 63 | 69 66 69 65 64 20 62 79 |res spec|ified by|
|000051f0| 0a 58 2e 49 20 73 2e 0a | 58 53 6f 6d 65 20 6f 66 |.X.I s..|XSome of|
|00005200| 20 74 68 65 73 65 20 6d | 61 79 20 62 65 20 72 65 | these m|ay be re|
|00005210| 71 75 69 72 65 64 20 6f | 72 20 64 69 73 61 62 6c |quired o|r disabl|
|00005220| 65 64 20 62 79 20 79 6f | 75 72 20 73 79 73 74 65 |ed by yo|ur syste|
|00005230| 6d 20 61 64 6d 69 6e 69 | 73 74 72 61 74 6f 72 2e |m admini|strator.|
|00005240| 0a 58 50 72 65 64 65 66 | 69 6e 65 64 20 76 61 6c |.XPredef|ined val|
|00005250| 75 65 73 3a 0a 58 2e 52 | 53 0a 58 2e 54 50 20 35 |ues:.X.R|S.X.TP 5|
|00005260| 0a 58 2e 49 20 63 0a 58 | 43 68 61 6e 67 65 20 74 |.X.I c.X|Change t|
|00005270| 68 65 20 6f 77 6e 65 72 | 73 68 69 70 20 61 6e 64 |he owner|ship and|
|00005280| 20 70 72 6f 74 65 63 74 | 69 6f 6e 73 20 6f 66 20 | protect|ions of |
|00005290| 74 68 65 20 70 74 79 20 | 61 70 70 72 6f 70 72 69 |the pty |appropri|
|000052a0| 61 74 65 6c 79 2e 0a 58 | 54 68 69 73 20 72 65 66 |ately..X|This ref|
|000052b0| 6c 65 63 74 73 20 73 65 | 76 65 72 61 6c 20 65 72 |lects se|veral er|
|000052c0| 72 6f 72 73 20 69 6e 20 | 74 68 65 0a 58 2e 49 20 |rors in |the.X.I |
|000052d0| 70 74 79 0a 58 6d 6f 64 | 65 6c 2c 20 62 75 74 20 |pty.Xmod|el, but |
|000052e0| 69 74 27 73 20 63 75 73 | 74 6f 6d 61 72 79 2e 0a |it's cus|tomary..|
|000052f0| 58 2e 54 50 0a 58 2e 49 | 20 43 0a 58 44 6f 20 6e |X.TP.X.I| C.XDo n|
|00005300| 6f 74 20 63 68 61 6e 67 | 65 20 70 74 79 20 6f 77 |ot chang|e pty ow|
|00005310| 6e 65 72 73 68 69 70 20 | 28 64 65 66 61 75 6c 74 |nership |(default|
|00005320| 29 2e 0a 58 2e 54 50 0a | 58 2e 49 20 65 0a 58 4f |)..X.TP.|X.I e.XO|
|00005330| 70 65 6e 20 73 74 64 65 | 72 72 20 77 72 69 74 65 |pen stde|rr write|
|00005340| 2d 6f 6e 6c 79 20 74 6f | 20 74 68 65 20 70 73 65 |-only to| the pse|
|00005350| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 2e 0a 58 54 |udo-term|inal..XT|
|00005360| 68 69 73 20 73 68 6f 75 | 6c 64 20 62 65 20 64 65 |his shou|ld be de|
|00005370| 66 61 75 6c 74 2c 20 62 | 75 74 20 73 75 63 68 20 |fault, b|ut such |
|00005380| 70 72 6f 67 72 61 6d 73 | 20 61 73 0a 58 2e 49 20 |programs| as.X.I |
|00005390| 63 73 68 0a 58 61 6e 64 | 0a 58 2e 49 20 6d 6f 72 |csh.Xand|.X.I mor|
|000053a0| 65 0a 58 69 6e 73 69 73 | 74 20 6f 6e 20 72 65 61 |e.Xinsis|t on rea|
|000053b0| 64 69 6e 67 20 66 72 6f | 6d 20 73 74 64 65 72 72 |ding fro|m stderr|
|000053c0| 20 61 6e 64 20 64 79 69 | 6e 67 20 68 6f 72 72 69 | and dyi|ng horri|
|000053d0| 62 6c 79 0a 58 69 66 20 | 74 68 65 79 20 66 61 69 |bly.Xif |they fai|
|000053e0| 6c 2e 0a 58 2e 42 5c 2d | 78 65 0a 58 69 73 20 75 |l..X.B\-|xe.Xis u|
|000053f0| 73 65 6c 65 73 73 20 75 | 6e 64 65 72 0a 58 2e 42 |seless u|nder.X.B|
|00005400| 5c 2d 65 2e 0a 58 2e 54 | 50 0a 58 2e 49 20 45 0a |\-e..X.T|P.X.I E.|
|00005410| 58 4f 70 65 6e 20 73 74 | 64 65 72 72 20 66 6f 72 |XOpen st|derr for|
|00005420| 20 72 65 61 64 69 6e 67 | 20 61 6e 64 20 77 72 69 | reading| and wri|
|00005430| 74 69 6e 67 20 28 64 65 | 66 61 75 6c 74 29 2e 0a |ting (de|fault)..|
|00005440| 58 2e 54 50 0a 58 2e 49 | 20 75 0a 58 45 6e 74 65 |X.TP.X.I| u.XEnte|
|00005450| 72 20 6c 6f 67 69 6e 20 | 6e 61 6d 65 20 69 6e 74 |r login |name int|
|00005460| 6f 20 2f 65 74 63 2f 75 | 74 6d 70 2e 0a 58 41 73 |o /etc/u|tmp..XAs|
|00005470| 20 61 20 72 75 6c 65 20 | 6f 66 20 74 68 75 6d 62 | a rule |of thumb|
|00005480| 2c 0a 58 79 6f 75 20 73 | 68 6f 75 6c 64 20 64 6f |,.Xyou s|hould do|
|00005490| 20 74 68 69 73 20 66 6f | 72 20 69 6e 74 65 72 61 | this fo|r intera|
|000054a0| 63 74 69 76 65 20 73 65 | 73 73 69 6f 6e 73 2e 0a |ctive se|ssions..|
|000054b0| 58 2e 54 50 0a 58 2e 49 | 20 6e 0a 58 55 73 65 20 |X.TP.X.I| n.XUse |
|000054c0| 73 6f 6d 65 20 68 65 75 | 72 69 73 74 69 63 73 20 |some heu|ristics |
|000054d0| 74 6f 20 74 72 79 20 74 | 6f 20 66 69 67 75 72 65 |to try t|o figure|
|000054e0| 20 6f 75 74 20 69 66 20 | 73 6f 6d 65 6f 6e 65 0a | out if |someone.|
|000054f0| 58 68 61 73 20 74 68 65 | 20 70 74 79 20 6f 70 65 |Xhas the| pty ope|
|00005500| 6e 20 28 64 65 66 61 75 | 6c 74 29 2e 0a 58 2e 54 |n (defau|lt)..X.T|
|00005510| 50 0a 58 2e 49 20 4e 0a | 58 44 6f 6e 27 74 20 77 |P.X.I N.|XDon't w|
|00005520| 6f 72 72 79 20 61 62 6f | 75 74 20 70 72 65 2d 6f |orry abo|ut pre-o|
|00005530| 70 65 6e 65 64 20 70 74 | 79 73 2e 0a 58 2e 54 50 |pened pt|ys..X.TP|
|00005540| 0a 58 2e 49 20 6f 0a 58 | 53 61 6d 65 20 61 73 0a |.X.I o.X|Same as.|
|00005550| 58 2e 42 5c 2d 78 6e 2c | 0a 58 62 75 74 20 67 6f |X.B\-xn,|.Xbut go|
|00005560| 20 6f 6e 20 74 6f 20 74 | 68 65 20 6e 65 78 74 20 | on to t|he next |
|00005570| 70 73 65 75 64 6f 2d 74 | 65 72 6d 69 6e 61 6c 0a |pseudo-t|erminal.|
|00005580| 58 69 66 20 74 68 69 73 | 20 6f 6e 65 20 69 73 20 |Xif this| one is |
|00005590| 6f 70 65 6e 2e 0a 58 2e | 54 50 0a 58 2e 49 20 4f |open..X.|TP.X.I O|
|000055a0| 0a 58 44 6f 6e 27 74 20 | 73 6b 69 70 20 70 72 65 |.XDon't |skip pre|
|000055b0| 2d 6f 70 65 6e 65 64 20 | 70 74 79 73 2e 0a 58 2e |-opened |ptys..X.|
|000055c0| 54 50 0a 58 2e 49 20 72 | 0a 58 52 61 6e 64 6f 6d |TP.X.I r|.XRandom|
|000055d0| 20 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c | pseudo-|terminal|
|000055e0| 20 73 65 61 72 63 68 69 | 6e 67 20 28 64 65 66 61 | searchi|ng (defa|
|000055f0| 75 6c 74 29 2e 0a 58 54 | 68 69 73 20 63 61 6e 20 |ult)..XT|his can |
|00005600| 70 72 6f 76 69 64 65 20 | 61 20 68 75 67 65 20 62 |provide |a huge b|
|00005610| 6f 6f 73 74 20 74 6f 20 | 73 70 65 65 64 20 61 6e |oost to |speed an|
|00005620| 64 20 73 65 63 75 72 69 | 74 79 2e 0a 58 49 74 20 |d securi|ty..XIt |
|00005630| 68 61 73 6e 27 74 20 62 | 65 65 6e 20 75 73 65 64 |hasn't b|een used|
|00005640| 20 62 65 63 61 75 73 65 | 20 70 72 6f 67 72 61 6d | because| program|
|00005650| 6d 65 72 73 20 64 6f 6e | 27 74 20 72 65 61 6c 69 |mers don|'t reali|
|00005660| 7a 65 0a 58 74 68 65 20 | 76 69 72 74 75 65 73 20 |ze.Xthe |virtues |
|00005670| 6f 66 20 6d 6f 64 75 6c | 61 72 69 74 79 2c 20 61 |of modul|arity, a|
|00005680| 72 65 20 63 6f 6e 73 65 | 71 75 65 6e 74 6c 79 20 |re conse|quently |
|00005690| 74 6f 6f 20 6c 61 7a 79 | 20 74 6f 0a 58 77 72 69 |too lazy| to.Xwri|
|000056a0| 74 65 20 73 6f 6d 65 74 | 68 69 6e 67 20 6c 69 6b |te somet|hing lik|
|000056b0| 65 0a 58 2e 49 20 70 74 | 79 2c 0a 58 61 6e 64 20 |e.X.I pt|y,.Xand |
|000056c0| 64 6f 6e 27 74 20 77 61 | 6e 74 20 74 6f 20 74 61 |don't wa|nt to ta|
|000056d0| 6b 65 20 74 68 65 20 65 | 66 66 6f 72 74 20 66 6f |ke the e|ffort fo|
|000056e0| 72 20 72 61 6e 64 6f 6d | 20 70 74 79 20 73 65 61 |r random| pty sea|
|000056f0| 72 63 68 69 6e 67 0a 58 | 69 6e 20 65 76 65 72 79 |rching.X|in every|
|00005700| 20 70 72 6f 67 72 61 6d | 20 74 68 61 74 20 75 73 | program| that us|
|00005710| 65 73 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |es pseud|o-termin|
|00005720| 61 6c 73 2e 0a 58 2e 54 | 50 0a 58 2e 49 20 52 0a |als..X.T|P.X.I R.|
|00005730| 58 53 74 72 61 69 67 68 | 74 20 70 74 79 20 73 65 |XStraigh|t pty se|
|00005740| 61 72 63 68 69 6e 67 2c | 20 66 72 6f 6d 20 74 68 |arching,| from th|
|00005750| 65 20 62 6f 74 74 6f 6d | 20 6f 6e 20 75 70 2e 0a |e bottom| on up..|
|00005760| 58 2e 54 50 0a 58 2e 49 | 20 73 0a 58 53 65 74 75 |X.TP.X.I| s.XSetu|
|00005770| 69 64 20 28 64 65 66 61 | 75 6c 74 29 2e 0a 58 2e |id (defa|ult)..X.|
|00005780| 49 20 70 74 79 20 0a 58 | 77 69 6c 6c 20 75 73 65 |I pty .X|will use|
|00005790| 20 61 20 63 6f 6d 6d 6f | 6e 20 64 69 72 65 63 74 | a commo|n direct|
|000057a0| 6f 72 79 0a 58 66 6f 72 | 20 73 74 6f 72 69 6e 67 |ory.Xfor| storing|
|000057b0| 20 73 65 73 73 69 6f 6e | 20 69 6e 66 6f 72 6d 61 | session| informa|
|000057c0| 74 69 6f 6e 2e 0a 58 2e | 54 50 0a 58 2e 49 20 53 |tion..X.|TP.X.I S|
|000057d0| 0a 58 4e 6f 74 20 73 65 | 74 75 69 64 2e 0a 58 2e |.XNot se|tuid..X.|
|000057e0| 49 20 70 74 79 0a 58 77 | 69 6c 6c 20 72 65 76 6f |I pty.Xw|ill revo|
|000057f0| 6b 65 20 61 6c 6c 20 70 | 72 69 76 69 6c 65 67 65 |ke all p|rivilege|
|00005800| 73 20 61 6e 64 0a 58 75 | 73 65 20 61 20 73 75 62 |s and.Xu|se a sub|
|00005810| 64 69 72 65 63 74 6f 72 | 79 20 6f 66 20 79 6f 75 |director|y of you|
|00005820| 72 20 48 4f 4d 45 20 64 | 69 72 65 63 74 6f 72 79 |r HOME d|irectory|
|00005830| 2e 0a 58 2e 54 50 0a 58 | 2e 49 20 55 0a 58 44 6f |..X.TP.X|.I U.XDo|
|00005840| 20 6e 6f 74 20 75 73 65 | 20 75 74 6d 70 20 28 64 | not use| utmp (d|
|00005850| 65 66 61 75 6c 74 29 2e | 0a 58 2e 54 50 0a 58 2e |efault).|.X.TP.X.|
|00005860| 49 20 77 0a 58 4d 61 6b | 65 20 61 6e 20 65 6e 74 |I w.XMak|e an ent|
|00005870| 72 79 20 69 6e 20 2f 75 | 73 72 2f 61 64 6d 2f 77 |ry in /u|sr/adm/w|
|00005880| 74 6d 70 2e 0a 58 54 68 | 69 73 20 70 72 6f 62 61 |tmp..XTh|is proba|
|00005890| 62 6c 79 20 69 73 6e 27 | 74 20 61 20 67 6f 6f 64 |bly isn'|t a good|
|000058a0| 20 69 64 65 61 20 66 6f | 72 20 67 65 6e 65 72 61 | idea fo|r genera|
|000058b0| 6c 20 75 73 65 2c 0a 58 | 61 73 0a 58 63 6f 6e 6e |l use,.X|as.Xconn|
|000058c0| 65 63 74 69 6f 6e 20 74 | 69 6d 65 20 72 65 63 6f |ection t|ime reco|
|000058d0| 72 64 65 64 20 69 6e 0a | 58 2e 49 20 77 74 6d 70 |rded in.|X.I wtmp|
|000058e0| 0a 58 69 73 20 6f 66 74 | 65 6e 20 70 72 65 73 73 |.Xis oft|en press|
|000058f0| 65 64 20 69 6e 74 6f 20 | 75 6e 66 6f 72 74 75 6e |ed into |unfortun|
|00005900| 61 74 65 20 73 65 72 76 | 69 63 65 20 61 73 0a 58 |ate serv|ice as.X|
|00005910| 61 20 73 65 6e 73 65 6c | 65 73 73 20 62 61 73 69 |a sensel|ess basi|
|00005920| 73 20 66 6f 72 20 63 68 | 61 72 67 65 64 20 63 6f |s for ch|arged co|
|00005930| 6d 70 75 74 65 72 20 74 | 69 6d 65 2e 0a 58 2e 54 |mputer t|ime..X.T|
|00005940| 50 0a 58 2e 49 20 57 0a | 58 44 6f 20 6e 6f 74 20 |P.X.I W.|XDo not |
|00005950| 75 73 65 20 77 74 6d 70 | 20 28 64 65 66 61 75 6c |use wtmp| (defaul|
|00005960| 74 29 2e 0a 58 2e 54 50 | 0a 58 2e 49 20 78 0a 58 |t)..X.TP|.X.I x.X|
|00005970| 53 65 74 20 65 78 63 6c | 75 73 69 76 65 20 75 73 |Set excl|usive us|
|00005980| 65 20 6f 6e 20 74 68 65 | 20 70 74 79 2e 0a 58 4e |e on the| pty..XN|
|00005990| 6f 20 70 72 6f 63 65 73 | 73 65 73 20 63 61 6e 20 |o proces|ses can |
|000059a0| 6f 70 65 6e 20 74 68 65 | 20 70 74 79 20 61 66 74 |open the| pty aft|
|000059b0| 65 72 20 74 68 69 73 3b | 0a 58 2e 49 20 70 72 6f |er this;|.X.I pro|
|000059c0| 67 72 61 6d 0a 58 63 61 | 6e 27 74 20 65 76 65 6e |gram.Xca|n't even|
|000059d0| 20 72 65 6f 70 65 6e 0a | 58 2f 64 65 76 2f 74 74 | reopen.|X/dev/tt|
|000059e0| 79 21 0a 58 28 49 74 20 | 63 61 6e 20 75 73 65 20 |y!.X(It |can use |
|000059f0| 66 69 6c 65 20 64 65 73 | 63 72 69 70 74 6f 72 20 |file des|criptor |
|00005a00| 33 20 69 6e 73 74 65 61 | 64 2e 29 0a 58 54 68 69 |3 instea|d.).XThi|
|00005a10| 73 20 63 61 6e 20 62 65 | 20 76 65 72 79 20 69 6d |s can be| very im|
|00005a20| 70 6f 72 74 61 6e 74 20 | 66 6f 72 20 73 65 63 75 |portant |for secu|
|00005a30| 72 69 74 79 20 77 68 65 | 6e 0a 58 2e 49 20 70 74 |rity whe|n.X.I pt|
|00005a40| 79 0a 58 68 61 73 20 6e | 6f 74 20 62 65 65 6e 20 |y.Xhas n|ot been |
|00005a50| 69 6e 73 74 61 6c 6c 65 | 64 20 62 79 20 74 68 65 |installe|d by the|
|00005a60| 20 73 79 73 74 65 6d 20 | 61 64 6d 69 6e 69 73 74 | system |administ|
|00005a70| 72 61 74 6f 72 2e 0a 58 | 49 74 20 73 68 6f 75 6c |rator..X|It shoul|
|00005a80| 64 20 62 65 20 73 65 74 | 20 61 6c 6c 20 74 68 65 |d be set| all the|
|00005a90| 20 74 69 6d 65 2c 20 62 | 75 74 0a 58 74 6f 6f 20 | time, b|ut.Xtoo |
|00005aa0| 6d 61 6e 79 20 70 72 6f | 67 72 61 6d 73 20 72 65 |many pro|grams re|
|00005ab0| 6c 79 20 6f 6e 20 61 20 | 66 69 6c 65 6e 61 6d 65 |ly on a |filename|
|00005ac0| 20 66 6f 72 20 74 68 65 | 20 74 65 72 6d 69 6e 61 | for the| termina|
|00005ad0| 6c 2e 0a 58 2e 54 50 0a | 58 2e 49 20 58 0a 58 44 |l..X.TP.|X.I X.XD|
|00005ae0| 6f 20 6e 6f 74 20 73 65 | 74 20 65 78 63 6c 75 73 |o not se|t exclus|
|00005af0| 69 76 65 20 75 73 65 20 | 28 64 65 66 61 75 6c 74 |ive use |(default|
|00005b00| 29 2e 0a 58 2e 52 45 0a | 58 2e 50 50 0a 58 2e 53 |)..X.RE.|X.PP.X.S|
|00005b10| 48 20 44 49 41 47 4e 4f | 53 54 49 43 53 0a 58 2e |H DIAGNO|STICS.X.|
|00005b20| 54 50 0a 58 76 61 72 69 | 6f 75 73 20 75 73 61 67 |TP.Xvari|ous usag|
|00005b30| 65 20 6d 65 73 73 61 67 | 65 73 0a 58 45 78 69 74 |e messag|es.XExit|
|00005b40| 20 31 2e 0a 58 2e 54 50 | 0a 58 2e 49 20 66 61 74 | 1..X.TP|.X.I fat|
|00005b50| 61 6c 3a 20 63 61 6e 6e | 6f 74 20 66 69 6e 64 20 |al: cann|ot find |
|00005b60| 63 6f 6e 74 72 6f 6c 20 | 74 65 72 6d 69 6e 61 6c |control |terminal|
|00005b70| 0a 58 2e 49 20 70 74 79 | 0a 58 69 73 20 75 6e 61 |.X.I pty|.Xis una|
|00005b80| 62 6c 65 20 74 6f 20 66 | 69 6e 64 20 69 74 73 20 |ble to f|ind its |
|00005b90| 63 75 72 72 65 6e 74 20 | 63 6f 6e 74 72 6f 6c 20 |current |control |
|00005ba0| 74 65 72 6d 69 6e 61 6c | 2e 0a 58 45 78 69 74 20 |terminal|..XExit |
|00005bb0| 32 2e 0a 58 2e 54 50 0a | 58 2e 49 20 66 61 74 61 |2..X.TP.|X.I fata|
|00005bc0| 6c 3a 20 63 61 6e 6e 6f | 74 20 67 65 74 20 63 75 |l: canno|t get cu|
|00005bd0| 72 72 65 6e 74 20 74 74 | 79 20 6d 6f 64 65 73 0a |rrent tt|y modes.|
|00005be0| 58 54 68 69 73 20 73 68 | 6f 75 6c 64 6e 27 74 20 |XThis sh|ouldn't |
|00005bf0| 68 61 70 70 65 6e 2e 0a | 58 45 78 69 74 20 33 2e |happen..|XExit 3.|
|00005c00| 0a 58 2e 54 50 0a 58 2e | 49 20 66 61 74 61 6c 3a |.X.TP.X.|I fatal:|
|00005c10| 20 63 61 6e 6e 6f 74 20 | 73 65 74 20 6d 6f 64 65 | cannot |set mode|
|00005c20| 73 20 6f 66 20 6f 72 69 | 67 69 6e 61 6c 20 74 74 |s of ori|ginal tt|
|00005c30| 79 0a 58 54 68 69 73 20 | 73 68 6f 75 6c 64 6e 27 |y.XThis |shouldn'|
|00005c40| 74 20 68 61 70 70 65 6e | 2e 0a 58 45 78 69 74 20 |t happen|..XExit |
|00005c50| 34 2e 0a 58 2e 54 50 0a | 58 2e 49 20 66 61 74 61 |4..X.TP.|X.I fata|
|00005c60| 6c 3a 20 6e 6f 20 70 74 | 79 73 20 61 76 61 69 6c |l: no pt|ys avail|
|00005c70| 61 62 6c 65 0a 58 53 65 | 6c 66 2d 65 78 70 6c 61 |able.XSe|lf-expla|
|00005c80| 6e 61 74 6f 72 79 2e 0a | 58 45 78 69 74 20 35 2e |natory..|XExit 5.|
|00005c90| 0a 58 2e 54 50 0a 58 2e | 49 20 66 61 74 61 6c 3a |.X.TP.X.|I fatal:|
|00005ca0| 20 63 61 6e 27 74 20 66 | 63 6e 74 6c 20 70 74 79 | can't f|cntl pty|
|00005cb0| 0a 58 2e 54 50 0a 58 2e | 49 20 66 61 74 61 6c 3a |.X.TP.X.|I fatal:|
|00005cc0| 20 73 6c 61 76 65 20 75 | 6e 6f 70 65 6e 61 62 6c | slave u|nopenabl|
|00005cd0| 65 0a 58 54 68 65 72 65 | 27 73 20 61 20 73 65 72 |e.XThere|'s a ser|
|00005ce0| 69 6f 75 73 20 70 72 6f | 62 6c 65 6d 20 77 69 74 |ious pro|blem wit|
|00005cf0| 68 20 79 6f 75 72 20 70 | 73 65 75 64 6f 2d 74 65 |h your p|seudo-te|
|00005d00| 72 6d 69 6e 61 6c 20 73 | 65 74 75 70 2e 0a 58 52 |rminal s|etup..XR|
|00005d10| 65 70 6f 72 74 20 74 68 | 69 73 20 65 72 72 6f 72 |eport th|is error|
|00005d20| 20 74 6f 20 79 6f 75 72 | 20 73 79 73 74 65 6d 20 | to your| system |
|00005d30| 61 64 6d 69 6e 69 73 74 | 72 61 74 6f 72 2e 0a 58 |administ|rator..X|
|00005d40| 45 78 69 74 20 36 2e 0a | 58 2e 54 50 0a 58 2e 49 |Exit 6..|X.TP.X.I|
|00005d50| 20 66 61 74 61 6c 3a 20 | 63 61 6e 6e 6f 74 20 66 | fatal: |cannot f|
|00005d60| 6f 72 6b 0a 58 2e 49 20 | 70 74 79 0a 58 68 61 73 |ork.X.I |pty.Xhas|
|00005d70| 20 72 75 6e 20 6f 75 74 | 20 6f 66 20 70 72 6f 63 | run out| of proc|
|00005d80| 65 73 73 65 73 2e 0a 58 | 45 78 69 74 20 37 2e 0a |esses..X|Exit 7..|
|00005d90| 58 2e 54 50 0a 58 2e 49 | 20 66 61 74 61 6c 3a 20 |X.TP.X.I| fatal: |
|00005da0| 63 61 6e 6e 6f 74 20 63 | 68 61 6e 67 65 20 74 6f |cannot c|hange to|
|00005db0| 20 73 65 73 73 69 6f 6e | 20 64 69 72 65 63 74 6f | session| directo|
|00005dc0| 72 79 0a 58 53 65 6c 66 | 2d 65 78 70 6c 61 6e 61 |ry.XSelf|-explana|
|00005dd0| 74 6f 72 79 2e 0a 58 45 | 78 69 74 20 38 2e 0a 58 |tory..XE|xit 8..X|
|00005de0| 2e 54 50 0a 58 2e 49 20 | 66 61 74 61 6c 3a 20 63 |.TP.X.I |fatal: c|
|00005df0| 61 6e 6e 6f 74 20 6f 70 | 65 6e 20 69 6e 74 65 72 |annot op|en inter|
|00005e00| 6e 61 6c 20 70 69 70 65 | 2e 0a 58 43 61 6e 6e 6f |nal pipe|..XCanno|
|00005e10| 74 20 68 61 70 70 65 6e | 2e 0a 58 45 78 69 74 20 |t happen|..XExit |
|00005e20| 31 30 2e 0a 58 2e 54 50 | 0a 58 2e 49 20 66 61 74 |10..X.TP|.X.I fat|
|00005e30| 61 6c 3a 20 73 6f 63 6b | 65 74 20 72 65 61 64 20 |al: sock|et read |
|00005e40| 65 72 72 6f 72 0a 58 53 | 65 6c 66 2d 65 78 70 6c |error.XS|elf-expl|
|00005e50| 61 6e 61 74 6f 72 79 2e | 20 45 78 69 74 20 31 31 |anatory.| Exit 11|
|00005e60| 2e 0a 58 2e 54 50 0a 58 | 2e 49 20 66 61 74 61 6c |..X.TP.X|.I fatal|
|00005e70| 3a 20 73 6f 63 6b 65 74 | 20 77 72 69 74 65 20 65 |: socket| write e|
|00005e80| 72 72 6f 72 0a 58 53 65 | 6c 66 2d 65 78 70 6c 61 |rror.XSe|lf-expla|
|00005e90| 6e 61 74 6f 72 79 2e 20 | 45 78 69 74 20 31 32 2e |natory. |Exit 12.|
|00005ea0| 0a 58 2e 54 50 0a 58 2e | 49 20 66 61 74 61 6c 3a |.X.TP.X.|I fatal:|
|00005eb0| 20 69 6e 70 75 74 20 72 | 65 61 64 20 65 72 72 6f | input r|ead erro|
|00005ec0| 72 0a 58 53 65 6c 66 2d | 65 78 70 6c 61 6e 61 74 |r.XSelf-|explanat|
|00005ed0| 6f 72 79 2e 20 45 78 69 | 74 20 31 33 2e 0a 58 2e |ory. Exi|t 13..X.|
|00005ee0| 54 50 0a 58 2e 49 20 66 | 61 74 61 6c 3a 20 6f 75 |TP.X.I f|atal: ou|
|00005ef0| 74 70 75 74 20 77 72 69 | 74 65 20 65 72 72 6f 72 |tput wri|te error|
|00005f00| 0a 58 53 65 6c 66 2d 65 | 78 70 6c 61 6e 61 74 6f |.XSelf-e|xplanato|
|00005f10| 72 79 2e 20 45 78 69 74 | 20 31 34 2e 0a 58 2e 53 |ry. Exit| 14..X.S|
|00005f20| 48 20 52 45 53 54 52 49 | 43 54 49 4f 4e 53 0a 58 |H RESTRI|CTIONS.X|
|00005f30| 54 68 65 72 65 20 61 72 | 65 20 6d 61 6e 79 20 73 |There ar|e many s|
|00005f40| 65 63 75 72 69 74 79 20 | 70 72 6f 62 6c 65 6d 73 |ecurity |problems|
|00005f50| 0a 58 61 6e 64 20 6c 69 | 6d 69 74 61 74 69 6f 6e |.Xand li|mitation|
|00005f60| 73 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |s associ|ated wit|
|00005f70| 68 20 42 53 44 2d 73 74 | 79 6c 65 20 74 74 79 73 |h BSD-st|yle ttys|
|00005f80| 2e 0a 58 2e 49 20 70 74 | 79 0a 58 64 6f 65 73 20 |..X.I pt|y.Xdoes |
|00005f90| 69 74 73 20 62 65 73 74 | 20 74 6f 20 61 76 6f 69 |its best| to avoi|
|00005fa0| 64 20 74 68 65 6d 2c 0a | 58 62 75 74 20 61 20 53 |d them,.|Xbut a S|
|00005fb0| 74 72 65 61 6d 73 2d 62 | 61 73 65 64 20 73 79 73 |treams-b|ased sys|
|00005fc0| 74 65 6d 20 77 6f 75 6c | 64 20 62 65 20 6d 75 63 |tem woul|d be muc|
|00005fd0| 68 20 62 65 74 74 65 72 | 2e 0a 58 54 68 65 20 61 |h better|..XThe a|
|00005fe0| 75 74 68 6f 72 20 70 6c | 61 6e 73 20 74 6f 20 72 |uthor pl|ans to r|
|00005ff0| 65 77 72 69 74 65 0a 58 | 2e 49 20 70 74 79 2c 0a |ewrite.X|.I pty,.|
|00006000| 58 77 69 74 68 20 74 68 | 65 20 73 61 6d 65 20 69 |Xwith th|e same i|
|00006010| 6e 74 65 72 66 61 63 65 | 2c 0a 58 66 6f 72 20 61 |nterface|,.Xfor a|
|00006020| 20 53 74 72 65 61 6d 73 | 20 73 79 73 74 65 6d 2e | Streams| system.|
|00006030| 0a 58 2e 50 50 0a 58 54 | 68 65 20 63 75 72 72 65 |.X.PP.XT|he curre|
|00006040| 6e 74 0a 58 2e 42 5c 2d | 4a 0a 58 62 65 68 61 76 |nt.X.B\-|J.Xbehav|
|00006050| 69 6f 72 20 69 73 20 61 | 20 62 69 74 20 64 75 6c |ior is a| bit dul|
|00006060| 6c 2e 0a 58 49 20 77 69 | 73 68 20 70 72 6f 67 72 |l..XI wi|sh progr|
|00006070| 61 6d 73 20 77 6f 75 6c | 64 20 75 73 65 20 74 68 |ams woul|d use th|
|00006080| 65 20 6a 6f 62 20 63 6f | 6e 74 72 6f 6c 0a 58 6d |e job co|ntrol.Xm|
|00006090| 65 63 68 61 6e 69 73 6d | 73 20 6d 6f 72 65 20 63 |echanism|s more c|
|000060a0| 6c 65 61 6e 6c 79 2e 0a | 58 2e 50 50 0a 58 54 6f |leanly..|X.PP.XTo|
|000060b0| 20 61 76 6f 69 64 20 61 | 20 72 61 63 65 20 63 6f | avoid a| race co|
|000060c0| 6e 64 69 74 69 6f 6e 2c | 0a 58 2e 49 20 70 74 79 |ndition,|.X.I pty|
|000060d0| 0a 58 63 68 65 77 73 20 | 75 70 20 61 20 74 69 6e |.Xchews |up a tin|
|000060e0| 79 20 62 69 74 20 6d 6f | 72 65 20 43 50 55 20 74 |y bit mo|re CPU t|
|000060f0| 69 6d 65 20 74 68 61 6e | 20 69 74 20 73 68 6f 75 |ime than| it shou|
|00006100| 6c 64 20 65 76 65 72 79 | 0a 58 74 69 6d 65 0a 58 |ld every|.Xtime.X|
|00006110| 2e 49 20 70 72 6f 67 72 | 61 6d 0a 58 69 73 20 73 |.I progr|am.Xis s|
|00006120| 74 6f 70 70 65 64 20 61 | 6e 64 20 74 68 65 6e 20 |topped a|nd then |
|00006130| 72 65 73 74 61 72 74 65 | 64 2e 0a 58 2e 50 50 0a |restarte|d..X.PP.|
|00006140| 58 49 66 0a 58 2e 49 20 | 70 72 6f 67 72 61 6d 0a |XIf.X.I |program.|
|00006150| 58 63 6c 6f 73 65 73 20 | 74 68 65 20 70 73 65 75 |Xcloses |the pseu|
|00006160| 64 6f 2d 74 65 72 6d 69 | 6e 61 6c 20 62 75 74 20 |do-termi|nal but |
|00006170| 64 6f 65 73 6e 27 74 20 | 64 69 65 2c 0a 58 2e 49 |doesn't |die,.X.I|
|00006180| 20 70 74 79 0a 58 77 69 | 6c 6c 20 77 61 69 74 20 | pty.Xwi|ll wait |
|00006190| 66 6f 72 20 69 74 2c 20 | 65 76 65 6e 20 74 68 6f |for it, |even tho|
|000061a0| 75 67 68 20 69 74 20 77 | 69 6c 6c 20 68 61 76 65 |ugh it w|ill have|
|000061b0| 20 6e 6f 20 66 75 72 74 | 68 65 72 20 69 6e 74 65 | no furt|her inte|
|000061c0| 72 61 63 74 69 6f 6e 20 | 77 69 74 68 0a 58 69 74 |raction |with.Xit|
|000061d0| 2e 0a 58 2e 50 50 0a 58 | 2e 49 20 70 74 79 0a 58 |..X.PP.X|.I pty.X|
|000061e0| 64 6f 65 73 20 6e 6f 74 | 20 70 72 6f 76 69 64 65 |does not| provide|
|000061f0| 20 61 6e 79 20 77 61 79 | 20 74 6f 20 6c 6f 75 64 | any way| to loud|
|00006200| 6c 79 20 70 72 6f 63 6c | 61 69 6d 20 74 68 61 74 |ly procl|aim that|
|00006210| 0a 58 2e 49 20 70 72 6f | 67 72 61 6d 0a 58 64 6f |.X.I pro|gram.Xdo|
|00006220| 65 73 6e 27 74 20 65 78 | 69 73 74 2e 0a 58 49 74 |esn't ex|ist..XIt|
|00006230| 20 73 69 6d 70 6c 79 20 | 64 69 65 73 20 71 75 69 | simply |dies qui|
|00006240| 65 74 6c 79 2e 0a 58 2e | 50 50 0a 58 42 65 63 61 |etly..X.|PP.XBeca|
|00006250| 75 73 65 20 6f 66 20 42 | 53 44 27 73 20 72 69 64 |use of B|SD's rid|
|00006260| 69 63 75 6c 6f 75 73 20 | 63 6f 6e 74 72 6f 6c 6c |iculous |controll|
|00006270| 69 6e 67 20 74 65 72 6d | 69 6e 61 6c 20 6d 65 63 |ing term|inal mec|
|00006280| 68 61 6e 69 73 6d 2c 0a | 58 61 20 72 65 63 6f 6e |hanism,.|Xa recon|
|00006290| 6e 65 63 74 69 6e 67 0a | 58 2e 49 20 70 74 79 0a |necting.|X.I pty.|
|000062a0| 58 68 61 73 20 74 6f 0a | 58 70 61 73 73 20 74 68 |Xhas to.|Xpass th|
|000062b0| 65 20 6e 61 6d 65 20 6f | 66 20 69 74 73 20 6f 72 |e name o|f its or|
|000062c0| 69 67 69 6e 61 6c 20 74 | 65 72 6d 69 6e 61 6c 0a |iginal t|erminal.|
|000062d0| 58 74 6f 20 74 68 65 20 | 73 65 73 73 69 6f 6e 20 |Xto the |session |
|000062e0| 75 6e 64 65 72 6e 65 61 | 74 68 2e 0a 58 53 69 6e |undernea|th..XSin|
|000062f0| 63 65 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 70 |ce there| is no p|
|00006300| 6f 72 74 61 62 6c 65 20 | 77 61 79 20 74 6f 20 66 |ortable |way to f|
|00006310| 69 6e 64 20 6f 75 74 20 | 74 68 61 74 20 6e 61 6d |ind out |that nam|
|00006320| 65 2c 0a 58 2e 49 20 70 | 74 79 0a 58 72 65 71 75 |e,.X.I p|ty.Xrequ|
|00006330| 69 72 65 73 20 74 68 61 | 74 20 73 6f 6d 65 20 66 |ires tha|t some f|
|00006340| 69 6c 65 20 64 65 73 63 | 72 69 70 74 6f 72 20 62 |ile desc|riptor b|
|00006350| 65 20 6f 70 65 6e 2c 20 | 70 6f 69 6e 74 69 6e 67 |e open, |pointing|
|00006360| 0a 58 74 6f 20 74 68 65 | 20 63 75 72 72 65 6e 74 |.Xto the| current|
|00006370| 20 74 65 72 6d 69 6e 61 | 6c 0a 58 2e 49 20 28 6e | termina|l.X.I (n|
|00006380| 6f 74 0a 58 2f 64 65 76 | 2f 74 74 79 21 29 2e 0a |ot.X/dev|/tty!)..|
|00006390| 58 28 4d 6f 72 65 20 70 | 72 65 63 69 73 65 6c 79 |X(More p|recisely|
|000063a0| 2c 0a 58 74 68 65 20 68 | 69 67 68 65 73 74 2d 6e |,.Xthe h|ighest-n|
|000063b0| 75 6d 62 65 72 65 64 20 | 66 69 6c 65 20 64 65 73 |umbered |file des|
|000063c0| 63 72 69 70 74 6f 72 20 | 74 68 61 74 0a 58 69 73 |criptor |that.Xis|
|000063d0| 20 61 20 74 65 72 6d 69 | 6e 61 6c 20 66 69 6c 65 | a termi|nal file|
|000063e0| 20 62 75 74 20 6e 6f 74 | 20 2f 64 65 76 2f 74 74 | but not| /dev/tt|
|000063f0| 79 0a 58 6d 75 73 74 20 | 62 65 20 74 68 65 20 72 |y.Xmust |be the r|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.