home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume22 / pty / part03 < prev    next >
SHell self-extracting ARchive  |  1990-10-09  |  54.5 KB

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).

ConfidenceProgramDetectionMatch TypeSupport
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 or mail, ASCII text default
100% checkBytes Printable ASCII 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/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 32 33 69 30 33 |Subject:| v23i03|
|00000010| 33 3a 20 20 52 75 6e 20 | 61 20 70 72 6f 67 72 61 |3: Run |a progra|
|00000020| 6d 20 75 6e 64 65 72 20 | 61 20 70 74 79 20 73 65 |m under |a pty se|
|00000030| 73 73 69 6f 6e 2c 20 50 | 61 72 74 30 33 2f 30 36 |ssion, P|art03/06|
|00000040| 0a 4e 65 77 73 67 72 6f | 75 70 73 3a 20 63 6f 6d |.Newsgro|ups: com|
|00000050| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 0a 41 |p.source|s.unix.A|
|00000060| 70 70 72 6f 76 65 64 3a | 20 72 73 61 6c 7a 40 75 |pproved:| rsalz@u|
|00000070| 75 6e 65 74 2e 55 55 2e | 4e 45 54 0a 58 2d 43 68 |unet.UU.|NET.X-Ch|
|00000080| 65 63 6b 73 75 6d 2d 53 | 6e 65 66 72 75 3a 20 64 |ecksum-S|nefru: d|
|00000090| 37 64 66 39 30 39 66 20 | 63 35 31 33 31 34 30 66 |7df909f |c513140f|
|000000a0| 20 62 62 30 30 61 32 66 | 65 20 38 32 39 39 38 66 | bb00a2f|e 82998f|
|000000b0| 38 63 0a 0a 53 75 62 6d | 69 74 74 65 64 2d 62 79 |8c..Subm|itted-by|
|000000c0| 3a 20 44 61 6e 20 42 65 | 72 6e 73 74 65 69 6e 20 |: Dan Be|rnstein |
|000000d0| 3c 62 72 6e 73 74 6e 64 | 40 6b 72 61 6d 64 65 6e |<brnstnd|@kramden|
|000000e0| 2e 61 63 66 2e 6e 79 75 | 2e 65 64 75 3e 0a 50 6f |.acf.nyu|.edu>.Po|
|000000f0| 73 74 69 6e 67 2d 6e 75 | 6d 62 65 72 3a 20 56 6f |sting-nu|mber: Vo|
|00000100| 6c 75 6d 65 20 32 33 2c | 20 49 73 73 75 65 20 33 |lume 23,| Issue 3|
|00000110| 33 0a 41 72 63 68 69 76 | 65 2d 6e 61 6d 65 3a 20 |3.Archiv|e-name: |
|00000120| 70 74 79 2f 70 61 72 74 | 30 33 0a 0a 23 21 20 2f |pty/part|03..#! /|
|00000130| 62 69 6e 2f 73 68 0a 23 | 20 54 68 69 73 20 69 73 |bin/sh.#| This is|
|00000140| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|00000150| 2e 20 20 52 65 6d 6f 76 | 65 20 61 6e 79 74 68 69 |. Remov|e anythi|
|00000160| 6e 67 20 62 65 66 6f 72 | 65 20 74 68 69 73 20 6c |ng befor|e this l|
|00000170| 69 6e 65 2c 20 74 68 65 | 6e 20 66 65 65 64 20 69 |ine, the|n feed i|
|00000180| 74 0a 23 20 69 6e 74 6f | 20 61 20 73 68 65 6c 6c |t.# into| a shell|
|00000190| 20 76 69 61 20 22 73 68 | 20 66 69 6c 65 22 20 6f | via "sh| file" o|
|000001a0| 72 20 73 69 6d 69 6c 61 | 72 2e 20 20 54 6f 20 6f |r simila|r. To o|
|000001b0| 76 65 72 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |verwrite| existin|
|000001c0| 67 20 66 69 6c 65 73 2c | 0a 23 20 74 79 70 65 20 |g files,|.# type |
|000001d0| 22 73 68 20 66 69 6c 65 | 20 2d 63 22 2e 0a 23 20 |"sh file| -c"..# |
|000001e0| 54 68 65 20 74 6f 6f 6c | 20 74 68 61 74 20 67 65 |The tool| that ge|
|000001f0| 6e 65 72 61 74 65 64 20 | 74 68 69 73 20 61 70 70 |nerated |this app|
|00000200| 65 61 72 65 64 20 69 6e | 20 74 68 65 20 63 6f 6d |eared in| the com|
|00000210| 70 2e 73 6f 75 72 63 65 | 73 2e 75 6e 69 78 20 6e |p.source|s.unix n|
|00000220| 65 77 73 67 72 6f 75 70 | 3b 0a 23 20 73 65 6e 64 |ewsgroup|;.# send|
|00000230| 20 6d 61 69 6c 20 74 6f | 20 63 6f 6d 70 2d 73 6f | mail to| comp-so|
|00000240| 75 72 63 65 73 2d 75 6e | 69 78 40 75 75 6e 65 74 |urces-un|ix@uunet|
|00000250| 2e 75 75 2e 6e 65 74 20 | 69 66 20 79 6f 75 20 77 |.uu.net |if you w|
|00000260| 61 6e 74 20 74 68 61 74 | 20 74 6f 6f 6c 2e 0a 23 |ant that| tool..#|
|00000270| 20 43 6f 6e 74 65 6e 74 | 73 3a 20 20 63 6f 6e 66 | Content|s: conf|
|00000280| 69 67 2e 68 20 6c 6f 67 | 73 2e 63 20 70 74 79 2e |ig.h log|s.c pty.|
|00000290| 31 20 73 69 67 6c 65 72 | 2e 63 20 73 6f 63 6b 2e |1 sigler|.c sock.|
|000002a0| 63 20 74 74 79 2e 63 20 | 75 74 69 6c 2f 4d 61 6b |c tty.c |util/Mak|
|000002b0| 65 66 69 6c 65 0a 23 20 | 57 72 61 70 70 65 64 20 |efile.# |Wrapped |
|000002c0| 62 79 20 72 73 61 6c 7a | 40 6c 69 74 63 68 69 2e |by rsalz|@litchi.|
|000002d0| 62 62 6e 2e 63 6f 6d 20 | 6f 6e 20 57 65 64 20 4f |bbn.com |on Wed O|
|000002e0| 63 74 20 31 30 20 31 30 | 3a 31 31 3a 33 38 20 31 |ct 10 10|:11:38 1|
|000002f0| 39 39 30 0a 50 41 54 48 | 3d 2f 62 69 6e 3a 2f 75 |990.PATH|=/bin:/u|
|00000300| 73 72 2f 62 69 6e 3a 2f | 75 73 72 2f 75 63 62 20 |sr/bin:/|usr/ucb |
|00000310| 3b 20 65 78 70 6f 72 74 | 20 50 41 54 48 0a 65 63 |; export| PATH.ec|
|00000320| 68 6f 20 49 66 20 74 68 | 69 73 20 61 72 63 68 69 |ho If th|is archi|
|00000330| 76 65 20 69 73 20 63 6f | 6d 70 6c 65 74 65 2c 20 |ve is co|mplete, |
|00000340| 79 6f 75 20 77 69 6c 6c | 20 73 65 65 20 74 68 65 |you will| see the|
|00000350| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6d 65 73 73 61 | followi|ng messa|
|00000360| 67 65 3a 0a 65 63 68 6f | 20 27 20 20 20 20 20 20 |ge:.echo| ' |
|00000370| 20 20 20 20 22 73 68 61 | 72 3a 20 45 6e 64 20 6f | "sha|r: End o|
|00000380| 66 20 61 72 63 68 69 76 | 65 20 33 20 28 6f 66 20 |f archiv|e 3 (of |
|00000390| 36 29 2e 22 27 0a 69 66 | 20 74 65 73 74 20 2d 66 |6)."'.if| test -f|
|000003a0| 20 27 63 6f 6e 66 69 67 | 2e 68 27 20 2d 61 20 22 | 'config|.h' -a "|
|000003b0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|000003c0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|000003d0| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|000003e0| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|000003f0| 65 20 5c 22 27 63 6f 6e | 66 69 67 2e 68 27 5c 22 |e \"'con|fig.h'\"|
|00000400| 0a 65 6c 73 65 0a 20 20 | 65 63 68 6f 20 73 68 61 |.else. |echo sha|
|00000410| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00000420| 27 63 6f 6e 66 69 67 2e | 68 27 5c 22 20 5c 28 39 |'config.|h'\" \(9|
|00000430| 36 31 30 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |610 char|acters\)|
|00000440| 0a 20 20 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |. sed "|s/^X//" |
|00000450| 3e 27 63 6f 6e 66 69 67 | 2e 68 27 20 3c 3c 27 45 |>'config|.h' <<'E|
|00000460| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 2f 2a 20 |ND_OF_FI|LE'.X/* |
|00000470| 43 6f 70 79 72 69 67 68 | 74 20 31 39 39 30 2c 20 |Copyrigh|t 1990, |
|00000480| 44 61 6e 69 65 6c 20 4a | 2e 20 42 65 72 6e 73 74 |Daniel J|. Bernst|
|00000490| 65 69 6e 2e 20 41 6c 6c | 20 72 69 67 68 74 73 20 |ein. All| rights |
|000004a0| 72 65 73 65 72 76 65 64 | 2e 20 2a 2f 0a 58 0a 58 |reserved|. */.X.X|
|000004b0| 23 69 66 6e 64 65 66 20 | 50 54 59 5f 43 4f 4e 46 |#ifndef |PTY_CONF|
|000004c0| 49 47 5f 48 0a 58 23 64 | 65 66 69 6e 65 20 50 54 |IG_H.X#d|efine PT|
|000004d0| 59 5f 43 4f 4e 46 49 47 | 5f 48 0a 58 0a 58 2f 2a |Y_CONFIG|_H.X.X/*|
|000004e0| 20 49 74 20 69 73 20 72 | 65 63 6f 6d 6d 65 6e 64 | It is r|ecommend|
|000004f0| 65 64 20 74 68 61 74 20 | 79 6f 75 20 6d 61 6b 65 |ed that |you make|
|00000500| 20 6c 6f 63 61 6c 20 63 | 68 61 6e 67 65 73 20 69 | local c|hanges i|
|00000510| 6e 20 74 68 65 20 4d 61 | 6b 65 66 69 6c 65 2c 20 |n the Ma|kefile, |
|00000520| 2a 2f 0a 58 2f 2a 20 65 | 78 63 65 70 74 20 66 6f |*/.X/* e|xcept fo|
|00000530| 72 20 66 65 61 74 75 72 | 65 20 63 6f 6e 74 72 6f |r featur|e contro|
|00000540| 6c 2c 20 77 68 69 63 68 | 20 69 73 20 62 65 73 74 |l, which| is best|
|00000550| 20 64 6f 6e 65 20 68 65 | 72 65 2e 20 2a 2f 0a 58 | done he|re. */.X|
|00000560| 0a 58 2f 2a 20 53 65 63 | 74 69 6f 6e 20 31 3a 20 |.X/* Sec|tion 1: |
|00000570| 46 65 61 74 75 72 65 20 | 63 6f 6e 74 72 6f 6c 2e |Feature |control.|
|00000580| 20 2a 2f 0a 58 2f 2a 20 | 53 65 63 74 69 6f 6e 20 | */.X/* |Section |
|00000590| 32 3a 20 50 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |2: Pseud|o-termin|
|000005a0| 61 6c 20 70 61 74 68 6e | 61 6d 65 73 2e 20 2a 2f |al pathn|ames. */|
|000005b0| 0a 58 2f 2a 20 53 65 63 | 74 69 6f 6e 20 33 3a 20 |.X/* Sec|tion 3: |
|000005c0| 4c 6f 67 67 69 6e 67 2e | 20 2a 2f 0a 58 2f 2a 20 |Logging.| */.X/* |
|000005d0| 53 65 63 74 69 6f 6e 20 | 34 3a 20 50 72 6f 74 65 |Section |4: Prote|
|000005e0| 63 74 69 6f 6e 2e 20 2a | 2f 0a 58 2f 2a 20 53 65 |ction. *|/.X/* Se|
|000005f0| 63 74 69 6f 6e 20 35 3a | 20 4f 74 68 65 72 2e 20 |ction 5:| Other. |
|00000600| 2a 2f 0a 58 2f 2a 20 53 | 65 63 74 69 6f 6e 20 36 |*/.X/* S|ection 6|
|00000610| 3a 20 53 61 6e 69 74 79 | 20 63 68 65 63 6b 73 2e |: Sanity| checks.|
|00000620| 20 2a 2f 0a 58 0a 58 2f | 2a 20 45 61 63 68 20 73 | */.X.X/|* Each s|
|00000630| 65 63 74 69 6f 6e 20 73 | 74 61 72 74 73 20 77 69 |ection s|tarts wi|
|00000640| 74 68 20 74 68 65 20 6e | 65 63 65 73 73 61 72 79 |th the n|ecessary|
|00000650| 20 64 65 66 69 6e 65 73 | 20 61 6e 64 20 66 69 6e | defines| and fin|
|00000660| 69 73 68 65 73 20 77 69 | 74 68 20 2a 2f 0a 58 2f |ishes wi|th */.X/|
|00000670| 2a 20 61 6e 20 65 78 70 | 6c 61 6e 61 74 69 6f 6e |* an exp|lanation|
|00000680| 2e 20 2a 2f 0a 58 0a 58 | 0a 58 2f 2a 20 53 65 63 |. */.X.X|.X/* Sec|
|00000690| 74 69 6f 6e 20 31 3a 20 | 46 65 61 74 75 72 65 20 |tion 1: |Feature |
|000006a0| 63 6f 6e 74 72 6f 6c 2e | 20 2a 2f 0a 58 0a 58 2f |control.| */.X.X/|
|000006b0| 2a 23 64 65 66 69 6e 65 | 20 4d 55 53 54 5f 55 54 |*#define| MUST_UT|
|000006c0| 4d 50 20 20 2f 2a 20 66 | 6f 72 63 65 20 75 74 6d |MP /* f|orce utm|
|000006d0| 70 20 6c 6f 67 67 69 6e | 67 20 2a 2f 0a 58 2f 2a |p loggin|g */.X/*|
|000006e0| 23 64 65 66 69 6e 65 20 | 4e 4f 5f 55 54 4d 50 20 |#define |NO_UTMP |
|000006f0| 20 2f 2a 20 70 72 6f 68 | 69 62 69 74 20 75 74 6d | /* proh|ibit utm|
|00000700| 70 20 6c 6f 67 67 69 6e | 67 20 2a 2f 0a 58 2f 2a |p loggin|g */.X/*|
|00000710| 23 64 65 66 69 6e 65 20 | 4d 55 53 54 5f 57 54 4d |#define |MUST_WTM|
|00000720| 50 20 20 2f 2a 20 66 6f | 72 63 65 20 75 74 6d 70 |P /* fo|rce utmp|
|00000730| 20 6c 6f 67 67 69 6e 67 | 20 2a 2f 0a 58 2f 2a 23 | logging| */.X/*#|
|00000740| 64 65 66 69 6e 65 20 4e | 4f 5f 57 54 4d 50 20 20 |define N|O_WTMP |
|00000750| 2f 2a 20 70 72 6f 68 69 | 62 69 74 20 77 74 6d 70 |/* prohi|bit wtmp|
|00000760| 20 6c 6f 67 67 69 6e 67 | 20 2a 2f 0a 58 2f 2a 23 | logging| */.X/*#|
|00000770| 64 65 66 69 6e 65 20 4d | 55 53 54 5f 53 45 53 53 |define M|UST_SESS|
|00000780| 49 4f 4e 20 20 2f 2a 20 | 66 6f 72 63 65 20 64 69 |ION /* |force di|
|00000790| 73 63 6f 6e 6e 65 63 74 | 61 62 6c 65 20 73 65 73 |sconnect|able ses|
|000007a0| 73 69 6f 6e 73 20 28 77 | 68 61 74 20 66 6f 72 3f |sions (w|hat for?|
|000007b0| 29 20 2a 2f 0a 58 2f 2a | 23 64 65 66 69 6e 65 20 |) */.X/*|#define |
|000007c0| 4e 4f 5f 53 45 53 53 49 | 4f 4e 20 20 2f 2a 20 70 |NO_SESSI|ON /* p|
|000007d0| 72 6f 68 69 62 69 74 20 | 64 69 73 63 6f 6e 6e 65 |rohibit |disconne|
|000007e0| 63 74 61 62 6c 65 20 73 | 65 73 73 69 6f 6e 73 20 |ctable s|essions |
|000007f0| 2a 2f 0a 58 2f 2a 23 64 | 65 66 69 6e 65 20 4d 55 |*/.X/*#d|efine MU|
|00000800| 53 54 5f 43 48 4f 57 4e | 20 20 2f 2a 20 66 6f 72 |ST_CHOWN| /* for|
|00000810| 63 65 20 63 68 61 6e 67 | 69 6e 67 20 70 74 79 20 |ce chang|ing pty |
|00000820| 6f 77 6e 65 72 20 2a 2f | 0a 58 2f 2a 23 64 65 66 |owner */|.X/*#def|
|00000830| 69 6e 65 20 4e 4f 5f 43 | 48 4f 57 4e 20 20 2f 2a |ine NO_C|HOWN /*|
|00000840| 20 70 72 6f 68 69 62 69 | 74 20 63 68 61 6e 67 69 | prohibi|t changi|
|00000850| 6e 67 20 70 74 79 20 6f | 77 6e 65 72 20 2a 2f 0a |ng pty o|wner */.|
|00000860| 58 2f 2a 23 64 65 66 69 | 6e 65 20 4e 4f 5f 46 44 |X/*#defi|ne NO_FD|
|00000870| 50 41 53 53 49 4e 47 20 | 20 2f 2a 20 70 72 6f 68 |PASSING | /* proh|
|00000880| 69 62 69 74 20 66 69 6c | 65 20 64 65 73 63 72 69 |ibit fil|e descri|
|00000890| 70 74 6f 72 20 70 61 73 | 73 69 6e 67 20 2a 2f 0a |ptor pas|sing */.|
|000008a0| 58 2f 2a 23 64 65 66 69 | 6e 65 20 4e 4f 5f 55 4e |X/*#defi|ne NO_UN|
|000008b0| 49 58 53 4f 43 4b 53 20 | 20 2f 2a 20 70 72 6f 68 |IXSOCKS | /* proh|
|000008c0| 69 62 69 74 20 75 73 65 | 20 6f 66 20 55 4e 49 58 |ibit use| of UNIX|
|000008d0| 2d 64 6f 6d 61 69 6e 20 | 73 6f 63 6b 65 74 73 20 |-domain |sockets |
|000008e0| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 54 54 59 5f |*/.X#def|ine TTY_|
|000008f0| 57 49 4e 44 4f 57 53 20 | 20 2f 2a 20 68 61 76 65 |WINDOWS | /* have|
|00000900| 20 77 69 6e 73 69 7a 65 | 2c 20 57 49 4e 43 48 2c | winsize|, WINCH,|
|00000910| 20 65 74 63 2e 20 69 6e | 20 74 74 79 20 28 34 2e | etc. in| tty (4.|
|00000920| 33 29 20 2a 2f 0a 58 2f | 2a 23 64 65 66 69 6e 65 |3) */.X/|*#define|
|00000930| 20 54 54 59 5f 41 55 58 | 43 48 41 52 53 20 20 2f | TTY_AUX|CHARS /|
|00000940| 2a 20 68 61 76 65 20 73 | 79 73 74 61 74 2c 20 65 |* have s|ystat, e|
|00000950| 2e 67 2e 20 77 69 74 68 | 20 5e 54 2c 20 69 6e 20 |.g. with| ^T, in |
|00000960| 74 74 79 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |tty */.X|#define |
|00000970| 44 45 53 50 45 52 41 54 | 45 5f 41 4c 41 52 4d 53 |DESPERAT|E_ALARMS|
|00000980| 20 20 2f 2a 20 69 66 20 | 4e 44 45 4c 41 59 20 6d | /* if |NDELAY m|
|00000990| 61 79 20 6e 6f 74 20 62 | 65 20 65 6e 6f 75 67 68 |ay not b|e enough|
|000009a0| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 44 4f 4e | */.X#de|fine DON|
|000009b0| 54 5f 4e 44 45 4c 41 59 | 20 20 2f 2a 20 6d 69 67 |T_NDELAY| /* mig|
|000009c0| 68 74 20 61 73 20 77 65 | 6c 6c 2c 20 77 69 74 68 |ht as we|ll, with|
|000009d0| 20 44 45 53 50 45 52 41 | 54 45 5f 41 4c 41 52 4d | DESPERA|TE_ALARM|
|000009e0| 53 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 53 49 |S */.X#d|efine SI|
|000009f0| 47 49 4e 54 45 52 52 55 | 50 54 20 20 2f 2a 20 69 |GINTERRU|PT /* i|
|00000a00| 66 20 79 6f 75 20 68 61 | 76 65 20 73 69 67 69 6e |f you ha|ve sigin|
|00000a10| 74 65 72 72 75 70 74 28 | 29 20 28 34 2e 33 29 20 |terrupt(|) (4.3) |
|00000a20| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 55 53 4c 45 |*/.X#def|ine USLE|
|00000a30| 45 50 20 20 2f 2a 20 69 | 66 20 79 6f 75 20 68 61 |EP /* i|f you ha|
|00000a40| 76 65 20 75 73 6c 65 65 | 70 28 29 20 2a 2f 0a 58 |ve uslee|p() */.X|
|00000a50| 0a 58 2f 2a 20 54 68 65 | 73 65 20 61 72 65 20 6d |.X/* The|se are m|
|00000a60| 6f 73 74 6c 79 20 73 65 | 6c 66 2d 65 78 70 6c 61 |ostly se|lf-expla|
|00000a70| 6e 61 74 6f 72 79 2e 20 | 49 66 20 79 6f 75 72 20 |natory. |If your |
|00000a80| 73 79 73 74 65 6d 20 64 | 6f 65 73 6e 27 74 20 73 |system d|oesn't s|
|00000a90| 75 70 70 6f 72 74 20 2a | 2f 0a 58 2f 2a 20 73 6f |upport *|/.X/* so|
|00000aa0| 6d 65 20 66 65 61 74 75 | 72 65 2c 20 79 6f 75 20 |me featu|re, you |
|00000ab0| 73 68 6f 75 6c 64 20 70 | 72 6f 68 69 62 69 74 20 |should p|rohibit |
|00000ac0| 69 74 20 62 79 20 64 65 | 66 69 6e 69 6e 67 20 4e |it by de|fining N|
|00000ad0| 4f 5f 57 48 41 54 45 56 | 45 52 2e 20 2a 2f 0a 58 |O_WHATEV|ER. */.X|
|00000ae0| 0a 58 2f 2a 20 41 6e 79 | 20 42 53 44 20 34 2e 32 |.X/* Any| BSD 4.2|
|00000af0| 20 6f 72 20 34 2e 33 20 | 73 79 73 74 65 6d 20 73 | or 4.3 |system s|
|00000b00| 68 6f 75 6c 64 20 68 61 | 76 65 20 55 4e 49 58 53 |hould ha|ve UNIXS|
|00000b10| 4f 43 4b 53 20 61 6e 64 | 20 46 44 50 41 53 53 49 |OCKS and| FDPASSI|
|00000b20| 4e 47 2e 20 4c 6f 6f 6b | 20 2a 2f 0a 58 2f 2a 20 |NG. Look| */.X/* |
|00000b30| 66 6f 72 20 2f 73 79 73 | 2f 68 2f 75 6e 2e 68 20 |for /sys|/h/un.h |
|00000b40| 74 6f 20 73 65 65 20 69 | 66 20 79 6f 75 20 68 61 |to see i|f you ha|
|00000b50| 76 65 20 55 4e 49 58 2d | 64 6f 6d 61 69 6e 20 73 |ve UNIX-|domain s|
|00000b60| 6f 63 6b 65 74 73 2e 20 | 4c 6f 6f 6b 20 66 6f 72 |ockets. |Look for|
|00000b70| 20 2a 2f 0a 58 2f 2a 20 | 6d 73 67 5f 61 63 63 72 | */.X/* |msg_accr|
|00000b80| 69 67 68 74 73 20 69 6e | 20 74 68 65 20 6d 61 6e |ights in| the man|
|00000b90| 20 70 61 67 65 20 66 6f | 72 20 72 65 63 76 6d 73 | page fo|r recvms|
|00000ba0| 67 28 29 20 74 6f 20 73 | 65 65 20 69 66 20 79 6f |g() to s|ee if yo|
|00000bb0| 75 20 68 61 76 65 20 2a | 2f 0a 58 2f 2a 20 66 69 |u have *|/.X/* fi|
|00000bc0| 6c 65 20 64 65 73 72 69 | 70 74 6f 72 20 70 61 73 |le desri|ptor pas|
|00000bd0| 73 69 6e 67 2e 20 28 53 | 6f 6d 65 74 69 6d 65 73 |sing. (S|ometimes|
|00000be0| 20 66 64 20 70 61 73 73 | 69 6e 67 20 69 73 20 61 | fd pass|ing is a|
|00000bf0| 76 61 69 6c 61 62 6c 65 | 20 62 75 74 20 62 75 67 |vailable| but bug|
|00000c00| 67 79 2c 20 2a 2f 0a 58 | 2f 2a 20 61 73 20 69 74 |gy, */.X|/* as it|
|00000c10| 27 73 20 61 20 72 65 6c | 61 74 69 76 65 6c 79 20 |'s a rel|atively |
|00000c20| 6e 65 77 2c 20 70 6f 77 | 65 72 66 75 6c 2c 20 61 |new, pow|erful, a|
|00000c30| 6e 64 20 72 61 72 65 6c | 79 20 65 78 70 6c 6f 69 |nd rarel|y exploi|
|00000c40| 74 65 64 20 66 65 61 74 | 75 72 65 2e 20 49 6e 20 |ted feat|ure. In |
|00000c50| 2a 2f 0a 58 2f 2a 20 74 | 68 69 73 20 63 61 73 65 |*/.X/* t|his case|
|00000c60| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 64 65 66 69 | you sho|uld defi|
|00000c70| 6e 65 20 4e 4f 5f 46 44 | 50 41 53 53 49 4e 47 2e |ne NO_FD|PASSING.|
|00000c80| 29 20 49 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |) In the| current|
|00000c90| 20 76 65 72 73 69 6f 6e | 2c 20 2a 2f 0a 58 2f 2a | version|, */.X/*|
|00000ca0| 20 4e 4f 5f 55 4e 49 58 | 53 4f 43 4b 53 20 69 6d | NO_UNIX|SOCKS im|
|00000cb0| 70 6c 69 65 73 20 4e 4f | 5f 46 44 50 41 53 53 49 |plies NO|_FDPASSI|
|00000cc0| 4e 47 20 61 6e 64 20 4e | 4f 5f 53 45 53 53 49 4f |NG and N|O_SESSIO|
|00000cd0| 4e 3b 20 73 65 65 20 53 | 65 63 74 69 6f 6e 20 36 |N; see S|ection 6|
|00000ce0| 2e 20 2a 2f 0a 58 0a 58 | 2f 2a 20 46 6f 72 20 54 |. */.X.X|/* For T|
|00000cf0| 54 59 5f 57 49 4e 44 4f | 57 53 2c 20 6c 6f 6f 6b |TY_WINDO|WS, look|
|00000d00| 20 66 6f 72 20 73 74 72 | 75 63 74 20 77 69 6e 73 | for str|uct wins|
|00000d10| 69 7a 65 20 69 6e 20 2f | 75 73 72 2f 69 6e 63 6c |ize in /|usr/incl|
|00000d20| 75 64 65 2f 73 67 74 74 | 79 2e 68 2e 20 2a 2f 0a |ude/sgtt|y.h. */.|
|00000d30| 58 2f 2a 20 46 6f 72 20 | 54 54 59 5f 41 55 58 43 |X/* For |TTY_AUXC|
|00000d40| 48 41 52 53 2c 20 6c 6f | 6f 6b 20 66 6f 72 20 73 |HARS, lo|ok for s|
|00000d50| 74 72 75 63 74 20 61 75 | 78 63 68 61 72 73 20 69 |truct au|xchars i|
|00000d60| 6e 20 74 68 65 20 73 61 | 6d 65 20 70 6c 61 63 65 |n the sa|me place|
|00000d70| 2e 20 2a 2f 0a 58 2f 2a | 20 41 6c 6c 20 42 53 44 |. */.X/*| All BSD|
|00000d80| 20 34 2e 33 20 73 79 73 | 74 65 6d 73 20 73 68 6f | 4.3 sys|tems sho|
|00000d90| 75 6c 64 20 68 61 76 65 | 20 77 69 6e 73 69 7a 65 |uld have| winsize|
|00000da0| 3b 20 61 75 78 63 68 61 | 72 73 20 69 73 6e 27 74 |; auxcha|rs isn't|
|00000db0| 20 73 6f 20 63 6f 6d 6d | 6f 6e 2e 20 2a 2f 0a 58 | so comm|on. */.X|
|00000dc0| 0a 58 2f 2a 20 4f 70 65 | 6e 69 6e 67 20 74 68 65 |.X/* Ope|ning the|
|00000dd0| 20 73 6c 61 76 65 20 73 | 69 64 65 20 6f 66 20 61 | slave s|ide of a|
|00000de0| 20 70 74 79 20 77 69 74 | 68 6f 75 74 20 61 20 6d | pty wit|hout a m|
|00000df0| 61 73 74 65 72 20 73 68 | 6f 75 6c 64 20 68 61 6e |aster sh|ould han|
|00000e00| 67 20 74 68 65 20 2a 2f | 0a 58 2f 2a 20 70 72 6f |g the */|.X/* pro|
|00000e10| 63 65 73 73 2e 20 4e 6f | 72 6d 61 6c 6c 79 2c 20 |cess. No|rmally, |
|00000e20| 6f 70 65 6e 69 6e 67 20 | 77 69 74 68 20 4e 44 45 |opening |with NDE|
|00000e30| 4c 41 59 20 67 65 74 73 | 20 61 72 6f 75 6e 64 20 |LAY gets| around |
|00000e40| 74 68 69 73 20 65 66 66 | 65 63 74 3b 20 2a 2f 0a |this eff|ect; */.|
|00000e50| 58 2f 2a 20 6f 70 65 6e | 69 6e 67 20 74 68 65 20 |X/* open|ing the |
|00000e60| 73 6c 61 76 65 20 73 69 | 64 65 20 66 69 72 73 74 |slave si|de first|
|00000e70| 20 69 73 20 6e 65 63 65 | 73 73 61 72 79 20 66 6f | is nece|ssary fo|
|00000e80| 72 20 73 6f 6d 65 20 73 | 65 63 75 72 69 74 79 20 |r some s|ecurity |
|00000e90| 63 68 65 63 6b 73 2e 20 | 2a 2f 0a 58 2f 2a 20 4f |checks. |*/.X/* O|
|00000ea0| 6e 20 73 6f 6d 65 20 73 | 79 73 74 65 6d 73 2c 20 |n some s|ystems, |
|00000eb0| 68 6f 77 65 76 65 72 2c | 20 4e 44 45 4c 41 59 20 |however,| NDELAY |
|00000ec0| 64 6f 65 73 6e 27 74 20 | 64 6f 20 69 74 73 20 6a |doesn't |do its j|
|00000ed0| 6f 62 3b 20 79 6f 75 20 | 6d 75 73 74 20 2a 2f 0a |ob; you |must */.|
|00000ee0| 58 2f 2a 20 64 65 66 69 | 6e 65 20 44 45 53 50 45 |X/* defi|ne DESPE|
|00000ef0| 52 41 54 45 5f 41 4c 41 | 52 4d 53 20 74 6f 20 66 |RATE_ALA|RMS to f|
|00000f00| 6f 72 63 69 62 6c 79 20 | 69 6e 74 65 72 72 75 70 |orcibly |interrup|
|00000f10| 74 20 65 61 63 68 20 6f | 70 65 6e 28 29 2e 20 54 |t each o|pen(). T|
|00000f20| 68 65 72 65 20 2a 2f 0a | 58 2f 2a 20 73 68 6f 75 |here */.|X/* shou|
|00000f30| 6c 64 6e 27 74 20 62 65 | 20 61 6e 79 20 70 72 6f |ldn't be| any pro|
|00000f40| 62 6c 65 6d 20 69 6e 20 | 6c 65 61 76 69 6e 67 20 |blem in |leaving |
|00000f50| 74 68 69 73 20 28 61 6e | 64 20 44 4f 4e 54 5f 4e |this (an|d DONT_N|
|00000f60| 44 45 4c 41 59 29 20 64 | 65 66 69 6e 65 64 20 2a |DELAY) d|efined *|
|00000f70| 2f 0a 58 2f 2a 20 61 6e | 79 77 61 79 2e 20 28 4f |/.X/* an|yway. (O|
|00000f80| 6e 20 61 20 66 65 77 20 | 73 79 73 74 65 6d 73 2c |n a few |systems,|
|00000f90| 20 79 6f 75 20 6d 75 73 | 74 20 68 61 76 65 20 44 | you mus|t have D|
|00000fa0| 4f 4e 54 5f 4e 44 45 4c | 41 59 20 66 6f 72 20 2d |ONT_NDEL|AY for -|
|00000fb0| 78 6e 2e 29 20 2a 2f 0a | 58 0a 58 2f 2a 20 44 65 |xn.) */.|X.X/* De|
|00000fc0| 66 69 6e 65 20 53 49 47 | 49 4e 54 45 52 52 55 50 |fine SIG|INTERRUP|
|00000fd0| 54 20 69 66 20 79 6f 75 | 20 68 61 76 65 20 73 69 |T if you| have si|
|00000fe0| 67 69 6e 74 65 72 72 75 | 70 74 28 29 20 28 69 2e |ginterru|pt() (i.|
|00000ff0| 65 2e 2c 20 69 66 20 79 | 6f 75 27 72 65 20 2a 2f |e., if y|ou're */|
|00001000| 0a 58 2f 2a 20 72 75 6e | 6e 69 6e 67 20 42 53 44 |.X/* run|ning BSD|
|00001010| 20 34 2e 33 29 2e 20 57 | 69 74 68 6f 75 74 20 74 | 4.3). W|ithout t|
|00001020| 68 69 73 20 63 61 6c 6c | 2c 20 74 68 65 72 65 27 |his call|, there'|
|00001030| 73 20 6e 6f 20 63 6f 72 | 72 65 63 74 20 77 61 79 |s no cor|rect way|
|00001040| 20 74 6f 20 64 6f 20 2a | 2f 0a 58 2f 2a 20 70 65 | to do *|/.X/* pe|
|00001050| 72 2d 70 72 6f 63 65 73 | 73 20 6e 6f 6e 62 6c 6f |r-proces|s nonblo|
|00001060| 63 6b 69 6e 67 20 49 2f | 4f 2c 20 61 6e 64 20 70 |cking I/|O, and p|
|00001070| 74 79 20 6d 61 79 20 62 | 6c 6f 63 6b 20 77 68 65 |ty may b|lock whe|
|00001080| 6e 20 69 74 20 73 68 6f | 75 6c 64 6e 27 74 20 2a |n it sho|uldn't *|
|00001090| 2f 0a 58 2f 2a 20 28 6e | 61 6d 65 6c 79 2c 20 77 |/.X/* (n|amely, w|
|000010a0| 68 65 6e 20 69 74 20 68 | 61 73 20 4e 20 62 79 74 |hen it h|as N byt|
|000010b0| 65 73 20 74 6f 20 77 72 | 69 74 65 20 74 6f 20 74 |es to wr|ite to t|
|000010c0| 68 65 20 6f 75 74 70 75 | 74 2c 20 74 68 65 20 6f |he outpu|t, the o|
|000010d0| 75 74 70 75 74 20 69 73 | 20 2a 2f 0a 58 2f 2a 20 |utput is| */.X/* |
|000010e0| 61 20 62 6c 6f 63 6b 69 | 6e 67 20 70 69 70 65 20 |a blocki|ng pipe |
|000010f0| 77 69 74 68 20 4d 20 62 | 79 74 65 73 20 6f 66 20 |with M b|ytes of |
|00001100| 73 70 61 63 65 2c 20 61 | 6e 64 20 4e 20 3e 20 4d |space, a|nd N > M|
|00001110| 20 3e 20 30 29 2e 20 49 | 66 20 79 6f 75 20 64 65 | > 0). I|f you de|
|00001120| 66 69 6e 65 20 2a 2f 0a | 58 2f 2a 20 53 49 47 49 |fine */.|X/* SIGI|
|00001130| 4e 54 45 52 52 55 50 54 | 2c 20 70 74 79 20 77 69 |NTERRUPT|, pty wi|
|00001140| 6c 6c 20 74 61 6b 65 20 | 73 6f 6d 65 20 65 78 74 |ll take |some ext|
|00001150| 72 61 20 65 66 66 6f 72 | 74 20 74 6f 20 6e 65 76 |ra effor|t to nev|
|00001160| 65 72 2c 20 65 76 65 72 | 2c 20 65 76 65 72 20 2a |er, ever|, ever *|
|00001170| 2f 0a 58 2f 2a 20 62 6c | 6f 63 6b 20 77 68 65 6e |/.X/* bl|ock when|
|00001180| 20 69 74 20 64 6f 65 73 | 6e 27 74 20 68 61 76 65 | it does|n't have|
|00001190| 20 74 6f 2e 20 28 53 65 | 65 20 4f 55 54 42 55 46 | to. (Se|e OUTBUF|
|000011a0| 53 49 5a 45 2c 20 62 65 | 6c 6f 77 2e 29 20 2a 2f |SIZE, be|low.) */|
|000011b0| 0a 58 0a 58 2f 2a 20 44 | 65 66 69 6e 65 20 55 53 |.X.X/* D|efine US|
|000011c0| 4c 45 45 50 20 69 66 20 | 79 6f 75 20 68 61 76 65 |LEEP if |you have|
|000011d0| 20 75 73 6c 65 65 70 28 | 29 2e 20 2a 2f 0a 58 0a | usleep(|). */.X.|
|000011e0| 58 0a 58 2f 2a 20 53 65 | 63 74 69 6f 6e 20 32 3a |X.X/* Se|ction 2:|
|000011f0| 20 50 61 74 68 6e 61 6d | 65 73 2e 20 2a 2f 0a 58 | Pathnam|es. */.X|
|00001200| 0a 58 23 69 66 6e 64 65 | 66 20 50 54 59 44 49 52 |.X#ifnde|f PTYDIR|
|00001210| 0a 58 23 64 65 66 69 6e | 65 20 50 54 59 44 49 52 |.X#defin|e PTYDIR|
|00001220| 20 22 2f 75 73 72 2f 65 | 74 63 2f 70 74 79 22 0a | "/usr/e|tc/pty".|
|00001230| 58 23 65 6e 64 69 66 0a | 58 23 69 66 6e 64 65 66 |X#endif.|X#ifndef|
|00001240| 20 44 45 56 4d 54 59 0a | 58 23 64 65 66 69 6e 65 | DEVMTY.|X#define|
|00001250| 20 44 45 56 4d 54 59 20 | 22 2f 64 65 76 2f 70 74 | DEVMTY |"/dev/pt|
|00001260| 79 20 20 22 0a 58 23 65 | 6e 64 69 66 0a 58 23 69 |y ".X#e|ndif.X#i|
|00001270| 66 6e 64 65 66 20 44 45 | 56 53 54 59 0a 58 23 64 |fndef DE|VSTY.X#d|
|00001280| 65 66 69 6e 65 20 44 45 | 56 53 54 59 20 22 2f 64 |efine DE|VSTY "/d|
|00001290| 65 76 2f 74 74 79 20 20 | 22 0a 58 23 65 6e 64 69 |ev/tty |".X#endi|
|000012a0| 66 0a 58 23 69 66 6e 64 | 65 66 20 50 54 59 31 0a |f.X#ifnd|ef PTY1.|
|000012b0| 58 23 64 65 66 69 6e 65 | 20 50 54 59 31 20 22 70 |X#define| PTY1 "p|
|000012c0| 71 72 73 74 75 76 77 78 | 79 7a 61 62 63 64 65 66 |qrstuvwx|yzabcdef|
|000012d0| 67 68 69 6a 6b 6c 6d 6e | 6f 22 0a 58 23 65 6e 64 |ghijklmn|o".X#end|
|000012e0| 69 66 0a 58 23 69 66 6e | 64 65 66 20 50 54 59 32 |if.X#ifn|def PTY2|
|000012f0| 0a 58 23 64 65 66 69 6e | 65 20 50 54 59 32 20 22 |.X#defin|e PTY2 "|
|00001300| 30 31 32 33 34 35 36 37 | 38 39 61 62 63 64 65 66 |01234567|89abcdef|
|00001310| 22 0a 58 23 65 6e 64 69 | 66 0a 58 23 69 66 6e 64 |".X#endi|f.X#ifnd|
|00001320| 65 66 20 54 54 59 4e 41 | 4d 45 4c 45 4e 0a 58 23 |ef TTYNA|MELEN.X#|
|00001330| 64 65 66 69 6e 65 20 54 | 54 59 4e 41 4d 45 4c 45 |define T|TYNAMELE|
|00001340| 4e 20 33 30 0a 58 23 65 | 6e 64 69 66 0a 58 0a 58 |N 30.X#e|ndif.X.X|
|00001350| 2f 2a 20 50 54 59 44 49 | 52 20 69 73 20 77 68 65 |/* PTYDI|R is whe|
|00001360| 72 65 20 70 74 79 20 73 | 65 73 73 69 6f 6e 73 20 |re pty s|essions |
|00001370| 73 74 6f 72 65 20 74 68 | 65 69 72 20 69 6e 66 6f |store th|eir info|
|00001380| 72 6d 61 74 69 6f 6e 2e | 20 59 6f 75 20 73 68 6f |rmation.| You sho|
|00001390| 75 6c 64 20 2a 2f 0a 58 | 2f 2a 20 63 72 65 61 74 |uld */.X|/* creat|
|000013a0| 65 20 69 74 20 6d 6f 64 | 65 20 37 30 30 2c 20 6f |e it mod|e 700, o|
|000013b0| 77 6e 65 72 20 70 74 79 | 2c 20 67 72 6f 75 70 20 |wner pty|, group |
|000013c0| 69 72 72 65 6c 65 76 61 | 6e 74 2e 20 59 6f 75 20 |irreleva|nt. You |
|000013d0| 6d 75 73 74 20 64 65 66 | 69 6e 65 20 2a 2f 0a 58 |must def|ine */.X|
|000013e0| 2f 2a 20 50 54 59 44 49 | 52 20 61 73 20 73 6f 6d |/* PTYDI|R as som|
|000013f0| 65 74 68 69 6e 67 20 65 | 76 65 6e 20 69 66 20 79 |ething e|ven if y|
|00001400| 6f 75 20 64 6f 6e 27 74 | 20 61 6c 6c 6f 77 20 73 |ou don't| allow s|
|00001410| 65 73 73 69 6f 6e 73 2e | 20 49 66 20 79 6f 75 20 |essions.| If you |
|00001420| 64 6f 6e 27 74 20 2a 2f | 0a 58 2f 2a 20 73 65 74 |don't */|.X/* set|
|00001430| 20 75 70 20 50 54 59 44 | 49 52 20 61 74 20 61 6c | up PTYD|IR at al|
|00001440| 6c 20 62 75 74 20 79 6f | 75 20 64 6f 20 61 6c 6c |l but yo|u do all|
|00001450| 6f 77 20 73 65 73 73 69 | 6f 6e 73 2c 20 70 74 79 |ow sessi|ons, pty|
|00001460| 20 77 69 6c 6c 20 73 77 | 69 74 63 68 20 2a 2f 0a | will sw|itch */.|
|00001470| 58 2f 2a 20 6f 75 74 20 | 6f 66 20 73 65 74 75 69 |X/* out |of setui|
|00001480| 64 20 61 66 74 65 72 20 | 67 72 61 62 62 69 6e 67 |d after |grabbing|
|00001490| 20 61 20 70 74 79 2c 20 | 74 68 65 6e 20 73 65 74 | a pty, |then set|
|000014a0| 20 75 70 20 73 65 73 73 | 69 6f 6e 20 69 6e 66 6f | up sess|ion info|
|000014b0| 72 6d 61 74 69 6f 6e 20 | 2a 2f 0a 58 2f 2a 20 69 |rmation |*/.X/* i|
|000014c0| 6e 20 74 68 65 20 75 73 | 65 72 27 73 20 68 6f 6d |n the us|er's hom|
|000014d0| 65 20 64 69 72 65 63 74 | 6f 72 79 2e 20 54 68 69 |e direct|ory. Thi|
|000014e0| 73 20 69 73 6e 27 74 20 | 74 6f 74 61 6c 6c 79 20 |s isn't |totally |
|000014f0| 73 65 63 75 72 65 20 62 | 75 74 20 69 74 27 73 20 |secure b|ut it's |
|00001500| 2a 2f 0a 58 2f 2a 20 61 | 74 20 6c 65 61 73 74 20 |*/.X/* a|t least |
|00001510| 70 61 72 74 69 61 6c 6c | 79 20 77 6f 72 6b 61 62 |partiall|y workab|
|00001520| 6c 65 2e 20 2a 2f 0a 58 | 0a 58 2f 2a 20 44 45 56 |le. */.X|.X/* DEV|
|00001530| 4d 54 59 20 61 6e 64 20 | 44 45 56 53 54 59 20 61 |MTY and |DEVSTY a|
|00001540| 72 65 20 74 68 65 20 62 | 61 73 65 6e 61 6d 65 73 |re the b|asenames|
|00001550| 20 6f 66 20 74 68 65 20 | 6d 61 73 74 65 72 20 61 | of the |master a|
|00001560| 6e 64 20 73 6c 61 76 65 | 20 70 74 79 73 20 2a 2f |nd slave| ptys */|
|00001570| 0a 58 2f 2a 20 72 65 73 | 70 65 63 74 69 76 65 6c |.X/* res|pectivel|
|00001580| 79 2e 20 54 68 65 79 20 | 6d 75 73 74 20 65 61 63 |y. They |must eac|
|00001590| 68 20 65 6e 64 20 77 69 | 74 68 20 74 77 6f 20 73 |h end wi|th two s|
|000015a0| 70 61 63 65 73 2c 20 66 | 69 6c 6c 65 64 20 69 6e |paces, f|illed in|
|000015b0| 20 77 69 74 68 20 2a 2f | 0a 58 2f 2a 20 63 68 61 | with */|.X/* cha|
|000015c0| 72 61 63 74 65 72 73 20 | 66 72 6f 6d 20 50 54 59 |racters |from PTY|
|000015d0| 31 20 61 6e 64 20 50 54 | 59 32 20 72 65 73 70 65 |1 and PT|Y2 respe|
|000015e0| 63 74 69 76 65 6c 79 2e | 20 49 66 20 79 6f 75 72 |ctively.| If your|
|000015f0| 20 70 74 79 73 20 61 72 | 65 6e 27 74 20 2a 2f 0a | ptys ar|en't */.|
|00001600| 58 2f 2a 20 6c 61 62 65 | 6c 6c 65 64 20 62 79 20 |X/* labe|lled by |
|00001610| 74 68 69 73 20 63 6f 6e | 76 65 6e 74 69 6f 6e 2c |this con|vention,|
|00001620| 20 49 27 6d 20 73 75 72 | 70 72 69 73 65 64 20 79 | I'm sur|prised y|
|00001630| 6f 75 20 68 61 76 65 20 | 61 6e 79 74 68 69 6e 67 |ou have |anything|
|00001640| 20 77 6f 72 6b 69 6e 67 | 3b 20 2a 2f 0a 58 2f 2a | working|; */.X/*|
|00001650| 20 65 69 74 68 65 72 20 | 73 65 74 20 75 70 20 61 | either |set up a|
|00001660| 20 6e 65 77 20 70 74 79 | 20 62 61 6e 6b 20 77 69 | new pty| bank wi|
|00001670| 74 68 20 6e 6f 72 6d 61 | 6c 20 6e 61 6d 65 73 20 |th norma|l names |
|00001680| 6f 72 20 63 68 61 6e 67 | 65 20 74 68 65 20 70 74 |or chang|e the pt|
|00001690| 79 20 63 6f 64 65 20 2a | 2f 0a 58 2f 2a 20 74 68 |y code *|/.X/* th|
|000016a0| 61 74 20 61 6c 6c 6f 63 | 61 74 65 73 20 70 74 79 |at alloc|ates pty|
|000016b0| 73 2e 20 4e 6f 74 65 20 | 74 68 61 74 20 63 6f 6e |s. Note |that con|
|000016c0| 76 65 6e 74 69 6f 6e 20 | 61 6c 6c 6f 77 73 20 79 |vention |allows y|
|000016d0| 6f 75 20 74 6f 20 6f 6e | 6c 79 20 68 61 76 65 20 |ou to on|ly have |
|000016e0| 2a 2f 0a 58 2f 2a 20 73 | 6f 6d 65 20 6f 66 20 61 |*/.X/* s|ome of a|
|000016f0| 20 70 74 79 20 62 61 6e | 6b 2c 20 61 73 20 6c 6f | pty ban|k, as lo|
|00001700| 6e 67 20 61 73 20 6f 6e | 65 20 6f 66 20 74 68 65 |ng as on|e of the|
|00001710| 6d 20 69 73 20 74 68 65 | 72 65 3b 20 74 68 65 20 |m is the|re; the |
|00001720| 66 69 72 73 74 20 6c 65 | 74 74 65 72 20 2a 2f 0a |first le|tter */.|
|00001730| 58 2f 2a 20 69 6e 20 50 | 54 59 32 20 6d 75 73 74 |X/* in P|TY2 must|
|00001740| 20 69 6e 64 69 63 61 74 | 65 20 74 68 61 74 20 6f | indicat|e that o|
|00001750| 6e 65 2e 20 2a 2f 0a 58 | 0a 58 2f 2a 20 54 68 65 |ne. */.X|.X/* The|
|00001760| 20 6f 72 64 65 72 20 6f | 66 20 50 54 59 31 20 61 | order o|f PTY1 a|
|00001770| 6e 64 20 50 54 59 32 20 | 69 73 20 74 68 65 20 70 |nd PTY2 |is the p|
|00001780| 74 79 20 73 65 61 72 63 | 68 69 6e 67 20 6f 72 64 |ty searc|hing ord|
|00001790| 65 72 2e 20 70 74 79 20 | 61 6c 6c 6f 77 73 20 2a |er. pty |allows *|
|000017a0| 2f 0a 58 2f 2a 20 28 61 | 6e 64 2c 20 61 73 20 61 |/.X/* (a|nd, as a|
|000017b0| 20 62 72 65 61 6b 20 66 | 72 6f 6d 20 74 72 61 64 | break f|rom trad|
|000017c0| 69 74 69 6f 6e 2c 20 75 | 73 65 73 20 62 79 20 64 |ition, u|ses by d|
|000017d0| 65 66 61 75 6c 74 29 20 | 72 61 6e 64 6f 6d 20 73 |efault) |random s|
|000017e0| 65 61 72 63 68 65 73 2c | 20 2a 2f 0a 58 2f 2a 20 |earches,| */.X/* |
|000017f0| 73 74 61 72 74 69 6e 67 | 20 66 72 6f 6d 20 72 61 |starting| from ra|
|00001800| 6e 64 6f 6d 20 73 70 6f | 74 73 20 69 6e 20 50 54 |ndom spo|ts in PT|
|00001810| 59 31 20 61 6e 64 20 50 | 54 59 32 20 72 61 74 68 |Y1 and P|TY2 rath|
|00001820| 65 72 20 74 68 61 6e 20 | 74 68 65 20 62 65 67 69 |er than |the begi|
|00001830| 6e 6e 69 6e 67 2e 20 2a | 2f 0a 58 2f 2a 20 54 68 |nning. *|/.X/* Th|
|00001840| 69 73 20 68 61 73 20 73 | 65 76 65 72 61 6c 20 67 |is has s|everal g|
|00001850| 6f 6f 64 20 65 66 66 65 | 63 74 73 2c 20 61 6c 74 |ood effe|cts, alt|
|00001860| 68 6f 75 67 68 20 79 6f | 75 20 6d 61 79 20 74 68 |hough yo|u may th|
|00001870| 69 6e 6b 20 75 74 6d 70 | 20 77 69 6c 6c 20 6c 6f |ink utmp| will lo|
|00001880| 6f 6b 20 2a 2f 0a 58 2f | 2a 20 61 20 62 69 74 20 |ok */.X/|* a bit |
|00001890| 75 67 6c 79 2e 20 2a 2f | 0a 58 0a 58 2f 2a 20 49 |ugly. */|.X.X/* I|
|000018a0| 66 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 67 72 |f you wa|nt to gr|
|000018b0| 61 64 75 61 6c 6c 79 20 | 63 6f 6e 76 65 72 74 20 |adually |convert |
|000018c0| 79 6f 75 72 20 73 79 73 | 74 65 6d 20 74 6f 20 75 |your sys|tem to u|
|000018d0| 73 69 6e 67 20 74 68 69 | 73 20 70 72 6f 67 72 61 |sing thi|s progra|
|000018e0| 6d 2c 20 2a 2f 0a 58 2f | 2a 20 50 54 59 31 20 61 |m, */.X/|* PTY1 a|
|000018f0| 6e 64 20 50 54 59 32 20 | 73 68 6f 75 6c 64 6e 27 |nd PTY2 |shouldn'|
|00001900| 74 20 72 65 66 65 72 65 | 6e 63 65 20 61 6c 6c 20 |t refere|nce all |
|00001910| 79 6f 75 72 20 70 74 79 | 73 2e 20 49 6e 73 74 65 |your pty|s. Inste|
|00001920| 61 64 2c 20 70 69 63 6b | 20 61 20 2a 2f 0a 58 2f |ad, pick| a */.X/|
|00001930| 2a 20 6c 61 72 67 65 20 | 65 6e 6f 75 67 68 20 73 |* large |enough s|
|00001940| 75 62 73 65 74 20 6f 66 | 20 79 6f 75 72 20 70 74 |ubset of| your pt|
|00001950| 79 73 20 74 6f 20 62 65 | 20 75 73 61 62 6c 65 2c |ys to be| usable,|
|00001960| 20 61 6e 64 20 74 72 79 | 20 74 68 69 6e 67 73 20 | and try| things |
|00001970| 6f 75 74 20 2a 2f 0a 58 | 2f 2a 20 77 69 74 68 20 |out */.X|/* with |
|00001980| 6a 75 73 74 20 74 68 6f | 73 65 2e 20 49 66 20 65 |just tho|se. If e|
|00001990| 76 65 72 79 74 68 69 6e | 67 20 77 6f 72 6b 73 20 |verythin|g works |
|000019a0| 61 6e 64 20 79 6f 75 20 | 6c 69 6b 65 20 70 74 79 |and you |like pty|
|000019b0| 27 73 20 63 61 70 61 62 | 69 6c 69 74 69 65 73 2c |'s capab|ilities,|
|000019c0| 20 2a 2f 0a 58 2f 2a 20 | 72 65 6d 6f 76 65 20 79 | */.X/* |remove y|
|000019d0| 6f 75 72 20 6f 6c 64 20 | 70 74 79 73 2c 20 6f 72 |our old |ptys, or|
|000019e0| 20 72 65 63 6f 6d 70 69 | 6c 65 20 70 74 79 20 74 | recompi|le pty t|
|000019f0| 6f 20 72 65 66 65 72 65 | 6e 63 65 20 61 6c 6c 20 |o refere|nce all |
|00001a00| 6f 66 20 74 68 65 6d 2e | 20 2a 2f 0a 58 0a 58 2f |of them.| */.X.X/|
|00001a10| 2a 20 54 54 59 4e 41 4d | 45 4c 45 4e 20 73 68 6f |* TTYNAM|ELEN sho|
|00001a20| 75 6c 64 20 62 65 20 74 | 68 65 20 6d 61 78 69 6d |uld be t|he maxim|
|00001a30| 75 6d 20 6c 65 6e 67 74 | 68 20 6f 66 20 61 20 74 |um lengt|h of a t|
|00001a40| 74 79 20 28 6e 6f 74 20 | 6a 75 73 74 20 70 74 79 |ty (not |just pty|
|00001a50| 21 29 20 2a 2f 0a 58 2f | 2a 20 6e 61 6d 65 2e 20 |!) */.X/|* name. |
|00001a60| 54 54 59 4e 41 4d 45 4c | 45 4e 20 73 68 6f 75 6c |TTYNAMEL|EN shoul|
|00001a70| 64 6e 27 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 |dn't hav|e to be |
|00001a80| 74 68 65 72 65 3b 20 69 | 74 27 73 20 75 73 65 64 |there; i|t's used|
|00001a90| 20 74 6f 20 77 6f 72 6b | 20 2a 2f 0a 58 2f 2a 20 | to work| */.X/* |
|00001aa0| 61 72 6f 75 6e 64 20 73 | 6f 6d 65 20 66 75 6e 64 |around s|ome fund|
|00001ab0| 61 6d 65 6e 74 61 6c 20 | 66 61 69 6c 75 72 65 73 |amental |failures|
|00001ac0| 20 69 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | in the |current |
|00001ad0| 74 74 79 2f 70 74 79 20 | 6d 6f 64 65 6c 2e 20 2a |tty/pty |model. *|
|00001ae0| 2f 0a 58 0a 58 0a 58 2f | 2a 20 53 65 63 74 69 6f |/.X.X.X/|* Sectio|
|00001af0| 6e 20 33 3a 20 4c 6f 67 | 67 69 6e 67 2e 20 2a 2f |n 3: Log|ging. */|
|00001b00| 0a 58 0a 58 23 69 66 6e | 64 65 66 20 50 54 59 55 |.X.X#ifn|def PTYU|
|00001b10| 54 4d 50 5f 46 49 4c 45 | 0a 58 23 64 65 66 69 6e |TMP_FILE|.X#defin|
|00001b20| 65 20 50 54 59 55 54 4d | 50 5f 46 49 4c 45 20 22 |e PTYUTM|P_FILE "|
|00001b30| 2f 65 74 63 2f 75 74 6d | 70 22 0a 58 23 65 6e 64 |/etc/utm|p".X#end|
|00001b40| 69 66 0a 58 23 69 66 6e | 64 65 66 20 50 54 59 57 |if.X#ifn|def PTYW|
|00001b50| 54 4d 50 5f 46 49 4c 45 | 0a 58 23 64 65 66 69 6e |TMP_FILE|.X#defin|
|00001b60| 65 20 50 54 59 57 54 4d | 50 5f 46 49 4c 45 20 22 |e PTYWTM|P_FILE "|
|00001b70| 2f 75 73 72 2f 61 64 6d | 2f 77 74 6d 70 22 0a 58 |/usr/adm|/wtmp".X|
|00001b80| 23 65 6e 64 69 66 0a 58 | 23 69 66 6e 64 65 66 20 |#endif.X|#ifndef |
|00001b90| 50 54 59 55 54 4d 50 5f | 4f 46 46 53 45 54 0a 58 |PTYUTMP_|OFFSET.X|
|00001ba0| 23 64 65 66 69 6e 65 20 | 50 54 59 55 54 4d 50 5f |#define |PTYUTMP_|
|00001bb0| 4f 46 46 53 45 54 20 35 | 0a 58 23 65 6e 64 69 66 |OFFSET 5|.X#endif|
|00001bc0| 0a 58 23 69 66 6e 64 65 | 66 20 50 54 59 57 54 4d |.X#ifnde|f PTYWTM|
|00001bd0| 50 5f 4f 46 46 53 45 54 | 0a 58 23 64 65 66 69 6e |P_OFFSET|.X#defin|
|00001be0| 65 20 50 54 59 57 54 4d | 50 5f 4f 46 46 53 45 54 |e PTYWTM|P_OFFSET|
|00001bf0| 20 50 54 59 55 54 4d 50 | 5f 4f 46 46 53 45 54 0a | PTYUTMP|_OFFSET.|
|00001c00| 58 23 65 6e 64 69 66 0a | 58 23 69 66 6e 64 65 66 |X#endif.|X#ifndef|
|00001c10| 20 50 54 59 55 54 4d 50 | 5f 48 4f 53 54 0a 58 23 | PTYUTMP|_HOST.X#|
|00001c20| 64 65 66 69 6e 65 20 50 | 54 59 55 54 4d 50 5f 48 |define P|TYUTMP_H|
|00001c30| 4f 53 54 20 22 70 74 79 | 22 0a 58 23 65 6e 64 69 |OST "pty|".X#endi|
|00001c40| 66 0a 58 23 69 66 6e 64 | 65 66 20 50 54 59 57 54 |f.X#ifnd|ef PTYWT|
|00001c50| 4d 50 5f 48 4f 53 54 0a | 58 23 64 65 66 69 6e 65 |MP_HOST.|X#define|
|00001c60| 20 50 54 59 57 54 4d 50 | 5f 48 4f 53 54 20 50 54 | PTYWTMP|_HOST PT|
|00001c70| 59 55 54 4d 50 5f 48 4f | 53 54 0a 58 23 65 6e 64 |YUTMP_HO|ST.X#end|
|00001c80| 69 66 0a 58 23 69 66 6e | 64 65 66 20 50 54 59 55 |if.X#ifn|def PTYU|
|00001c90| 54 4d 50 5f 53 57 48 4f | 53 54 0a 58 23 64 65 66 |TMP_SWHO|ST.X#def|
|00001ca0| 69 6e 65 20 50 54 59 55 | 54 4d 50 5f 53 57 48 4f |ine PTYU|TMP_SWHO|
|00001cb0| 53 54 20 50 54 59 55 54 | 4d 50 5f 48 4f 53 54 0a |ST PTYUT|MP_HOST.|
|00001cc0| 58 23 65 6e 64 69 66 0a | 58 23 69 66 6e 64 65 66 |X#endif.|X#ifndef|
|00001cd0| 20 50 54 59 57 54 4d 50 | 5f 53 57 48 4f 53 54 0a | PTYWTMP|_SWHOST.|
|00001ce0| 58 23 64 65 66 69 6e 65 | 20 50 54 59 57 54 4d 50 |X#define| PTYWTMP|
|00001cf0| 5f 53 57 48 4f 53 54 20 | 22 70 74 79 2d 73 65 73 |_SWHOST |"pty-ses|
|00001d00| 73 75 73 65 72 22 0a 58 | 23 65 6e 64 69 66 0a 58 |suser".X|#endif.X|
|00001d10| 0a 58 2f 2a 20 54 68 65 | 73 65 20 61 72 65 20 73 |.X/* The|se are s|
|00001d20| 74 72 61 69 67 68 74 66 | 6f 72 77 61 72 64 2e 20 |traightf|orward. |
|00001d30| 46 49 4c 45 20 69 73 20 | 77 68 65 72 65 20 79 6f |FILE is |where yo|
|00001d40| 75 20 77 61 6e 74 20 74 | 68 65 20 6c 6f 67 73 2e |u want t|he logs.|
|00001d50| 20 75 74 6d 70 20 61 6e | 64 20 2a 2f 0a 58 2f 2a | utmp an|d */.X/*|
|00001d60| 20 77 74 6d 70 20 61 72 | 65 20 61 62 6f 75 74 20 | wtmp ar|e about |
|00001d70| 61 73 20 73 65 6e 73 69 | 62 6c 65 20 61 73 20 2f |as sensi|ble as /|
|00001d80| 65 74 63 2f 70 61 73 73 | 77 64 20 61 6e 64 20 75 |etc/pass|wd and u|
|00001d90| 6e 66 6f 72 74 75 6e 61 | 74 65 6c 79 20 6a 75 73 |nfortuna|tely jus|
|00001da0| 74 20 61 73 20 2a 2f 0a | 58 2f 2a 20 70 6f 70 75 |t as */.|X/* popu|
|00001db0| 6c 61 72 3b 20 74 79 70 | 69 63 61 6c 6c 79 20 74 |lar; typ|ically t|
|00001dc0| 68 65 79 27 72 65 20 69 | 6e 20 2f 65 74 63 2f 75 |hey're i|n /etc/u|
|00001dd0| 74 6d 70 20 61 6e 64 20 | 2f 75 73 72 2f 61 64 6d |tmp and |/usr/adm|
|00001de0| 2f 77 74 6d 70 2c 20 61 | 6e 64 20 74 68 65 20 2a |/wtmp, a|nd the *|
|00001df0| 2f 0a 58 2f 2a 20 75 74 | 69 6c 69 74 79 20 70 72 |/.X/* ut|ility pr|
|00001e00| 6f 67 72 61 6d 73 20 69 | 6e 20 74 68 69 73 20 70 |ograms i|n this p|
|00001e10| 61 63 6b 61 67 65 20 73 | 75 70 70 6f 72 74 20 74 |ackage s|upport t|
|00001e20| 68 61 74 20 63 6f 6e 76 | 65 6e 74 69 6f 6e 2e 20 |hat conv|ention. |
|00001e30| 28 77 74 6d 70 20 6c 6f | 67 73 20 2a 2f 0a 58 2f |(wtmp lo|gs */.X/|
|00001e40| 2a 20 61 6c 6c 20 69 6e | 73 20 61 6e 64 20 6f 75 |* all in|s and ou|
|00001e50| 74 73 2e 20 75 74 6d 70 | 20 6f 6e 6c 79 20 68 61 |ts. utmp| only ha|
|00001e60| 73 20 6f 6e 65 20 65 6e | 74 72 79 20 70 65 72 20 |s one en|try per |
|00001e70| 6c 69 6e 65 2c 20 6e 61 | 6d 65 6c 79 20 74 68 65 |line, na|mely the|
|00001e80| 20 6c 61 73 74 20 2a 2f | 0a 58 2f 2a 20 77 74 6d | last */|.X/* wtm|
|00001e90| 70 20 65 6e 74 72 79 20 | 66 6f 72 20 69 74 2e 29 |p entry |for it.)|
|00001ea0| 20 4f 46 46 53 45 54 20 | 69 73 20 74 68 65 20 6e | OFFSET |is the n|
|00001eb0| 75 6d 62 65 72 20 6f 66 | 20 63 68 61 72 73 20 66 |umber of| chars f|
|00001ec0| 72 6f 6d 20 61 20 70 74 | 79 20 65 78 74 65 6e 73 |rom a pt|y extens|
|00001ed0| 69 6f 6e 20 2a 2f 0a 58 | 2f 2a 20 74 6f 20 72 65 |ion */.X|/* to re|
|00001ee0| 6d 6f 76 65 20 66 72 6f | 6d 20 61 20 6c 6f 67 20 |move fro|m a log |
|00001ef0| 65 6e 74 72 79 3b 20 75 | 73 75 61 6c 6c 79 20 74 |entry; u|sually t|
|00001f00| 68 69 73 20 69 73 20 35 | 2c 20 74 6f 20 6d 61 6b |his is 5|, to mak|
|00001f10| 65 20 2f 64 65 76 2f 74 | 74 79 78 78 20 69 6e 74 |e /dev/t|tyxx int|
|00001f20| 6f 20 2a 2f 0a 58 2f 2a | 20 74 74 79 78 78 2e 20 |o */.X/*| ttyxx. |
|00001f30| 46 69 6e 61 6c 6c 79 2c | 20 48 4f 53 54 20 69 73 |Finally,| HOST is|
|00001f40| 20 74 68 65 20 6e 61 6d | 65 20 74 68 61 74 20 79 | the nam|e that y|
|00001f50| 6f 75 20 77 61 6e 74 20 | 69 6e 20 74 68 65 20 60 |ou want |in the `|
|00001f60| 60 72 65 6d 6f 74 65 27 | 27 20 66 69 65 6c 64 20 |`remote'|' field |
|00001f70| 2a 2f 0a 58 2f 2a 20 6f | 66 20 74 68 65 20 6c 6f |*/.X/* o|f the lo|
|00001f80| 67 3b 20 74 68 61 74 20 | 66 69 65 6c 64 20 69 73 |g; that |field is|
|00001f90| 20 72 61 74 68 65 72 20 | 69 6c 6c 6f 67 69 63 61 | rather |illogica|
|00001fa0| 6c 2c 20 62 75 74 20 69 | 74 27 73 20 74 68 65 72 |l, but i|t's ther|
|00001fb0| 65 2e 20 2a 2f 0a 58 0a | 58 2f 2a 20 53 57 48 4f |e. */.X.|X/* SWHO|
|00001fc0| 53 54 20 69 73 20 61 20 | 76 61 72 69 61 6e 74 20 |ST is a |variant |
|00001fd0| 6f 66 20 48 4f 53 54 2c | 20 66 6f 72 20 77 68 61 |of HOST,| for wha|
|00001fe0| 74 27 73 20 6c 6f 67 67 | 65 64 20 75 70 6f 6e 20 |t's logg|ed upon |
|00001ff0| 61 20 73 65 73 73 69 6f | 6e 20 75 69 64 20 2a 2f |a sessio|n uid */|
|00002000| 0a 58 2f 2a 20 73 77 69 | 74 63 68 2e 20 2a 2f 0a |.X/* swi|tch. */.|
|00002010| 58 0a 58 2f 2a 20 49 66 | 20 79 6f 75 27 72 65 20 |X.X/* If| you're |
|00002020| 75 73 69 6e 67 20 70 74 | 79 20 75 6e 64 65 72 20 |using pt|y under |
|00002030| 74 65 6c 6e 65 74 2f 6c | 6f 67 69 6e 2f 77 68 61 |telnet/l|ogin/wha|
|00002040| 74 65 76 65 72 2c 20 77 | 68 69 63 68 20 64 6f 20 |tever, w|hich do |
|00002050| 74 68 65 69 72 20 6f 77 | 6e 20 2a 2f 0a 58 2f 2a |their ow|n */.X/*|
|00002060| 20 75 74 6d 70 20 61 6e | 64 20 77 74 6d 70 20 68 | utmp an|d wtmp h|
|00002070| 61 6e 64 6c 69 6e 67 2c | 20 74 68 65 6e 20 70 74 |andling,| then pt|
|00002080| 79 20 77 69 6c 6c 20 75 | 73 75 61 6c 6c 79 20 68 |y will u|sually h|
|00002090| 61 76 65 20 2d 78 55 57 | 2c 20 73 6f 20 74 68 65 |ave -xUW|, so the|
|000020a0| 73 65 20 2a 2f 0a 58 2f | 2a 20 64 65 66 69 6e 65 |se */.X/|* define|
|000020b0| 73 20 61 72 65 6e 27 74 | 20 74 6f 6f 20 69 6d 70 |s aren't| too imp|
|000020c0| 6f 72 74 61 6e 74 2e 20 | 45 78 63 65 70 74 20 66 |ortant. |Except f|
|000020d0| 6f 72 20 53 57 48 4f 53 | 54 2c 20 77 68 69 63 68 |or SWHOS|T, which|
|000020e0| 20 69 73 20 6e 65 63 65 | 73 73 61 72 79 20 2a 2f | is nece|ssary */|
|000020f0| 0a 58 2f 2a 20 66 6f 72 | 20 73 65 73 73 75 73 65 |.X/* for| sessuse|
|00002100| 72 27 73 20 61 63 74 69 | 6f 6e 20 74 6f 20 6d 61 |r's acti|on to ma|
|00002110| 6b 65 20 73 65 6e 73 65 | 2e 20 2a 2f 0a 58 0a 58 |ke sense|. */.X.X|
|00002120| 0a 58 2f 2a 20 53 65 63 | 74 69 6f 6e 20 34 3a 20 |.X/* Sec|tion 4: |
|00002130| 50 72 6f 74 65 63 74 69 | 6f 6e 2e 20 2a 2f 0a 58 |Protecti|on. */.X|
|00002140| 0a 58 23 69 66 6e 64 65 | 66 20 55 53 45 44 50 54 |.X#ifnde|f USEDPT|
|00002150| 59 4d 4f 44 45 0a 58 23 | 64 65 66 69 6e 65 20 55 |YMODE.X#|define U|
|00002160| 53 45 44 50 54 59 4d 4f | 44 45 20 30 36 30 30 0a |SEDPTYMO|DE 0600.|
|00002170| 58 23 65 6e 64 69 66 0a | 58 23 69 66 6e 64 65 66 |X#endif.|X#ifndef|
|00002180| 20 55 4e 55 53 45 44 50 | 54 59 4d 4f 44 45 0a 58 | UNUSEDP|TYMODE.X|
|00002190| 23 64 65 66 69 6e 65 20 | 55 4e 55 53 45 44 50 54 |#define |UNUSEDPT|
|000021a0| 59 4d 4f 44 45 20 30 36 | 30 30 0a 58 23 65 6e 64 |YMODE 06|00.X#end|
|000021b0| 69 66 0a 58 23 69 66 6e | 64 65 66 20 50 54 59 4f |if.X#ifn|def PTYO|
|000021c0| 57 4e 45 52 0a 58 23 64 | 65 66 69 6e 65 20 50 54 |WNER.X#d|efine PT|
|000021d0| 59 4f 57 4e 45 52 20 65 | 75 69 64 0a 58 23 65 6e |YOWNER e|uid.X#en|
|000021e0| 64 69 66 0a 58 23 69 66 | 6e 64 65 66 20 50 54 59 |dif.X#if|ndef PTY|
|000021f0| 47 52 4f 55 50 0a 58 23 | 64 65 66 69 6e 65 20 50 |GROUP.X#|define P|
|00002200| 54 59 47 52 4f 55 50 20 | 34 0a 58 23 65 6e 64 69 |TYGROUP |4.X#endi|
|00002210| 66 0a 58 0a 58 2f 2a 20 | 70 74 79 20 2d 78 63 20 |f.X.X/* |pty -xc |
|00002220| 77 69 6c 6c 20 63 68 61 | 6e 67 65 20 74 68 65 20 |will cha|nge the |
|00002230| 6f 77 6e 65 72 20 6f 66 | 20 74 68 65 20 70 74 79 |owner of| the pty|
|00002240| 20 62 61 63 6b 20 74 6f | 20 50 54 59 4f 57 4e 45 | back to| PTYOWNE|
|00002250| 52 20 61 66 74 65 72 20 | 74 68 65 20 2a 2f 0a 58 |R after |the */.X|
|00002260| 2f 2a 20 63 68 69 6c 64 | 20 68 61 73 20 65 78 69 |/* child| has exi|
|00002270| 74 65 64 2e 20 54 68 69 | 73 20 73 68 6f 75 6c 64 |ted. Thi|s should|
|00002280| 20 62 65 20 65 75 69 64 | 2c 20 66 6f 72 20 74 68 | be euid|, for th|
|00002290| 65 20 65 66 66 65 63 74 | 69 76 65 20 75 69 64 20 |e effect|ive uid |
|000022a0| 6f 66 20 74 68 65 20 2a | 2f 0a 58 2f 2a 20 70 74 |of the *|/.X/* pt|
|000022b0| 79 20 70 72 6f 63 65 73 | 73 2e 20 49 66 20 61 20 |y proces|s. If a |
|000022c0| 75 73 65 72 20 72 75 6e | 73 20 70 74 79 20 61 73 |user run|s pty as|
|000022d0| 20 68 69 6d 73 65 6c 66 | 2c 20 68 65 20 77 6f 6e | himself|, he won|
|000022e0| 27 74 20 67 65 74 20 74 | 6f 20 63 68 61 6e 67 65 |'t get t|o change|
|000022f0| 20 2a 2f 0a 58 2f 2a 20 | 74 68 65 20 6f 77 6e 65 | */.X/* |the owne|
|00002300| 72 20 6f 66 20 74 68 65 | 20 70 73 65 75 64 6f 2d |r of the| pseudo-|
|00002310| 74 65 72 6d 69 6e 61 6c | 20 69 6e 20 74 68 65 20 |terminal| in the |
|00002320| 66 69 72 73 74 20 70 6c | 61 63 65 2e 20 2a 2f 0a |first pl|ace. */.|
|00002330| 58 0a 58 2f 2a 20 50 54 | 59 47 52 4f 55 50 20 73 |X.X/* PT|YGROUP s|
|00002340| 68 6f 75 6c 64 20 62 65 | 20 74 68 65 20 60 60 74 |hould be| the ``t|
|00002350| 74 79 27 27 20 67 72 6f | 75 70 20 69 6e 20 2f 65 |ty'' gro|up in /e|
|00002360| 74 63 2f 67 72 6f 75 70 | 2c 20 6e 6f 72 6d 61 6c |tc/group|, normal|
|00002370| 6c 79 20 34 2e 20 41 6c | 6c 20 2a 2f 0a 58 2f 2a |ly 4. Al|l */.X/*|
|00002380| 20 70 74 79 73 20 61 6e | 64 20 74 74 79 73 20 73 | ptys an|d ttys s|
|00002390| 68 6f 75 6c 64 20 62 65 | 20 69 6e 20 74 68 69 73 |hould be| in this|
|000023a0| 20 67 72 6f 75 70 20 61 | 74 20 61 6c 6c 20 74 69 | group a|t all ti|
|000023b0| 6d 65 73 2e 20 2a 2f 0a | 58 0a 58 2f 2a 20 55 53 |mes. */.|X.X/* US|
|000023c0| 45 44 50 54 59 4d 4f 44 | 45 20 69 73 20 74 68 65 |EDPTYMOD|E is the|
|000023d0| 20 6d 6f 64 65 20 6f 66 | 20 70 74 79 73 20 77 68 | mode of| ptys wh|
|000023e0| 69 6c 65 20 74 68 65 79 | 27 72 65 20 62 65 69 6e |ile they|'re bein|
|000023f0| 67 20 75 73 65 64 2e 20 | 36 30 30 20 69 73 20 61 |g used. |600 is a|
|00002400| 20 2a 2f 0a 58 2f 2a 20 | 67 6f 6f 64 20 63 68 6f | */.X/* |good cho|
|00002410| 69 63 65 3b 20 69 74 20 | 6d 65 61 6e 73 20 6d 65 |ice; it |means me|
|00002420| 73 73 61 67 65 73 20 6f | 66 66 2e 20 49 66 20 79 |ssages o|ff. If y|
|00002430| 6f 75 20 77 61 6e 74 20 | 6d 73 67 73 20 79 20 62 |ou want |msgs y b|
|00002440| 79 20 64 65 66 61 75 6c | 74 2c 20 2a 2f 0a 58 2f |y defaul|t, */.X/|
|00002450| 2a 20 74 72 79 20 36 32 | 30 2e 20 44 6f 6e 27 74 |* try 62|0. Don't|
|00002460| 20 75 73 65 20 74 68 65 | 20 6f 6c 64 20 36 32 32 | use the| old 622|
|00002470| 3a 20 69 74 27 73 20 65 | 78 63 65 65 64 69 6e 67 |: it's e|xceeding|
|00002480| 6c 79 20 69 6e 73 65 63 | 75 72 65 2e 20 2a 2f 0a |ly insec|ure. */.|
|00002490| 58 0a 58 2f 2a 20 55 4e | 55 53 45 44 50 54 59 4d |X.X/* UN|USEDPTYM|
|000024a0| 4f 44 45 20 69 73 20 74 | 68 65 20 6d 6f 64 65 20 |ODE is t|he mode |
|000024b0| 6f 66 20 70 74 79 73 20 | 77 68 69 6c 65 20 74 68 |of ptys |while th|
|000024c0| 65 79 27 72 65 20 75 6e | 75 73 65 64 2e 20 54 72 |ey're un|used. Tr|
|000024d0| 61 64 69 74 69 6f 6e 61 | 6c 6c 79 20 2a 2f 0a 58 |aditiona|lly */.X|
|000024e0| 2f 2a 20 74 68 69 73 20 | 77 6f 75 6c 64 20 62 65 |/* this |would be|
|000024f0| 20 36 36 36 2c 20 73 6f | 20 74 68 61 74 20 61 6e | 666, so| that an|
|00002500| 79 20 70 72 6f 63 65 73 | 73 20 6e 65 65 64 69 6e |y proces|s needin|
|00002510| 67 20 61 20 70 74 79 20 | 63 61 6e 20 6a 75 73 74 |g a pty |can just|
|00002520| 20 67 72 61 62 20 2a 2f | 0a 58 2f 2a 20 6f 6e 65 | grab */|.X/* one|
|00002530| 2e 20 48 6f 77 65 76 65 | 72 2c 20 74 68 69 73 20 |. Howeve|r, this |
|00002540| 6c 65 61 64 73 20 74 6f | 20 71 75 69 74 65 20 61 |leads to| quite a|
|00002550| 20 66 65 77 20 73 65 63 | 75 72 69 74 79 20 68 6f | few sec|urity ho|
|00002560| 6c 65 73 2e 20 49 66 20 | 79 6f 75 20 68 61 76 65 |les. If |you have|
|00002570| 20 2a 2f 0a 58 2f 2a 20 | 6c 6f 74 73 20 6f 66 20 | */.X/* |lots of |
|00002580| 70 72 6f 67 72 61 6d 73 | 20 6c 69 6b 65 20 65 6d |programs| like em|
|00002590| 61 63 73 20 74 68 61 74 | 20 72 65 61 6c 6c 79 2c |acs that| really,|
|000025a0| 20 72 65 61 6c 6c 79 2c | 20 72 65 61 6c 6c 79 20 | really,| really |
|000025b0| 77 61 6e 74 20 74 6f 20 | 75 73 65 20 2a 2f 0a 58 |want to |use */.X|
|000025c0| 2f 2a 20 70 74 79 73 20 | 61 6e 64 20 64 6f 6e 27 |/* ptys |and don'|
|000025d0| 74 20 73 75 70 70 6f 72 | 74 20 74 68 69 73 20 69 |t suppor|t this i|
|000025e0| 6e 74 65 72 66 61 63 65 | 2c 20 74 72 79 20 30 36 |nterface|, try 06|
|000025f0| 36 30 2c 20 61 6e 64 20 | 6d 61 6b 65 20 74 68 6f |60, and |make tho|
|00002600| 73 65 20 2a 2f 0a 58 2f | 2a 20 70 72 6f 67 72 61 |se */.X/|* progra|
|00002610| 6d 73 20 73 65 74 67 69 | 64 20 74 74 79 2e 20 4f |ms setgi|d tty. O|
|00002620| 74 68 65 72 77 69 73 65 | 2c 20 73 74 69 63 6b 20 |therwise|, stick |
|00002630| 74 6f 20 30 36 30 30 2e | 20 2a 2f 0a 58 0a 58 0a |to 0600.| */.X.X.|
|00002640| 58 2f 2a 20 53 65 63 74 | 69 6f 6e 20 35 3a 20 4f |X/* Sect|ion 5: O|
|00002650| 74 68 65 72 2e 20 2a 2f | 0a 58 0a 58 23 69 66 6e |ther. */|.X.X#ifn|
|00002660| 64 65 66 20 53 49 47 52 | 45 54 5f 54 59 50 45 0a |def SIGR|ET_TYPE.|
|00002670| 58 23 64 65 66 69 6e 65 | 20 53 49 47 52 45 54 5f |X#define| SIGRET_|
|00002680| 54 59 50 45 20 69 6e 74 | 0a 58 23 65 6e 64 69 66 |TYPE int|.X#endif|
|00002690| 0a 58 0a 58 23 69 66 6e | 64 65 66 20 4f 55 54 42 |.X.X#ifn|def OUTB|
|000026a0| 55 46 53 49 5a 45 0a 58 | 23 64 65 66 69 6e 65 20 |UFSIZE.X|#define |
|000026b0| 4f 55 54 42 55 46 53 49 | 5a 45 20 31 36 33 38 34 |OUTBUFSI|ZE 16384|
|000026c0| 0a 58 23 65 6e 64 69 66 | 0a 58 0a 58 23 69 66 6e |.X#endif|.X.X#ifn|
|000026d0| 64 65 66 20 47 45 4e 45 | 52 49 43 0a 58 23 64 65 |def GENE|RIC.X#de|
|000026e0| 66 69 6e 65 20 47 45 4e | 45 52 49 43 20 63 68 61 |fine GEN|ERIC cha|
|000026f0| 72 0a 58 23 65 6e 64 69 | 66 0a 58 0a 58 23 69 66 |r.X#endi|f.X.X#if|
|00002700| 64 65 66 20 54 54 59 5f | 41 55 58 43 48 41 52 53 |def TTY_|AUXCHARS|
|00002710| 0a 58 23 64 65 66 69 6e | 65 20 55 53 45 53 54 41 |.X#defin|e USESTA|
|00002720| 54 0a 58 23 65 6e 64 69 | 66 0a 58 0a 58 2f 2a 20 |T.X#endi|f.X.X/* |
|00002730| 53 49 47 52 45 54 5f 54 | 59 50 45 20 69 73 20 74 |SIGRET_T|YPE is t|
|00002740| 68 65 20 74 79 70 65 20 | 72 65 74 75 72 6e 65 64 |he type |returned|
|00002750| 20 62 79 20 73 69 67 6e | 61 6c 20 68 61 6e 64 6c | by sign|al handl|
|00002760| 65 72 73 2e 20 4c 6f 67 | 69 63 61 6c 6c 79 2c 20 |ers. Log|ically, |
|00002770| 69 74 20 2a 2f 0a 58 2f | 2a 20 73 68 6f 75 6c 64 |it */.X/|* should|
|00002780| 20 62 65 20 76 6f 69 64 | 2c 20 62 75 74 20 43 20 | be void|, but C |
|00002790| 61 6e 64 20 73 69 67 6e | 61 6c 73 20 77 65 72 65 |and sign|als were|
|000027a0| 20 61 72 6f 75 6e 64 20 | 62 65 66 6f 72 65 20 76 | around |before v|
|000027b0| 6f 69 64 20 77 61 73 2e | 20 2a 2f 0a 58 0a 58 2f |oid was.| */.X.X/|
|000027c0| 2a 20 4f 55 54 42 55 46 | 53 49 5a 45 20 69 73 20 |* OUTBUF|SIZE is |
|000027d0| 74 68 65 20 73 69 7a 65 | 20 6f 66 20 74 68 65 20 |the size| of the |
|000027e0| 65 78 74 72 61 20 62 75 | 66 66 65 72 73 20 70 72 |extra bu|ffers pr|
|000027f0| 6f 76 69 64 65 64 20 62 | 79 20 70 74 79 2c 20 62 |ovided b|y pty, b|
|00002800| 6f 74 68 20 2a 2f 0a 58 | 2f 2a 20 66 6f 72 20 64 |oth */.X|/* for d|
|00002810| 61 74 61 20 63 6f 6d 69 | 6e 67 20 69 6e 20 74 6f |ata comi|ng in to|
|00002820| 20 74 68 65 20 70 73 65 | 75 64 6f 2d 74 65 72 6d | the pse|udo-term|
|00002830| 69 6e 61 6c 20 61 6e 64 | 20 66 6f 72 20 64 61 74 |inal and| for dat|
|00002840| 61 20 67 6f 69 6e 67 20 | 6f 75 74 2e 20 2a 2f 0a |a going |out. */.|
|00002850| 58 0a 58 2f 2a 20 49 74 | 20 73 68 6f 75 6c 64 20 |X.X/* It| should |
|00002860| 62 65 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 63 |be possi|ble to c|
|00002870| 61 73 74 20 61 6e 79 20 | 70 6f 69 6e 74 65 72 20 |ast any |pointer |
|00002880| 74 6f 20 61 20 47 45 4e | 45 52 49 43 20 2a 20 70 |to a GEN|ERIC * p|
|00002890| 6f 69 6e 74 65 72 20 2a | 2f 0a 58 2f 2a 20 61 6e |ointer *|/.X/* an|
|000028a0| 64 20 62 61 63 6b 2e 20 | 41 67 61 69 6e 2c 20 76 |d back. |Again, v|
|000028b0| 6f 69 64 20 6d 61 6b 65 | 73 20 74 68 65 20 6d 6f |oid make|s the mo|
|000028c0| 73 74 20 73 65 6e 73 65 | 20 61 6e 64 20 69 73 20 |st sense| and is |
|000028d0| 74 68 65 20 62 65 73 74 | 20 63 68 6f 69 63 65 20 |the best| choice |
|000028e0| 2a 2f 0a 58 2f 2a 20 75 | 6e 64 65 72 20 41 4e 53 |*/.X/* u|nder ANS|
|000028f0| 49 2c 20 62 75 74 20 63 | 68 61 72 20 69 73 20 63 |I, but c|har is c|
|00002900| 6f 72 72 65 63 74 20 61 | 6e 64 20 6d 75 63 68 20 |orrect a|nd much |
|00002910| 6d 6f 72 65 20 70 6f 72 | 74 61 62 6c 65 2e 20 2a |more por|table. *|
|00002920| 2f 0a 58 0a 58 2f 2a 20 | 53 65 74 74 69 6e 67 20 |/.X.X/* |Setting |
|00002930| 55 53 45 53 54 41 54 20 | 69 73 20 6e 65 63 65 73 |USESTAT |is neces|
|00002940| 73 61 72 79 20 66 6f 72 | 20 73 79 73 74 65 6d 73 |sary for| systems|
|00002950| 20 73 75 70 70 6f 72 74 | 69 6e 67 20 61 75 78 63 | support|ing auxc|
|00002960| 68 61 72 73 2e 20 2a 2f | 0a 58 0a 58 0a 58 2f 2a |hars. */|.X.X.X/*|
|00002970| 20 53 65 63 74 69 6f 6e | 20 36 3a 20 53 61 6e 69 | Section| 6: Sani|
|00002980| 74 79 20 63 68 65 63 6b | 73 2e 20 2a 2f 0a 58 0a |ty check|s. */.X.|
|00002990| 58 23 69 66 64 65 66 20 | 4e 4f 5f 55 4e 49 58 53 |X#ifdef |NO_UNIXS|
|000029a0| 4f 43 4b 53 0a 58 23 64 | 65 66 69 6e 65 20 4e 4f |OCKS.X#d|efine NO|
|000029b0| 5f 46 44 50 41 53 53 49 | 4e 47 0a 58 23 64 65 66 |_FDPASSI|NG.X#def|
|000029c0| 69 6e 65 20 4e 4f 5f 53 | 45 53 53 49 4f 4e 0a 58 |ine NO_S|ESSION.X|
|000029d0| 23 65 6e 64 69 66 0a 58 | 0a 58 23 69 66 64 65 66 |#endif.X|.X#ifdef|
|000029e0| 20 4e 4f 5f 53 45 53 53 | 49 4f 4e 0a 58 23 69 66 | NO_SESS|ION.X#if|
|000029f0| 64 65 66 20 4d 55 53 54 | 5f 53 45 53 53 49 4f 4e |def MUST|_SESSION|
|00002a00| 0a 58 23 75 6e 64 65 66 | 20 4d 55 53 54 5f 53 45 |.X#undef| MUST_SE|
|00002a10| 53 53 49 4f 4e 0a 58 23 | 65 6e 64 69 66 0a 58 23 |SSION.X#|endif.X#|
|00002a20| 65 6e 64 69 66 0a 58 0a | 58 23 69 66 64 65 66 20 |endif.X.|X#ifdef |
|00002a30| 4e 4f 5f 55 54 4d 50 0a | 58 23 69 66 64 65 66 20 |NO_UTMP.|X#ifdef |
|00002a40| 4d 55 53 54 5f 55 54 4d | 50 0a 58 23 75 6e 64 65 |MUST_UTM|P.X#unde|
|00002a50| 66 20 4d 55 53 54 5f 55 | 54 4d 50 0a 58 23 65 6e |f MUST_U|TMP.X#en|
|00002a60| 64 69 66 0a 58 23 65 6e | 64 69 66 0a 58 0a 58 23 |dif.X#en|dif.X.X#|
|00002a70| 69 66 64 65 66 20 4e 4f | 5f 57 54 4d 50 0a 58 23 |ifdef NO|_WTMP.X#|
|00002a80| 69 66 64 65 66 20 4d 55 | 53 54 5f 57 54 4d 50 0a |ifdef MU|ST_WTMP.|
|00002a90| 58 23 75 6e 64 65 66 20 | 4d 55 53 54 5f 57 54 4d |X#undef |MUST_WTM|
|00002aa0| 50 0a 58 23 65 6e 64 69 | 66 0a 58 23 65 6e 64 69 |P.X#endi|f.X#endi|
|00002ab0| 66 0a 58 0a 58 23 69 66 | 64 65 66 20 4e 4f 5f 43 |f.X.X#if|def NO_C|
|00002ac0| 48 4f 57 4e 0a 58 23 69 | 66 64 65 66 20 4d 55 53 |HOWN.X#i|fdef MUS|
|00002ad0| 54 5f 43 48 4f 57 4e 0a | 58 23 75 6e 64 65 66 20 |T_CHOWN.|X#undef |
|00002ae0| 4d 55 53 54 5f 43 48 4f | 57 4e 0a 58 23 65 6e 64 |MUST_CHO|WN.X#end|
|00002af0| 69 66 0a 58 23 65 6e 64 | 69 66 0a 58 0a 58 23 65 |if.X#end|if.X.X#e|
|00002b00| 6e 64 69 66 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |ndif.END|_OF_FILE|
|00002b10| 0a 20 20 69 66 20 74 65 | 73 74 20 39 36 31 30 20 |. if te|st 9610 |
|00002b20| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 63 6f 6e |-ne `wc |-c <'con|
|00002b30| 66 69 67 2e 68 27 60 3b | 20 74 68 65 6e 0a 20 20 |fig.h'`;| then. |
|00002b40| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00002b50| 63 6f 6e 66 69 67 2e 68 | 27 5c 22 20 75 6e 70 61 |config.h|'\" unpa|
|00002b60| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00002b70| 73 69 7a 65 21 0a 20 20 | 66 69 0a 20 20 23 20 65 |size!. |fi. # e|
|00002b80| 6e 64 20 6f 66 20 27 63 | 6f 6e 66 69 67 2e 68 27 |nd of 'c|onfig.h'|
|00002b90| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00002ba0| 6c 6f 67 73 2e 63 27 20 | 2d 61 20 22 24 7b 31 7d |logs.c' |-a "${1}|
|00002bb0| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00002bc0| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00002bd0| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00002be0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00002bf0| 27 6c 6f 67 73 2e 63 27 | 5c 22 0a 65 6c 73 65 0a |'logs.c'|\".else.|
|00002c00| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 | echo s|har: Ext|
|00002c10| 72 61 63 74 69 6e 67 20 | 5c 22 27 6c 6f 67 73 2e |racting |\"'logs.|
|00002c20| 63 27 5c 22 20 5c 28 31 | 38 35 33 20 63 68 61 72 |c'\" \(1|853 char|
|00002c30| 61 63 74 65 72 73 5c 29 | 0a 20 20 73 65 64 20 22 |acters\)|. sed "|
|00002c40| 73 2f 5e 58 2f 2f 22 20 | 3e 27 6c 6f 67 73 2e 63 |s/^X//" |>'logs.c|
|00002c50| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|00002c60| 27 0a 58 2f 2a 20 43 6f | 70 79 72 69 67 68 74 20 |'.X/* Co|pyright |
|00002c70| 31 39 39 30 2c 20 44 61 | 6e 69 65 6c 20 4a 2e 20 |1990, Da|niel J. |
|00002c80| 42 65 72 6e 73 74 65 69 | 6e 2e 20 41 6c 6c 20 72 |Bernstei|n. All r|
|00002c90| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 20 |ights re|served. |
|00002ca0| 2a 2f 0a 58 0a 58 23 69 | 6e 63 6c 75 64 65 20 22 |*/.X.X#i|nclude "|
|00002cb0| 63 6f 6e 66 69 67 2e 68 | 22 0a 58 23 69 6e 63 6c |config.h|".X#incl|
|00002cc0| 75 64 65 20 22 6c 6f 67 | 73 2e 68 22 0a 58 23 69 |ude "log|s.h".X#i|
|00002cd0| 6e 63 6c 75 64 65 20 22 | 66 69 6c 65 2e 68 22 0a |nclude "|file.h".|
|00002ce0| 58 23 69 6e 63 6c 75 64 | 65 20 3c 75 74 6d 70 2e |X#includ|e <utmp.|
|00002cf0| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |h>.X#inc|lude <st|
|00002d00| 72 69 6e 67 73 2e 68 3e | 0a 58 0a 58 2f 2a 20 75 |rings.h>|.X.X/* u|
|00002d10| 74 6d 70 20 61 6e 64 20 | 77 74 6d 70 20 61 72 65 |tmp and |wtmp are|
|00002d20| 20 61 62 6f 75 74 20 61 | 73 20 73 65 6e 73 69 62 | about a|s sensib|
|00002d30| 6c 65 20 61 73 20 2f 65 | 74 63 2f 70 61 73 73 77 |le as /e|tc/passw|
|00002d40| 64 2e 20 2a 2f 0a 58 0a | 58 2f 2a 20 57 65 20 6e |d. */.X.|X/* We n|
|00002d50| 65 76 65 72 20 62 6f 74 | 68 65 72 20 74 6f 20 73 |ever bot|her to s|
|00002d60| 68 72 69 6e 6b 20 2f 65 | 74 63 2f 75 74 6d 70 2e |hrink /e|tc/utmp.|
|00002d70| 20 2a 2f 0a 58 0a 58 65 | 78 74 65 72 6e 20 6c 6f | */.X.Xe|xtern lo|
|00002d80| 6e 67 20 74 69 6d 65 28 | 29 3b 0a 58 0a 58 6c 6f |ng time(|);.X.Xlo|
|00002d90| 6e 67 20 6e 6f 77 28 29 | 0a 58 7b 0a 58 20 72 65 |ng now()|.X{.X re|
|00002da0| 74 75 72 6e 20 74 69 6d | 65 28 28 6c 6f 6e 67 20 |turn tim|e((long |
|00002db0| 2a 29 20 30 29 3b 0a 58 | 7d 0a 58 0a 58 69 6e 74 |*) 0);.X|}.X.Xint|
|00002dc0| 20 75 74 6d 70 28 6c 69 | 6e 65 2c 6e 61 6d 65 2c | utmp(li|ne,name,|
|00002dd0| 68 6f 73 74 2c 64 61 74 | 65 29 0a 58 63 68 61 72 |host,dat|e).Xchar|
|00002de0| 20 2a 6c 69 6e 65 3b 0a | 58 63 68 61 72 20 2a 6e | *line;.|Xchar *n|
|00002df0| 61 6d 65 3b 0a 58 63 68 | 61 72 20 2a 68 6f 73 74 |ame;.Xch|ar *host|
|00002e00| 3b 0a 58 6c 6f 6e 67 20 | 64 61 74 65 3b 0a 58 7b |;.Xlong |date;.X{|
|00002e10| 0a 58 20 73 74 72 75 63 | 74 20 75 74 6d 70 20 75 |.X struc|t utmp u|
|00002e20| 74 3b 0a 58 20 73 74 72 | 75 63 74 20 75 74 6d 70 |t;.X str|uct utmp|
|00002e30| 20 78 74 3b 0a 58 20 69 | 6e 74 20 66 64 3b 0a 58 | xt;.X i|nt fd;.X|
|00002e40| 20 69 6e 74 20 69 3b 0a | 58 20 69 6e 74 20 6a 3b | int i;.|X int j;|
|00002e50| 0a 58 0a 58 20 2f 2a 20 | 6f 6e 6c 79 20 75 73 65 |.X.X /* |only use|
|00002e60| 20 6f 66 20 73 74 72 6e | 63 70 79 2c 20 65 76 65 | of strn|cpy, eve|
|00002e70| 72 20 2a 2f 0a 58 20 28 | 76 6f 69 64 29 20 73 74 |r */.X (|void) st|
|00002e80| 72 6e 63 70 79 28 75 74 | 2e 75 74 5f 6c 69 6e 65 |rncpy(ut|.ut_line|
|00002e90| 2c 6c 69 6e 65 2c 73 69 | 7a 65 6f 66 28 75 74 2e |,line,si|zeof(ut.|
|00002ea0| 75 74 5f 6c 69 6e 65 29 | 29 3b 0a 58 20 28 76 6f |ut_line)|);.X (vo|
|00002eb0| 69 64 29 20 73 74 72 6e | 63 70 79 28 75 74 2e 75 |id) strn|cpy(ut.u|
|00002ec0| 74 5f 6e 61 6d 65 2c 6e | 61 6d 65 2c 73 69 7a 65 |t_name,n|ame,size|
|00002ed0| 6f 66 28 75 74 2e 75 74 | 5f 6e 61 6d 65 29 29 3b |of(ut.ut|_name));|
|00002ee0| 0a 58 20 28 76 6f 69 64 | 29 20 73 74 72 6e 63 70 |.X (void|) strncp|
|00002ef0| 79 28 75 74 2e 75 74 5f | 68 6f 73 74 2c 68 6f 73 |y(ut.ut_|host,hos|
|00002f00| 74 2c 73 69 7a 65 6f 66 | 28 75 74 2e 75 74 5f 68 |t,sizeof|(ut.ut_h|
|00002f10| 6f 73 74 29 29 3b 0a 58 | 20 75 74 2e 75 74 5f 74 |ost));.X| ut.ut_t|
|00002f20| 69 6d 65 20 3d 20 64 61 | 74 65 3b 0a 58 0a 58 20 |ime = da|te;.X.X |
|00002f30| 66 64 20 3d 20 6f 70 65 | 6e 28 50 54 59 55 54 4d |fd = ope|n(PTYUTM|
|00002f40| 50 5f 46 49 4c 45 2c 4f | 5f 52 44 57 52 29 3b 0a |P_FILE,O|_RDWR);.|
|00002f50| 58 20 69 66 20 28 66 64 | 20 3d 3d 20 2d 31 29 0a |X if (fd| == -1).|
|00002f60| 58 20 20 20 72 65 74 75 | 72 6e 20 2d 31 3b 0a 58 |X retu|rn -1;.X|
|00002f70| 20 6a 20 3d 20 69 20 3d | 20 30 3b 0a 58 20 77 68 | j = i =| 0;.X wh|
|00002f80| 69 6c 65 20 28 72 65 61 | 64 28 66 64 2c 28 63 68 |ile (rea|d(fd,(ch|
|00002f90| 61 72 20 2a 29 20 26 78 | 74 2c 73 69 7a 65 6f 66 |ar *) &x|t,sizeof|
|00002fa0| 28 78 74 29 29 20 3d 3d | 20 73 69 7a 65 6f 66 28 |(xt)) ==| sizeof(|
|00002fb0| 78 74 29 29 0a 58 20 20 | 7b 0a 58 20 20 20 69 2b |xt)).X |{.X i+|
|00002fc0| 2b 3b 0a 58 20 20 20 69 | 66 20 28 73 74 72 6e 63 |+;.X i|f (strnc|
|00002fd0| 6d 70 28 78 74 2e 75 74 | 5f 6c 69 6e 65 2c 75 74 |mp(xt.ut|_line,ut|
|00002fe0| 2e 75 74 5f 6c 69 6e 65 | 2c 73 69 7a 65 6f 66 28 |.ut_line|,sizeof(|
|00002ff0| 75 74 2e 75 74 5f 6c 69 | 6e 65 29 29 20 3d 3d 20 |ut.ut_li|ne)) == |
|00003000| 30 29 0a 58 20 20 20 20 | 7b 0a 58 20 20 20 20 20 |0).X |{.X |
|00003010| 6a 20 3d 20 69 3b 0a 58 | 20 20 20 20 20 62 72 65 |j = i;.X| bre|
|00003020| 61 6b 3b 0a 58 20 20 20 | 20 7d 0a 58 20 20 7d 0a |ak;.X | }.X }.|
|00003030| 58 20 69 66 20 28 6a 29 | 0a 58 20 20 7b 0a 58 20 |X if (j)|.X {.X |
|00003040| 20 20 69 66 20 28 6c 73 | 65 65 6b 28 66 64 2c 28 | if (ls|eek(fd,(|
|00003050| 6c 6f 6e 67 29 20 28 28 | 6a 20 2d 20 31 29 20 2a |long) ((|j - 1) *|
|00003060| 20 73 69 7a 65 6f 66 28 | 78 74 29 29 2c 4c 5f 53 | sizeof(|xt)),L_S|
|00003070| 45 54 29 20 3d 3d 20 2d | 31 29 0a 58 20 20 20 20 |ET) == -|1).X |
|00003080| 7b 0a 58 20 20 20 20 20 | 28 76 6f 69 64 29 20 63 |{.X |(void) c|
|00003090| 6c 6f 73 65 28 66 64 29 | 3b 0a 58 20 20 20 20 20 |lose(fd)|;.X |
|000030a0| 72 65 74 75 72 6e 20 2d | 31 3b 0a 58 20 20 20 20 |return -|1;.X |
|000030b0| 7d 0a 58 20 20 7d 0a 58 | 20 65 6c 73 65 0a 58 20 |}.X }.X| else.X |
|000030c0| 20 7b 0a 58 20 20 20 2f | 2a 20 57 65 20 68 61 76 | {.X /|* We hav|
|000030d0| 65 20 74 6f 20 72 65 6f | 70 65 6e 20 74 6f 20 61 |e to reo|pen to a|
|000030e0| 76 6f 69 64 20 61 20 72 | 61 63 65 20 77 69 74 68 |void a r|ace with|
|000030f0| 20 6f 74 68 65 72 20 65 | 6e 64 2d 6f 66 2d 75 74 | other e|nd-of-ut|
|00003100| 6d 70 20 65 6e 74 72 69 | 65 73 2e 20 2a 2f 0a 58 |mp entri|es. */.X|
|00003110| 20 20 20 28 76 6f 69 64 | 29 20 63 6c 6f 73 65 28 | (void|) close(|
|00003120| 66 64 29 3b 0a 58 20 20 | 20 69 66 20 28 28 66 64 |fd);.X | if ((fd|
|00003130| 20 3d 20 6f 70 65 6e 28 | 50 54 59 55 54 4d 50 5f | = open(|PTYUTMP_|
|00003140| 46 49 4c 45 2c 4f 5f 52 | 44 57 52 20 7c 20 4f 5f |FILE,O_R|DWR | O_|
|00003150| 41 50 50 45 4e 44 29 29 | 20 3d 3d 20 2d 31 29 0a |APPEND))| == -1).|
|00003160| 58 20 20 20 20 20 72 65 | 74 75 72 6e 20 2d 31 3b |X re|turn -1;|
|00003170| 0a 58 20 20 7d 0a 58 20 | 69 66 20 28 77 72 69 74 |.X }.X |if (writ|
|00003180| 65 28 66 64 2c 28 63 68 | 61 72 20 2a 29 20 26 75 |e(fd,(ch|ar *) &u|
|00003190| 74 2c 73 69 7a 65 6f 66 | 28 75 74 29 29 20 3c 20 |t,sizeof|(ut)) < |
|000031a0| 73 69 7a 65 6f 66 28 75 | 74 29 29 0a 58 20 20 7b |sizeof(u|t)).X {|
|000031b0| 0a 58 20 20 20 28 76 6f | 69 64 29 20 63 6c 6f 73 |.X (vo|id) clos|
|000031c0| 65 28 66 64 29 3b 0a 58 | 20 20 20 72 65 74 75 72 |e(fd);.X| retur|
|000031d0| 6e 20 2d 31 3b 0a 58 20 | 20 7d 0a 58 20 28 76 6f |n -1;.X | }.X (vo|
|000031e0| 69 64 29 20 63 6c 6f 73 | 65 28 66 64 29 3b 0a 58 |id) clos|e(fd);.X|
|000031f0| 20 72 65 74 75 72 6e 20 | 30 3b 0a 58 7d 0a 58 0a | return |0;.X}.X.|
|00003200| 58 69 6e 74 20 77 74 6d | 70 28 6c 69 6e 65 2c 6e |Xint wtm|p(line,n|
|00003210| 61 6d 65 2c 68 6f 73 74 | 2c 64 61 74 65 29 0a 58 |ame,host|,date).X|
|00003220| 63 68 61 72 20 2a 6c 69 | 6e 65 3b 0a 58 63 68 61 |char *li|ne;.Xcha|
|00003230| 72 20 2a 6e 61 6d 65 3b | 0a 58 63 68 61 72 20 2a |r *name;|.Xchar *|
|00003240| 68 6f 73 74 3b 0a 58 6c | 6f 6e 67 20 64 61 74 65 |host;.Xl|ong date|
|00003250| 3b 0a 58 7b 0a 58 20 73 | 74 72 75 63 74 20 75 74 |;.X{.X s|truct ut|
|00003260| 6d 70 20 77 74 3b 0a 58 | 20 69 6e 74 20 66 64 3b |mp wt;.X| int fd;|
|00003270| 0a 58 0a 58 20 28 76 6f | 69 64 29 20 73 74 72 6e |.X.X (vo|id) strn|
|00003280| 63 70 79 28 77 74 2e 75 | 74 5f 6c 69 6e 65 2c 6c |cpy(wt.u|t_line,l|
|00003290| 69 6e 65 2c 73 69 7a 65 | 6f 66 28 77 74 2e 75 74 |ine,size|of(wt.ut|
|000032a0| 5f 6c 69 6e 65 29 29 3b | 0a 58 20 28 76 6f 69 64 |_line));|.X (void|
|000032b0| 29 20 73 74 72 6e 63 70 | 79 28 77 74 2e 75 74 5f |) strncp|y(wt.ut_|
|000032c0| 6e 61 6d 65 2c 6e 61 6d | 65 2c 73 69 7a 65 6f 66 |name,nam|e,sizeof|
|000032d0| 28 77 74 2e 75 74 5f 6e | 61 6d 65 29 29 3b 0a 58 |(wt.ut_n|ame));.X|
|000032e0| 20 28 76 6f 69 64 29 20 | 73 74 72 6e 63 70 79 28 | (void) |strncpy(|
|000032f0| 77 74 2e 75 74 5f 68 6f | 73 74 2c 68 6f 73 74 2c |wt.ut_ho|st,host,|
|00003300| 73 69 7a 65 6f 66 28 77 | 74 2e 75 74 5f 68 6f 73 |sizeof(w|t.ut_hos|
|00003310| 74 29 29 3b 0a 58 20 77 | 74 2e 75 74 5f 74 69 6d |t));.X w|t.ut_tim|
|00003320| 65 20 3d 20 64 61 74 65 | 3b 0a 58 0a 58 20 66 64 |e = date|;.X.X fd|
|00003330| 20 3d 20 6f 70 65 6e 28 | 50 54 59 57 54 4d 50 5f | = open(|PTYWTMP_|
|00003340| 46 49 4c 45 2c 4f 5f 57 | 52 4f 4e 4c 59 20 7c 20 |FILE,O_W|RONLY | |
|00003350| 4f 5f 41 50 50 45 4e 44 | 29 3b 0a 58 20 69 66 20 |O_APPEND|);.X if |
|00003360| 28 66 64 20 3d 3d 20 2d | 31 29 0a 58 20 20 20 72 |(fd == -|1).X r|
|00003370| 65 74 75 72 6e 20 2d 31 | 3b 0a 58 20 69 66 20 28 |eturn -1|;.X if (|
|00003380| 77 72 69 74 65 28 66 64 | 2c 28 63 68 61 72 20 2a |write(fd|,(char *|
|00003390| 29 20 26 77 74 2c 73 69 | 7a 65 6f 66 28 77 74 29 |) &wt,si|zeof(wt)|
|000033a0| 29 20 3c 20 73 69 7a 65 | 6f 66 28 77 74 29 29 0a |) < size|of(wt)).|
|000033b0| 58 20 20 7b 0a 58 20 20 | 20 28 76 6f 69 64 29 20 |X {.X | (void) |
|000033c0| 63 6c 6f 73 65 28 66 64 | 29 3b 0a 58 20 20 20 72 |close(fd|);.X r|
|000033d0| 65 74 75 72 6e 20 2d 31 | 3b 0a 58 20 20 7d 0a 58 |eturn -1|;.X }.X|
|000033e0| 20 28 76 6f 69 64 29 20 | 63 6c 6f 73 65 28 66 64 | (void) |close(fd|
|000033f0| 29 3b 0a 58 20 72 65 74 | 75 72 6e 20 30 3b 0a 58 |);.X ret|urn 0;.X|
|00003400| 7d 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 20 20 |}.END_OF|_FILE. |
|00003410| 69 66 20 74 65 73 74 20 | 31 38 35 33 20 2d 6e 65 |if test |1853 -ne|
|00003420| 20 60 77 63 20 2d 63 20 | 3c 27 6c 6f 67 73 2e 63 | `wc -c |<'logs.c|
|00003430| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00003440| 6f 20 73 68 61 72 3a 20 | 5c 22 27 6c 6f 67 73 2e |o shar: |\"'logs.|
|00003450| 63 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |c'\" unp|acked wi|
|00003460| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 20 |th wrong| size!. |
|00003470| 20 66 69 0a 20 20 23 20 | 65 6e 64 20 6f 66 20 27 | fi. # |end of '|
|00003480| 6c 6f 67 73 2e 63 27 0a | 66 69 0a 69 66 20 74 65 |logs.c'.|fi.if te|
|00003490| 73 74 20 2d 66 20 27 70 | 74 79 2e 31 27 20 2d 61 |st -f 'p|ty.1' -a|
|000034a0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|000034b0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|000034c0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|000034d0| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|000034e0| 69 6c 65 20 5c 22 27 70 | 74 79 2e 31 27 5c 22 0a |ile \"'p|ty.1'\".|
|000034f0| 65 6c 73 65 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |else. e|cho shar|
|00003500| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00003510| 70 74 79 2e 31 27 5c 22 | 20 5c 28 31 32 30 34 39 |pty.1'\"| \(12049|
|00003520| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 20 20 | charact|ers\). |
|00003530| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 70 |sed "s/^|X//" >'p|
|00003540| 74 79 2e 31 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |ty.1' <<|'END_OF_|
|00003550| 46 49 4c 45 27 0a 58 2e | 54 48 20 70 74 79 20 31 |FILE'.X.|TH pty 1|
|00003560| 0a 58 2e 53 48 20 4e 41 | 4d 45 0a 58 70 74 79 20 |.X.SH NA|ME.Xpty |
|00003570| 5c 2d 20 72 75 6e 20 61 | 20 70 72 6f 67 72 61 6d |\- run a| program|
|00003580| 20 75 6e 64 65 72 20 61 | 20 70 73 65 75 64 6f 2d | under a| pseudo-|
|00003590| 74 65 72 6d 69 6e 61 6c | 20 73 65 73 73 69 6f 6e |terminal| session|
|000035a0| 0a 58 2e 53 48 20 53 59 | 4e 54 41 58 0a 58 70 74 |.X.SH SY|NTAX.Xpt|
|000035b0| 79 0a 58 5b 0a 58 5c 66 | 42 5c 2d 71 51 76 64 44 |y.X[.X\f|B\-qQvdD|
|000035c0| 65 33 45 6a 4a 73 53 74 | 54 30 5c 66 49 0a 58 5d |e3EjJsSt|T0\fI.X]|
|000035d0| 20 5b 0a 58 5c 66 42 5c | 2d 46 5c 66 49 0a 58 5d | [.X\fB\|-F\fI.X]|
|000035e0| 20 5b 0a 58 5c 66 42 5c | 2d 66 5c 66 49 6e 0a 58 | [.X\fB\|-f\fIn.X|
|000035f0| 5d 20 5b 0a 58 5c 66 42 | 5c 2d 70 5c 66 49 5b 63 |] [.X\fB|\-p\fI[c|
|00003600| 43 64 44 65 45 6e 4e 72 | 52 73 53 30 5d 0a 58 5d |CdDeEnNr|RsS0].X]|
|00003610| 20 5b 0a 58 5c 66 42 5c | 2d 78 5c 66 49 5b 63 43 | [.X\fB\|-x\fI[cC|
|00003620| 65 45 6e 4e 6f 4f 72 52 | 73 53 75 55 77 57 78 58 |eEnNoOrR|sSuUwWxX|
|00003630| 5d 0a 58 5d 20 5b 0a 58 | 5c 66 42 5c 2d 41 43 48 |].X] [.X|\fB\-ACH|
|00003640| 55 56 57 5c 66 49 0a 58 | 5d 0a 58 70 72 6f 67 72 |UVW\fI.X|].Xprogr|
|00003650| 61 6d 0a 58 5b 0a 58 61 | 72 67 20 2e 2e 2e 0a 58 |am.X[.Xa|rg ....X|
|00003660| 5d 0a 58 2e 53 48 20 44 | 45 53 43 52 49 50 54 49 |].X.SH D|ESCRIPTI|
|00003670| 4f 4e 0a 58 2e 49 20 70 | 74 79 0a 58 64 65 74 61 |ON.X.I p|ty.Xdeta|
|00003680| 63 68 65 73 20 69 74 73 | 65 6c 66 20 66 72 6f 6d |ches its|elf from|
|00003690| 20 69 74 73 20 6f 72 69 | 67 69 6e 61 6c 0a 58 74 | its ori|ginal.Xt|
|000036a0| 65 72 6d 69 6e 61 6c 2c | 0a 58 61 6c 6c 6f 63 61 |erminal,|.Xalloca|
|000036b0| 74 65 73 20 61 20 70 73 | 65 75 64 6f 2d 74 65 72 |tes a ps|eudo-ter|
|000036c0| 6d 69 6e 61 6c 2c 0a 58 | 61 6e 64 20 72 75 6e 73 |minal,.X|and runs|
|000036d0| 0a 58 2e 49 20 70 72 6f | 67 72 61 6d 0a 58 6f 6e |.X.I pro|gram.Xon|
|000036e0| 20 74 68 61 74 20 70 73 | 65 75 64 6f 2d 74 65 72 | that ps|eudo-ter|
|000036f0| 6d 69 6e 61 6c 0a 58 77 | 69 74 68 20 61 6e 79 20 |minal.Xw|ith any |
|00003700| 67 69 76 65 6e 20 61 72 | 67 75 6d 65 6e 74 73 2e |given ar|guments.|
|00003710| 0a 58 2e 49 20 70 74 79 | 0a 58 6c 65 74 73 20 79 |.X.I pty|.Xlets y|
|00003720| 6f 75 20 65 61 73 69 6c | 79 20 64 69 73 63 6f 6e |ou easil|y discon|
|00003730| 6e 65 63 74 20 66 72 6f | 6d 20 61 6e 64 20 72 65 |nect fro|m and re|
|00003740| 63 6f 6e 6e 65 63 74 20 | 74 6f 0a 58 73 65 73 73 |connect |to.Xsess|
|00003750| 69 6f 6e 73 3b 0a 58 69 | 74 20 68 61 73 20 6f 76 |ions;.Xi|t has ov|
|00003760| 65 72 20 66 69 66 74 79 | 20 6f 70 74 69 6f 6e 73 |er fifty| options|
|00003770| 20 66 6f 72 20 70 72 65 | 63 69 73 65 20 63 6f 6e | for pre|cise con|
|00003780| 74 72 6f 6c 2c 0a 58 61 | 6e 64 20 69 73 20 6d 65 |trol,.Xa|nd is me|
|00003790| 61 6e 74 20 74 6f 20 61 | 63 74 20 61 73 20 74 68 |ant to a|ct as th|
|000037a0| 65 20 73 6f 6c 65 20 69 | 6e 74 65 72 66 61 63 65 |e sole i|nterface|
|000037b0| 0a 58 62 65 74 77 65 65 | 6e 20 70 73 65 75 64 6f |.Xbetwee|n pseudo|
|000037c0| 2d 74 65 72 6d 69 6e 61 | 6c 73 20 61 6e 64 20 74 |-termina|ls and t|
|000037d0| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 65 20 73 |he rest |of the s|
|000037e0| 79 73 74 65 6d 2e 0a 58 | 2e 50 50 0a 58 54 68 65 |ystem..X|.PP.XThe|
|000037f0| 72 65 20 61 72 65 20 61 | 20 66 65 77 20 76 65 72 |re are a| few ver|
|00003800| 79 20 63 6f 6d 6d 6f 6e | 20 69 6e 76 6f 63 61 74 |y common| invocat|
|00003810| 69 6f 6e 73 20 6f 66 0a | 58 2e 49 20 70 74 79 2e |ions of.|X.I pty.|
|00003820| 0a 58 54 68 65 20 6d 6f | 73 74 20 63 6f 6d 6d 6f |.XThe mo|st commo|
|00003830| 6e 20 69 73 20 6a 75 73 | 74 0a 58 2e 49 20 70 74 |n is jus|t.X.I pt|
|00003840| 79 20 70 72 6f 67 72 61 | 6d 2c 0a 58 77 69 74 68 |y progra|m,.Xwith|
|00003850| 20 6e 6f 20 6f 70 74 69 | 6f 6e 73 3b 0a 58 74 68 | no opti|ons;.Xth|
|00003860| 69 73 20 68 61 73 20 73 | 65 76 65 72 61 6c 20 65 |is has s|everal e|
|00003870| 66 66 65 63 74 73 20 61 | 73 20 64 65 73 63 72 69 |ffects a|s descri|
|00003880| 62 65 64 20 62 65 6c 6f | 77 2e 0a 58 2e 49 20 70 |bed belo|w..X.I p|
|00003890| 74 79 20 5c 2d 73 20 70 | 72 6f 67 72 61 6d 0a 58 |ty \-s p|rogram.X|
|000038a0| 73 65 74 73 20 75 70 20 | 61 20 64 69 73 63 6f 6e |sets up |a discon|
|000038b0| 6e 65 63 74 61 62 6c 65 | 20 73 65 73 73 69 6f 6e |nectable| session|
|000038c0| 3b 0a 58 69 74 20 69 73 | 20 64 65 73 63 72 69 62 |;.Xit is| describ|
|000038d0| 65 64 20 66 75 72 74 68 | 65 72 20 69 6e 0a 58 2e |ed furth|er in.X.|
|000038e0| 49 20 73 65 73 73 28 31 | 29 2e 0a 58 2e 49 20 70 |I sess(1|)..X.I p|
|000038f0| 74 79 20 5c 2d 30 20 70 | 72 6f 67 72 61 6d 0a 58 |ty \-0 p|rogram.X|
|00003900| 69 73 6f 6c 61 74 65 73 | 20 74 68 65 20 72 65 73 |isolates| the res|
|00003910| 74 20 6f 66 20 74 68 65 | 20 77 6f 72 6c 64 20 66 |t of the| world f|
|00003920| 72 6f 6d 0a 58 2e 49 20 | 70 72 6f 67 72 61 6d 0a |rom.X.I |program.|
|00003930| 58 69 6e 20 73 65 76 65 | 72 61 6c 20 77 61 79 73 |Xin seve|ral ways|
|00003940| 3b 0a 58 69 74 20 69 73 | 20 64 65 73 63 72 69 62 |;.Xit is| describ|
|00003950| 65 64 20 66 75 72 74 68 | 65 72 20 69 6e 0a 58 2e |ed furth|er in.X.|
|00003960| 49 20 63 6f 6e 64 6f 6d | 28 31 29 2e 0a 58 2e 50 |I condom|(1)..X.P|
|00003970| 50 0a 58 54 68 65 20 74 | 77 6f 20 6e 65 78 74 20 |P.XThe t|wo next |
|00003980| 6d 6f 73 74 20 63 6f 6d | 6d 6f 6e 6c 79 20 75 73 |most com|monly us|
|00003990| 65 64 20 6f 70 74 69 6f | 6e 73 0a 58 61 72 65 20 |ed optio|ns.Xare |
|000039a0| 0a 58 2e 49 5c 2d 64 2c | 0a 58 69 66 0a 58 2e 49 |.X.I\-d,|.Xif.X.I|
|000039b0| 20 70 74 79 0a 58 69 73 | 20 73 74 61 72 74 65 64 | pty.Xis| started|
|000039c0| 20 77 69 74 68 6f 75 74 | 20 61 20 63 6f 6e 74 72 | without| a contr|
|000039d0| 6f 6c 6c 69 6e 67 20 74 | 65 72 6d 69 6e 61 6c 3b |olling t|erminal;|
|000039e0| 0a 58 61 6e 64 0a 58 2e | 49 5c 2d 78 75 2c 0a 58 |.Xand.X.|I\-xu,.X|
|000039f0| 77 68 69 63 68 20 6d 61 | 6b 65 73 20 61 6e 20 65 |which ma|kes an e|
|00003a00| 6e 74 72 79 20 69 6e 0a | 58 2f 65 74 63 2f 75 74 |ntry in.|X/etc/ut|
|00003a10| 6d 70 2e 0a 58 2e 50 50 | 0a 58 53 6f 6d 65 20 70 |mp..X.PP|.XSome p|
|00003a20| 72 6f 67 72 61 6d 73 20 | 28 73 75 63 68 20 61 73 |rograms |(such as|
|00003a30| 0a 58 2e 49 20 76 69 29 | 0a 58 64 6f 6e 27 74 20 |.X.I vi)|.Xdon't |
|00003a40| 6c 69 6b 65 20 74 61 6b | 69 6e 67 20 69 6e 70 75 |like tak|ing inpu|
|00003a50| 74 20 6f 72 20 6f 75 74 | 70 75 74 0a 58 66 72 6f |t or out|put.Xfro|
|00003a60| 6d 20 61 20 70 69 70 65 | 3b 20 75 6e 64 65 72 0a |m a pipe|; under.|
|00003a70| 58 2e 49 20 70 74 79 2c | 0a 58 74 68 65 79 20 77 |X.I pty,|.Xthey w|
|00003a80| 6f 6e 27 74 20 6e 6f 74 | 69 63 65 20 61 20 74 68 |on't not|ice a th|
|00003a90| 69 6e 67 2e 0a 58 4f 74 | 68 65 72 20 70 72 6f 67 |ing..XOt|her prog|
|00003aa0| 72 61 6d 73 20 62 75 66 | 66 65 72 20 61 73 20 6d |rams buf|fer as m|
|00003ab0| 75 63 68 20 6f 75 74 70 | 75 74 20 61 73 20 70 6f |uch outp|ut as po|
|00003ac0| 73 73 69 62 6c 65 0a 58 | 69 66 20 74 68 65 79 27 |ssible.X|if they'|
|00003ad0| 72 65 20 69 6e 20 61 20 | 70 69 70 65 3b 0a 58 75 |re in a |pipe;.Xu|
|00003ae0| 6e 64 65 72 0a 58 2e 49 | 20 70 74 79 2c 0a 58 74 |nder.X.I| pty,.Xt|
|00003af0| 68 65 79 27 6c 6c 20 62 | 75 66 66 65 72 20 61 74 |hey'll b|uffer at|
|00003b00| 20 6d 6f 73 74 20 61 20 | 6c 69 6e 65 20 6f 66 20 | most a |line of |
|00003b10| 6f 75 74 70 75 74 2e 0a | 58 2e 49 20 70 74 79 0a |output..|X.I pty.|
|00003b20| 58 69 73 20 76 65 72 79 | 20 63 61 72 65 66 75 6c |Xis very| careful|
|00003b30| 20 74 6f 20 72 65 73 74 | 6f 72 65 20 74 65 72 6d | to rest|ore term|
|00003b40| 69 6e 61 6c 20 6d 6f 64 | 65 73 20 75 70 6f 6e 0a |inal mod|es upon.|
|00003b50| 58 73 74 6f 70 70 69 6e | 67 20 6f 72 20 65 78 69 |Xstoppin|g or exi|
|00003b60| 74 69 6e 67 3b 0a 58 61 | 20 63 61 72 65 6c 65 73 |ting;.Xa| careles|
|00003b70| 73 0a 58 2e 49 20 70 72 | 6f 67 72 61 6d 0a 58 69 |s.X.I pr|ogram.Xi|
|00003b80| 73 20 73 68 69 65 6c 64 | 65 64 20 66 72 6f 6d 20 |s shield|ed from |
|00003b90| 79 6f 75 72 20 74 65 72 | 6d 69 6e 61 6c 2e 0a 58 |your ter|minal..X|
|00003ba0| 4f 74 68 65 72 77 69 73 | 65 2c 0a 58 2e 49 20 70 |Otherwis|e,.X.I p|
|00003bb0| 74 79 20 70 72 6f 67 72 | 61 6d 0a 58 73 68 6f 75 |ty progr|am.Xshou|
|00003bc0| 6c 64 20 66 65 65 6c 20 | 6a 75 73 74 20 6c 69 6b |ld feel |just lik|
|00003bd0| 65 0a 58 2e 49 20 70 72 | 6f 67 72 61 6d 2e 0a 58 |e.X.I pr|ogram..X|
|00003be0| 2e 50 50 0a 58 2e 49 20 | 70 74 79 0a 58 63 68 61 |.PP.X.I |pty.Xcha|
|00003bf0| 6e 67 65 73 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |nges the| origina|
|00003c00| 6c 20 74 65 72 6d 69 6e | 61 6c 20 74 6f 20 63 68 |l termin|al to ch|
|00003c10| 61 72 61 63 74 65 72 2d | 61 74 2d 61 2d 74 69 6d |aracter-|at-a-tim|
|00003c20| 65 0a 58 28 72 61 77 2c | 20 63 62 72 65 61 6b 2c |e.X(raw,| cbreak,|
|00003c30| 20 61 6e 64 20 6e 6f 65 | 63 68 6f 29 20 6d 6f 64 | and noe|cho) mod|
|00003c40| 65 3b 20 69 74 20 73 65 | 74 73 20 74 68 65 20 70 |e; it se|ts the p|
|00003c50| 73 65 75 64 6f 2d 74 65 | 72 6d 69 6e 61 6c 20 74 |seudo-te|rminal t|
|00003c60| 6f 0a 58 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |o.Xthe o|riginal |
|00003c70| 6d 6f 64 65 2e 20 57 68 | 65 6e 0a 58 2e 49 20 70 |mode. Wh|en.X.I p|
|00003c80| 72 6f 67 72 61 6d 0a 58 | 66 69 6e 69 73 68 65 73 |rogram.X|finishes|
|00003c90| 2c 0a 58 2e 49 20 70 74 | 79 0a 58 77 69 6c 6c 20 |,.X.I pt|y.Xwill |
|00003ca0| 73 65 74 20 74 68 65 20 | 6f 72 69 67 69 6e 61 6c |set the |original|
|00003cb0| 20 74 65 72 6d 69 6e 61 | 6c 20 62 61 63 6b 20 74 | termina|l back t|
|00003cc0| 6f 20 69 74 73 20 6f 72 | 69 67 69 6e 61 6c 20 6d |o its or|iginal m|
|00003cd0| 6f 64 65 2e 0a 58 41 6e | 79 20 6d 6f 64 65 20 63 |ode..XAn|y mode c|
|00003ce0| 68 61 6e 67 65 73 20 6f | 6e 20 74 68 65 20 70 73 |hanges o|n the ps|
|00003cf0| 65 75 64 6f 2d 74 65 72 | 6d 69 6e 61 6c 20 77 69 |eudo-ter|minal wi|
|00003d00| 6c 6c 20 62 65 20 6c 6f | 73 74 2e 0a 58 2e 50 50 |ll be lo|st..X.PP|
|00003d10| 0a 58 2e 49 20 70 74 79 | 0a 58 73 65 74 73 20 66 |.X.I pty|.Xsets f|
|00003d20| 69 6c 65 20 64 65 73 63 | 72 69 70 74 6f 72 20 30 |ile desc|riptor 0|
|00003d30| 20 74 6f 20 69 6e 70 75 | 74 20 66 72 6f 6d 20 74 | to inpu|t from t|
|00003d40| 68 65 0a 58 70 73 65 75 | 64 6f 2d 74 65 72 6d 69 |he.Xpseu|do-termi|
|00003d50| 6e 61 6c 2c 20 31 20 61 | 6e 64 20 32 20 74 6f 20 |nal, 1 a|nd 2 to |
|00003d60| 6f 75 74 70 75 74 2e 0a | 58 2e 49 20 70 74 79 0a |output..|X.I pty.|
|00003d70| 58 61 6c 73 6f 20 73 75 | 70 70 6f 72 74 73 20 74 |Xalso su|pports t|
|00003d80| 68 65 20 60 60 33 20 69 | 73 20 2f 64 65 76 2f 74 |he ``3 i|s /dev/t|
|00003d90| 74 79 27 27 20 63 6f 6e | 76 65 6e 74 69 6f 6e 3a |ty'' con|vention:|
|00003da0| 0a 58 69 74 20 73 65 74 | 73 20 75 70 20 66 69 6c |.Xit set|s up fil|
|00003db0| 65 20 64 65 73 63 72 69 | 70 74 6f 72 20 33 20 66 |e descri|ptor 3 f|
|00003dc0| 6f 72 20 69 6e 70 75 74 | 20 66 72 6f 6d 2c 20 6f |or input| from, o|
|00003dd0| 75 74 70 75 74 20 74 6f | 2c 0a 58 61 6e 64 20 74 |utput to|,.Xand t|
|00003de0| 65 72 6d 69 6e 61 6c 20 | 63 6f 6d 6d 61 6e 64 73 |erminal |commands|
|00003df0| 20 66 6f 72 0a 58 2f 64 | 65 76 2f 74 74 79 0a 58 | for.X/d|ev/tty.X|
|00003e00| 28 6e 6f 74 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |(not the| origina|
|00003e10| 6c 20 74 74 79 2c 20 62 | 75 74 20 74 68 65 20 70 |l tty, b|ut the p|
|00003e20| 73 65 75 64 6f 20 74 74 | 79 29 2e 0a 58 2e 50 50 |seudo tt|y)..X.PP|
|00003e30| 0a 58 4f 70 74 69 6f 6e | 73 0a 58 2e 42 20 41 43 |.XOption|s.X.B AC|
|00003e40| 48 55 56 57 0a 58 70 72 | 69 6e 74 20 74 68 65 20 |HUVW.Xpr|int the |
|00003e50| 61 75 74 68 6f 72 73 68 | 69 70 20 6e 6f 74 69 63 |authorsh|ip notic|
|00003e60| 65 2c 0a 58 63 6f 70 79 | 72 69 67 68 74 20 6e 6f |e,.Xcopy|right no|
|00003e70| 74 69 63 65 2c 0a 58 68 | 65 6c 70 20 6e 6f 74 69 |tice,.Xh|elp noti|
|00003e80| 63 65 2c 0a 58 73 68 6f | 72 74 20 75 73 61 67 65 |ce,.Xsho|rt usage|
|00003e90| 20 73 75 6d 6d 61 72 79 | 2c 0a 58 76 65 72 73 69 | summary|,.Xversi|
|00003ea0| 6f 6e 20 6e 75 6d 62 65 | 72 2c 0a 58 61 6e 64 20 |on numbe|r,.Xand |
|00003eb0| 77 61 72 72 61 6e 74 79 | 20 69 6e 66 6f 72 6d 61 |warranty| informa|
|00003ec0| 74 69 6f 6e 20 72 65 73 | 70 65 63 74 69 76 65 6c |tion res|pectivel|
|00003ed0| 79 2e 0a 58 2e 50 50 0a | 58 2e 49 20 70 74 79 0a |y..X.PP.|X.I pty.|
|00003ee0| 58 68 61 73 20 71 75 69 | 74 65 20 61 20 66 65 77 |Xhas qui|te a few|
|00003ef0| 20 66 6c 61 67 73 2c 0a | 58 70 72 6f 63 65 73 73 | flags,.|Xprocess|
|00003f00| 65 64 20 6c 65 66 74 20 | 74 6f 20 72 69 67 68 74 |ed left |to right|
|00003f10| 3a 0a 58 2e 54 50 20 31 | 32 0a 58 5c 66 42 5c 2d |:.X.TP 1|2.X\fB\-|
|00003f20| 64 5c 66 49 0a 58 2e 49 | 20 70 74 79 0a 58 77 69 |d\fI.X.I| pty.Xwi|
|00003f30| 6c 6c 20 61 73 73 75 6d | 65 20 69 74 20 69 73 20 |ll assum|e it is |
|00003f40| 61 6c 72 65 61 64 79 20 | 64 65 74 61 63 68 65 64 |already |detached|
|00003f50| 20 66 72 6f 6d 20 74 68 | 65 20 74 65 72 6d 69 6e | from th|e termin|
|00003f60| 61 6c 2e 0a 58 54 68 69 | 73 20 66 6f 72 63 65 73 |al..XThi|s forces|
|00003f70| 0a 58 2e 42 5c 2d 54 3b | 0a 58 69 74 20 73 65 74 |.X.B\-T;|.Xit set|
|00003f80| 73 20 62 75 74 20 64 6f | 65 73 6e 27 74 20 66 6f |s but do|esn't fo|
|00003f90| 72 63 65 0a 58 2e 42 5c | 2d 4a 2e 0a 58 41 6c 73 |rce.X.B\|-J..XAls|
|00003fa0| 6f 2c 20 69 6e 73 74 65 | 61 64 20 6f 66 20 63 6f |o, inste|ad of co|
|00003fb0| 70 79 69 6e 67 20 70 73 | 65 75 64 6f 2d 74 65 72 |pying ps|eudo-ter|
|00003fc0| 6d 69 6e 61 6c 20 6d 6f | 64 65 73 20 66 72 6f 6d |minal mo|des from|
|00003fd0| 0a 58 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 74 |.Xthe or|iginal t|
|00003fe0| 65 72 6d 69 6e 61 6c 2c | 0a 58 2e 49 20 70 74 79 |erminal,|.X.I pty|
|00003ff0| 0a 58 77 69 6c 6c 20 73 | 65 74 20 75 70 20 61 20 |.Xwill s|et up a |
|00004000| 67 65 6e 65 72 69 63 20 | 6e 65 77 2d 64 69 73 63 |generic |new-disc|
|00004010| 69 70 6c 69 6e 65 20 6c | 69 6e 65 2d 61 74 2d 61 |ipline l|ine-at-a|
|00004020| 2d 74 69 6d 65 20 6d 6f | 64 65 2e 0a 58 2e 54 50 |-time mo|de..X.TP|
|00004030| 0a 58 5c 66 42 5c 2d 44 | 5c 66 49 0a 58 2e 49 20 |.X\fB\-D|\fI.X.I |
|00004040| 70 74 79 0a 58 77 69 6c | 6c 20 61 73 73 75 6d 65 |pty.Xwil|l assume|
|00004050| 20 74 68 61 74 20 69 74 | 20 69 73 20 61 74 74 61 | that it| is atta|
|00004060| 63 68 65 64 20 74 6f 20 | 61 20 74 65 72 6d 69 6e |ched to |a termin|
|00004070| 61 6c 20 28 64 65 66 61 | 75 6c 74 29 2e 0a 58 54 |al (defa|ult)..XT|
|00004080| 68 69 73 20 73 65 74 73 | 0a 58 2e 42 5c 2d 6a 74 |his sets|.X.B\-jt|
|00004090| 2e 0a 58 2e 54 50 0a 58 | 5c 66 42 5c 2d 65 5c 66 |..X.TP.X|\fB\-e\f|
|000040a0| 49 0a 58 50 72 65 73 65 | 72 76 65 0a 58 73 74 61 |I.XPrese|rve.Xsta|
|000040b0| 6e 64 61 72 64 20 65 72 | 72 6f 72 20 28 66 69 6c |ndard er|ror (fil|
|000040c0| 65 20 64 65 73 63 72 69 | 70 74 6f 72 20 32 29 0a |e descri|ptor 2).|
|000040d0| 58 61 6e 64 20 73 74 61 | 6e 64 61 72 64 20 74 74 |Xand sta|ndard tt|
|000040e0| 79 20 28 66 69 6c 65 20 | 64 65 73 63 72 69 70 74 |y (file |descript|
|000040f0| 6f 72 20 33 29 2e 0a 58 | 2e 54 50 0a 58 5c 66 42 |or 3)..X|.TP.X\fB|
|00004100| 5c 2d 33 5c 66 49 0a 58 | 50 72 65 73 65 72 76 65 |\-3\fI.X|Preserve|
|00004110| 20 66 64 20 33 2c 20 62 | 75 74 20 70 6f 69 6e 74 | fd 3, b|ut point|
|00004120| 20 66 64 20 32 20 61 74 | 20 74 68 65 20 70 73 65 | fd 2 at| the pse|
|00004130| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 2e 0a 58 2e |udo-term|inal..X.|
|00004140| 54 50 0a 58 5c 66 42 5c | 2d 45 5c 66 49 0a 58 44 |TP.X\fB\|-E\fI.XD|
|00004150| 69 72 65 63 74 20 62 6f | 74 68 20 66 69 6c 65 20 |irect bo|th file |
|00004160| 64 65 73 63 72 69 70 74 | 6f 72 73 20 74 6f 20 74 |descript|ors to t|
|00004170| 68 65 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |he pseud|o-termin|
|00004180| 61 6c 20 28 64 65 66 61 | 75 6c 74 29 2e 0a 58 28 |al (defa|ult)..X(|
|00004190| 41 63 74 75 61 6c 6c 79 | 2c 0a 58 2e 49 20 70 74 |Actually|,.X.I pt|
|000041a0| 79 0a 58 77 69 6c 6c 20 | 70 6f 69 6e 74 20 73 74 |y.Xwill |point st|
|000041b0| 61 6e 64 61 72 64 20 65 | 72 72 6f 72 20 61 74 20 |andard e|rror at |
|000041c0| 74 68 65 20 74 74 79 20 | 62 79 20 6e 61 6d 65 2c |the tty |by name,|
|000041d0| 0a 58 62 75 74 20 66 64 | 20 33 20 61 74 20 2f 64 |.Xbut fd| 3 at /d|
|000041e0| 65 76 2f 74 74 79 2c 0a | 58 73 6f 20 74 68 61 74 |ev/tty,.|Xso that|
|000041f0| 20 76 61 72 69 6f 75 73 | 0a 58 2e 49 20 69 6f 63 | various|.X.I ioc|
|00004200| 74 6c 28 29 0a 58 63 6f | 6d 6d 61 6e 64 73 20 6f |tl().Xco|mmands o|
|00004210| 6e 20 66 64 20 33 20 77 | 69 6c 6c 20 77 6f 72 6b |n fd 3 w|ill work|
|00004220| 2e 29 0a 58 41 6c 73 6f | 20 63 6c 6f 73 65 20 61 |.).XAlso| close a|
|00004230| 6c 6c 20 68 69 67 68 65 | 72 2d 6e 75 6d 62 65 72 |ll highe|r-number|
|00004240| 65 64 20 66 69 6c 65 20 | 64 65 73 63 72 69 70 74 |ed file |descript|
|00004250| 6f 72 73 2e 0a 58 2e 54 | 50 0a 58 5c 66 42 5c 2d |ors..X.T|P.X\fB\-|
|00004260| 6a 5c 66 49 0a 58 4a 6f | 62 20 63 6f 6e 74 72 6f |j\fI.XJo|b contro|
|00004270| 6c 20 28 64 65 66 61 75 | 6c 74 29 3a 20 57 68 65 |l (defau|lt): Whe|
|00004280| 6e 0a 58 2e 49 20 70 72 | 6f 67 72 61 6d 0a 58 73 |n.X.I pr|ogram.Xs|
|00004290| 74 6f 70 73 2c 0a 58 2e | 49 20 70 74 79 0a 58 73 |tops,.X.|I pty.Xs|
|000042a0| 74 6f 70 73 2e 0a 58 57 | 68 65 6e 20 0a 58 2e 49 |tops..XW|hen .X.I|
|000042b0| 20 70 74 79 0a 58 69 73 | 20 72 65 73 74 61 72 74 | pty.Xis| restart|
|000042c0| 65 64 2c 0a 58 69 74 20 | 72 65 73 74 61 72 74 73 |ed,.Xit |restarts|
|000042d0| 0a 58 2e 49 20 70 72 6f | 67 72 61 6d 2e 0a 58 2e |.X.I pro|gram..X.|
|000042e0| 54 50 0a 58 5c 66 42 5c | 2d 4a 5c 66 49 0a 58 4e |TP.X\fB\|-J\fI.XN|
|000042f0| 6f 20 6a 6f 62 20 63 6f | 6e 74 72 6f 6c 2e 0a 58 |o job co|ntrol..X|
|00004300| 49 66 0a 58 2e 49 20 70 | 72 6f 67 72 61 6d 0a 58 |If.X.I p|rogram.X|
|00004310| 73 74 6f 70 73 2c 0a 58 | 2e 49 20 70 74 79 0a 58 |stops,.X|.I pty.X|
|00004320| 77 69 6c 6c 20 69 67 6e | 6f 72 65 20 69 74 0a 58 |will ign|ore it.X|
|00004330| 28 74 68 6f 75 67 68 20 | 69 74 20 77 69 6c 6c 20 |(though |it will |
|00004340| 61 6c 77 61 79 73 20 72 | 65 73 74 61 72 74 20 69 |always r|estart i|
|00004350| 74 20 75 70 6f 6e 20 61 | 20 72 65 63 6f 6e 6e 65 |t upon a| reconne|
|00004360| 63 74 29 2e 0a 58 54 68 | 69 73 20 62 65 68 61 76 |ct)..XTh|is behav|
|00004370| 69 6f 72 20 69 73 20 6d | 75 63 68 20 6c 65 73 73 |ior is m|uch less|
|00004380| 0a 58 61 6e 74 69 73 6f | 63 69 61 6c 20 74 68 61 |.Xantiso|cial tha|
|00004390| 6e 0a 58 74 68 65 20 62 | 65 68 61 76 69 6f 72 20 |n.Xthe b|ehavior |
|000043a0| 6f 66 20 74 68 65 20 70 | 72 65 76 69 6f 75 73 0a |of the p|revious.|
|000043b0| 58 2e 49 20 70 74 79 0a | 58 76 65 72 73 69 6f 6e |X.I pty.|Xversion|
|000043c0| 2e 0a 58 2e 54 50 0a 58 | 5c 66 42 5c 2d 74 5c 66 |..X.TP.X|\fB\-t\f|
|000043d0| 49 0a 58 2e 49 20 70 74 | 79 0a 58 77 69 6c 6c 20 |I.X.I pt|y.Xwill |
|000043e0| 73 65 74 20 74 68 65 0a | 58 6f 72 69 67 69 6e 61 |set the.|Xorigina|
|000043f0| 6c 20 74 65 72 6d 69 6e | 61 6c 20 74 6f 0a 58 6e |l termin|al to.Xn|
|00004400| 6f 2d 65 63 68 6f 2c 20 | 63 68 61 72 61 63 74 65 |o-echo, |characte|
|00004410| 72 2d 61 74 2d 61 2d 74 | 69 6d 65 20 6d 6f 64 65 |r-at-a-t|ime mode|
|00004420| 20 28 64 65 66 61 75 6c | 74 29 2e 0a 58 2e 54 50 | (defaul|t)..X.TP|
|00004430| 0a 58 5c 66 42 5c 2d 54 | 5c 66 49 0a 58 2e 49 20 |.X\fB\-T|\fI.X.I |
|00004440| 70 74 79 0a 58 77 69 6c | 6c 20 6e 6f 74 20 74 6f |pty.Xwil|l not to|
|00004450| 75 63 68 20 74 68 65 20 | 6f 72 69 67 69 6e 61 6c |uch the |original|
|00004460| 20 74 65 72 6d 69 6e 61 | 6c 2c 20 69 66 20 74 68 | termina|l, if th|
|00004470| 65 72 65 20 69 73 20 6f | 6e 65 2e 0a 58 49 74 20 |ere is o|ne..XIt |
|00004480| 69 73 20 61 6c 77 61 79 | 73 20 64 61 6e 67 65 72 |is alway|s danger|
|00004490| 6f 75 73 20 74 6f 20 70 | 75 74 20 74 77 6f 20 70 |ous to p|ut two p|
|000044a0| 72 6f 67 72 61 6d 73 20 | 69 6e 20 61 20 70 69 70 |rograms |in a pip|
|000044b0| 65 20 69 66 20 62 6f 74 | 68 0a 58 63 68 61 6e 67 |e if bot|h.Xchang|
|000044c0| 65 20 74 74 79 20 6d 6f | 64 65 73 3b 0a 58 2e 49 |e tty mo|des;.X.I|
|000044d0| 20 70 74 79 2c 0a 58 2e | 49 20 76 69 2c 0a 58 61 | pty,.X.|I vi,.Xa|
|000044e0| 6e 64 0a 58 2e 49 20 6d | 6f 72 65 0a 58 61 72 65 |nd.X.I m|ore.Xare|
|000044f0| 20 65 78 61 6d 70 6c 65 | 73 20 6f 66 20 73 75 63 | example|s of suc|
|00004500| 68 20 70 72 6f 67 72 61 | 6d 73 2e 20 49 66 20 79 |h progra|ms. If y|
|00004510| 6f 75 20 75 73 65 0a 58 | 2e 49 20 70 74 79 0a 58 |ou use.X|.I pty.X|
|00004520| 69 6e 20 61 20 70 69 70 | 65 0a 58 77 69 74 68 20 |in a pip|e.Xwith |
|00004530| 61 6e 6f 74 68 65 72 20 | 74 74 79 2d 6d 6f 64 65 |another |tty-mode|
|00004540| 2d 63 68 61 6e 67 69 6e | 67 20 70 72 6f 67 72 61 |-changin|g progra|
|00004550| 6d 2c 0a 58 6d 61 6b 65 | 20 73 75 72 65 20 74 6f |m,.Xmake| sure to|
|00004560| 20 73 70 65 63 69 66 79 | 0a 58 2e 42 5c 2d 30 0a | specify|.X.B\-0.|
|00004570| 58 28 77 68 69 63 68 20 | 69 73 20 61 6e 20 61 62 |X(which |is an ab|
|00004580| 62 72 65 76 69 61 74 69 | 6f 6e 20 66 6f 72 0a 58 |breviati|on for.X|
|00004590| 2e 42 5c 2d 65 53 54 70 | 30 29 0a 58 73 6f 20 74 |.B\-eSTp|0).Xso t|
|000045a0| 68 61 74 0a 58 2e 49 20 | 70 74 79 0a 58 77 69 6c |hat.X.I |pty.Xwil|
|000045b0| 6c 20 6e 65 69 74 68 65 | 72 20 61 66 66 65 63 74 |l neithe|r affect|
|000045c0| 20 6e 6f 72 20 62 65 20 | 61 66 66 65 63 74 65 64 | nor be |affected|
|000045d0| 20 62 79 20 74 68 65 20 | 6f 74 68 65 72 20 70 72 | by the |other pr|
|000045e0| 6f 67 72 61 6d 2e 0a 58 | 49 66 20 79 6f 75 20 75 |ogram..X|If you u|
|000045f0| 73 65 20 61 20 70 69 70 | 65 20 6f 66 20 70 74 79 |se a pip|e of pty|
|00004600| 73 2c 0a 58 79 6f 75 20 | 73 68 6f 75 6c 64 20 70 |s,.Xyou |should p|
|00004610| 72 6f 62 61 62 6c 79 20 | 73 70 65 63 69 66 79 0a |robably |specify.|
|00004620| 58 2e 42 5c 2d 30 0a 58 | 69 6e 20 61 6c 6c 20 62 |X.B\-0.X|in all b|
|00004630| 75 74 20 6f 6e 65 2e 0a | 58 2e 54 50 0a 58 5c 66 |ut one..|X.TP.X\f|
|00004640| 42 5c 2d 73 5c 66 49 0a | 58 53 65 73 73 69 6f 6e |B\-s\fI.|XSession|
|00004650| 2e 0a 58 57 68 65 6e 20 | 74 68 65 20 63 6f 6e 6e |..XWhen |the conn|
|00004660| 65 63 74 69 6f 6e 20 69 | 73 20 68 75 6e 67 20 75 |ection i|s hung u|
|00004670| 70 20 6f 72 20 6d 61 6e | 75 61 6c 6c 79 20 64 69 |p or man|ually di|
|00004680| 73 63 6f 6e 6e 65 63 74 | 65 64 2c 0a 58 2e 49 20 |sconnect|ed,.X.I |
|00004690| 70 74 79 0a 58 77 69 6c | 6c 20 70 61 74 69 65 6e |pty.Xwil|l patien|
|000046a0| 74 6c 79 20 77 61 69 74 | 20 66 6f 72 20 61 0a 58 |tly wait| for a.X|
|000046b0| 72 65 63 6f 6e 6e 65 63 | 74 69 6f 6e 2e 0a 58 2e |reconnec|tion..X.|
|000046c0| 49 20 70 72 6f 67 72 61 | 6d 0a 58 77 6f 6e 27 74 |I progra|m.Xwon't|
|000046d0| 20 6e 6f 74 69 63 65 20 | 61 20 74 68 69 6e 67 2e | notice |a thing.|
|000046e0| 0a 58 2e 42 5c 2d 73 0a | 58 73 65 74 73 20 62 75 |.X.B\-s.|Xsets bu|
|000046f0| 74 20 64 6f 65 73 20 6e | 6f 74 20 66 6f 72 63 65 |t does n|ot force|
|00004700| 0a 58 2e 42 5c 2d 78 75 | 2e 0a 58 49 74 20 66 6f |.X.B\-xu|..XIt fo|
|00004710| 72 63 65 73 0a 58 2e 42 | 5c 2d 45 2e 0a 58 2e 54 |rces.X.B|\-E..X.T|
|00004720| 50 0a 58 5c 66 42 5c 2d | 53 5c 66 49 0a 58 4e 6f |P.X\fB\-|S\fI.XNo|
|00004730| 20 73 65 73 73 69 6f 6e | 20 28 64 65 66 61 75 6c | session| (defaul|
|00004740| 74 29 2e 0a 58 57 68 65 | 6e 20 74 68 65 20 63 6f |t)..XWhe|n the co|
|00004750| 6e 6e 65 63 74 69 6f 6e | 20 69 73 20 68 75 6e 67 |nnection| is hung|
|00004760| 20 75 70 2c 0a 58 2e 49 | 20 70 74 79 0a 58 77 69 | up,.X.I| pty.Xwi|
|00004770| 6c 6c 20 73 65 6e 64 20 | 61 20 48 55 50 20 74 6f |ll send |a HUP to|
|00004780| 0a 58 2e 49 20 70 72 6f | 67 72 61 6d 2e 0a 58 2e |.X.I pro|gram..X.|
|00004790| 42 5c 2d 53 0a 58 73 65 | 74 73 20 62 75 74 20 64 |B\-S.Xse|ts but d|
|000047a0| 6f 65 73 20 6e 6f 74 20 | 66 6f 72 63 65 0a 58 2e |oes not |force.X.|
|000047b0| 42 5c 2d 78 55 2e 0a 58 | 2e 54 50 0a 58 5c 66 42 |B\-xU..X|.TP.X\fB|
|000047c0| 5c 2d 71 5c 66 49 0a 58 | 51 75 69 65 74 2e 0a 58 |\-q\fI.X|Quiet..X|
|000047d0| 2e 49 20 70 74 79 0a 58 | 77 69 6c 6c 20 70 72 69 |.I pty.X|will pri|
|000047e0| 6e 74 20 61 62 73 6f 6c | 75 74 65 6c 79 20 6e 6f |nt absol|utely no|
|000047f0| 74 68 69 6e 67 20 6f 6e | 20 73 74 61 6e 64 61 72 |thing on| standar|
|00004800| 64 20 65 72 72 6f 72 2e | 0a 58 49 74 20 77 69 6c |d error.|.XIt wil|
|00004810| 6c 20 63 6f 6d 6d 75 6e | 69 63 61 74 65 20 73 74 |l commun|icate st|
|00004820| 72 61 6e 67 65 20 65 76 | 65 6e 74 73 20 74 68 72 |range ev|ents thr|
|00004830| 6f 75 67 68 20 69 74 73 | 20 65 78 69 74 20 63 6f |ough its| exit co|
|00004840| 64 65 2e 0a 58 2e 54 50 | 0a 58 5c 66 42 5c 2d 51 |de..X.TP|.X\fB\-Q|
|00004850| 5c 66 49 0a 58 4e 6f 74 | 20 71 75 69 65 74 20 28 |\fI.XNot| quiet (|
|00004860| 64 65 66 61 75 6c 74 29 | 2e 0a 58 2e 49 20 70 74 |default)|..X.I pt|
|00004870| 79 0a 58 77 69 6c 6c 20 | 67 65 6e 65 72 61 74 65 |y.Xwill |generate|
|00004880| 20 62 69 74 73 20 6f 66 | 20 63 68 61 74 74 65 72 | bits of| chatter|
|00004890| 20 61 62 6f 75 74 20 69 | 6e 74 65 72 65 73 74 69 | about i|nteresti|
|000048a0| 6e 67 0a 58 65 76 65 6e | 74 73 2e 0a 58 2e 54 50 |ng.Xeven|ts..X.TP|
|000048b0| 0a 58 5c 66 42 5c 2d 76 | 5c 66 49 0a 58 56 65 72 |.X\fB\-v|\fI.XVer|
|000048c0| 62 6f 73 65 2e 0a 58 2e | 49 20 70 74 79 0a 58 77 |bose..X.|I pty.Xw|
|000048d0| 69 6c 6c 20 62 6c 61 62 | 62 65 72 20 6f 6e 20 61 |ill blab|ber on a|
|000048e0| 6e 64 20 6f 6e 20 61 6e | 64 20 6f 6e 20 61 6e 64 |nd on an|d on and|
|000048f0| 20 6f 6e 20 61 6e 64 20 | 6f 6e 20 61 6e 64 20 6f | on and |on and o|
|00004900| 6e 20 61 6e 64 20 6f 6e | 20 61 6e 64 20 6f 6e 2e |n and on| and on.|
|00004910| 0a 58 49 74 20 6b 65 65 | 70 73 20 67 6f 69 6e 67 |.XIt kee|ps going|
|00004920| 2c 0a 58 61 6e 64 20 67 | 6f 69 6e 67 2c 0a 58 61 |,.Xand g|oing,.Xa|
|00004930| 6e 64 20 67 6f 69 6e 67 | 2c 0a 58 61 6e 64 20 67 |nd going|,.Xand g|
|00004940| 6f 69 6e 67 20 2e 2e 2e | 0a 58 2e 54 50 0a 58 5c |oing ...|.X.TP.X\|
|00004950| 66 42 5c 2d 66 5c 66 49 | 66 64 0a 58 50 61 73 73 |fB\-f\fI|fd.XPass|
|00004960| 20 74 68 65 20 6d 61 73 | 74 65 72 20 61 6e 64 20 | the mas|ter and |
|00004970| 73 6c 61 76 65 20 73 69 | 64 65 73 20 6f 66 20 74 |slave si|des of t|
|00004980| 68 65 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |he pseud|o-termin|
|00004990| 61 6c 0a 58 75 70 20 69 | 6e 20 66 69 6c 65 20 64 |al.Xup i|n file d|
|000049a0| 65 73 63 72 69 70 74 6f | 72 0a 58 2e 49 20 66 64 |escripto|r.X.I fd|
|000049b0| 2e 0a 58 54 68 69 73 20 | 69 73 20 6f 6e 6c 79 20 |..XThis |is only |
|000049c0| 61 76 61 69 6c 61 62 6c | 65 20 69 66 20 79 6f 75 |availabl|e if you|
|000049d0| 72 20 6d 61 63 68 69 6e | 65 20 73 75 70 70 6f 72 |r machin|e suppor|
|000049e0| 74 73 20 64 65 73 63 72 | 69 70 74 6f 72 20 70 61 |ts descr|iptor pa|
|000049f0| 73 73 69 6e 67 2e 0a 58 | 0a 58 54 68 65 20 70 72 |ssing..X|.XThe pr|
|00004a00| 6f 74 6f 63 6f 6c 2c 20 | 66 72 6f 6d 20 74 68 65 |otocol, |from the|
|00004a10| 20 70 6f 69 6e 74 20 6f | 66 20 76 69 65 77 20 6f | point o|f view o|
|00004a20| 66 20 74 68 65 20 72 65 | 63 65 69 76 65 72 20 28 |f the re|ceiver (|
|00004a30| 60 60 63 6f 6e 74 72 6f | 6c 6c 65 72 27 27 29 2c |``contro|ller''),|
|00004a40| 0a 58 69 73 20 74 6f 20 | 70 74 79 5f 67 65 74 63 |.Xis to |pty_getc|
|00004a50| 68 20 61 20 63 68 61 72 | 61 63 74 65 72 20 6f 66 |h a char|acter of|
|00004a60| 66 20 74 68 65 20 6f 74 | 68 65 72 20 73 69 64 65 |f the ot|her side|
|00004a70| 0a 58 6f 66 20 74 68 65 | 20 70 61 73 73 69 6e 67 |.Xof the| passing|
|00004a80| 20 64 65 73 63 72 69 70 | 74 6f 72 2c 20 70 65 72 | descrip|tor, per|
|00004a90| 68 61 70 73 20 63 68 65 | 63 6b 20 74 68 61 74 20 |haps che|ck that |
|00004aa0| 69 74 20 69 73 20 61 20 | 47 2c 0a 58 61 6e 64 20 |it is a |G,.Xand |
|00004ab0| 70 74 79 5f 70 75 74 67 | 65 74 69 6e 74 20 61 20 |pty_putg|etint a |
|00004ac0| 47 20 66 6f 72 20 74 68 | 65 20 70 72 6f 63 65 73 |G for th|e proces|
|00004ad0| 73 20 69 64 20 6f 66 20 | 74 68 65 20 73 69 67 6e |s id of |the sign|
|00004ae0| 61 6c 6c 65 72 0a 58 28 | 74 68 65 20 70 72 6f 63 |aller.X(|the proc|
|00004af0| 65 73 73 20 74 6f 20 72 | 65 63 69 65 76 65 20 61 |ess to r|ecieve a|
|00004b00| 20 48 55 50 20 69 66 20 | 74 68 65 20 63 6f 6e 6e | HUP if |the conn|
|00004b10| 65 63 74 69 6f 6e 20 64 | 72 6f 70 73 29 3b 0a 58 |ection d|rops);.X|
|00004b20| 70 74 79 5f 67 65 74 63 | 68 20 61 20 63 68 61 72 |pty_getc|h a char|
|00004b30| 61 63 74 65 72 2c 20 70 | 65 72 68 61 70 73 20 63 |acter, p|erhaps c|
|00004b40| 68 65 63 6b 20 74 68 61 | 74 20 69 74 20 69 73 20 |heck tha|t it is |
|00004b50| 6d 2c 0a 58 61 6e 64 20 | 70 74 79 5f 70 75 74 67 |m,.Xand |pty_putg|
|00004b60| 65 74 66 64 20 61 6e 20 | 6d 20 66 6f 72 20 74 68 |etfd an |m for th|
|00004b70| 65 20 6d 61 73 74 65 72 | 20 73 69 64 65 20 6f 66 |e master| side of|
|00004b80| 20 74 68 65 20 70 73 65 | 75 64 6f 2d 74 65 72 6d | the pse|udo-term|
|00004b90| 69 6e 61 6c 3b 0a 58 61 | 6e 64 20 73 69 6d 69 6c |inal;.Xa|nd simil|
|00004ba0| 61 72 6c 79 20 66 6f 72 | 20 73 20 61 6e 64 20 74 |arly for| s and t|
|00004bb0| 68 65 20 73 6c 61 76 65 | 20 73 69 64 65 2e 20 28 |he slave| side. (|
|00004bc0| 54 68 65 73 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |These fu|nctions |
|00004bd0| 61 72 65 20 61 6c 6c 0a | 58 61 76 61 69 6c 61 62 |are all.|Xavailab|
|00004be0| 6c 65 20 69 6e 20 73 6f | 63 6b 2e 63 20 69 6e 20 |le in so|ck.c in |
|00004bf0| 74 68 65 0a 58 2e 49 20 | 70 74 79 0a 58 73 6f 75 |the.X.I |pty.Xsou|
|00004c00| 72 63 65 20 63 6f 64 65 | 2e 29 0a 58 0a 58 57 68 |rce code|.).X.XWh|
|00004c10| 65 6e 20 74 68 65 20 63 | 6f 6e 6e 65 63 74 69 6f |en the c|onnectio|
|00004c20| 6e 20 69 73 20 64 72 6f | 70 70 65 64 2c 0a 58 2e |n is dro|pped,.X.|
|00004c30| 49 20 70 74 79 0a 58 77 | 69 6c 6c 20 73 65 6e 64 |I pty.Xw|ill send|
|00004c40| 20 75 70 20 61 20 70 65 | 72 69 6f 64 2c 0a 58 66 | up a pe|riod,.Xf|
|00004c50| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 6f 6e 65 20 70 |ollowed |by one p|
|00004c60| 69 64 20 61 6e 64 20 74 | 77 6f 20 6e 65 77 20 64 |id and t|wo new d|
|00004c70| 65 73 63 72 69 70 74 6f | 72 73 20 61 73 20 61 62 |escripto|rs as ab|
|00004c80| 6f 76 65 0a 58 69 66 20 | 69 74 20 72 65 63 6f 6e |ove.Xif |it recon|
|00004c90| 6e 65 63 74 73 2e 0a 58 | 49 6e 20 74 68 65 20 6d |nects..X|In the m|
|00004ca0| 65 61 6e 74 69 6d 65 2c | 20 74 68 65 20 63 6f 6e |eantime,| the con|
|00004cb0| 74 72 6f 6c 6c 65 72 20 | 68 61 73 20 66 75 6c 6c |troller |has full|
|00004cc0| 20 72 65 73 70 6f 6e 73 | 69 62 69 6c 69 74 79 20 | respons|ibility |
|00004cd0| 66 6f 72 0a 58 70 65 72 | 66 6f 72 6d 69 6e 67 20 |for.Xper|forming |
|00004ce0| 74 65 72 6d 69 6e 61 6c | 20 49 2f 4f 2e 0a 58 2e |terminal| I/O..X.|
|00004cf0| 54 50 0a 58 5c 66 42 5c | 2d 46 5c 66 49 0a 58 44 |TP.X\fB\|-F\fI.XD|
|00004d00| 6f 20 6e 6f 74 20 70 61 | 73 73 20 61 6e 79 74 68 |o not pa|ss anyth|
|00004d10| 69 6e 67 20 28 64 65 66 | 61 75 6c 74 29 2e 0a 58 |ing (def|ault)..X|
|00004d20| 2e 54 50 0a 58 5c 66 42 | 5c 2d 70 5c 66 49 6d 6d |.TP.X\fB|\-p\fImm|
|00004d30| 6d 0a 58 53 65 74 20 74 | 68 65 0a 58 70 73 65 75 |m.XSet t|he.Xpseu|
|00004d40| 64 6f 2d 74 65 72 6d 69 | 6e 61 6c 20 74 6f 20 6d |do-termi|nal to m|
|00004d50| 6f 64 65 73 20 73 70 65 | 63 69 66 69 65 64 20 62 |odes spe|cified b|
|00004d60| 79 0a 58 2e 49 20 6d 2e | 0a 58 55 6e 64 65 72 0a |y.X.I m.|.XUnder.|
|00004d70| 58 2e 42 5c 2d 64 2c 0a | 58 64 65 66 61 75 6c 74 |X.B\-d,.|Xdefault|
|00004d80| 73 20 61 72 65 20 74 61 | 6b 65 6e 20 66 72 6f 6d |s are ta|ken from|
|00004d90| 20 74 68 65 0a 58 63 75 | 72 72 65 6e 74 20 74 65 | the.Xcu|rrent te|
|00004da0| 72 6d 69 6e 61 6c 3b 0a | 58 75 6e 64 65 72 0a 58 |rminal;.|Xunder.X|
|00004db0| 2e 42 5c 2d 44 2c 0a 58 | 64 65 66 61 75 6c 74 73 |.B\-D,.X|defaults|
|00004dc0| 20 61 72 65 20 61 73 20 | 62 65 6c 6f 77 2e 0a 58 | are as |below..X|
|00004dd0| 50 72 65 64 65 66 69 6e | 65 64 20 6d 6f 64 65 73 |Predefin|ed modes|
|00004de0| 3a 0a 58 2e 52 53 0a 58 | 2e 54 50 20 35 0a 58 2e |:.X.RS.X|.TP 5.X.|
|00004df0| 49 20 63 0a 58 53 65 74 | 20 63 62 72 65 61 6b 20 |I c.XSet| cbreak |
|00004e00| 28 63 68 61 72 61 63 74 | 65 72 2d 61 74 2d 61 2d |(charact|er-at-a-|
|00004e10| 74 69 6d 65 29 20 6d 6f | 64 65 2e 0a 58 2e 54 50 |time) mo|de..X.TP|
|00004e20| 0a 58 2e 49 20 43 0a 58 | 44 6f 20 6e 6f 74 20 73 |.X.I C.X|Do not s|
|00004e30| 65 74 20 63 62 72 65 61 | 6b 20 6d 6f 64 65 20 28 |et cbrea|k mode (|
|00004e40| 64 65 66 61 75 6c 74 29 | 2e 20 0a 58 2e 54 50 0a |default)|. .X.TP.|
|00004e50| 58 2e 49 20 64 0a 58 55 | 73 65 20 74 68 65 20 6e |X.I d.XU|se the n|
|00004e60| 65 77 20 64 69 73 63 69 | 70 6c 69 6e 65 20 28 64 |ew disci|pline (d|
|00004e70| 65 66 61 75 6c 74 2c 20 | 62 72 65 61 6b 69 6e 67 |efault, |breaking|
|00004e80| 20 77 69 74 68 20 74 72 | 61 64 69 74 69 6f 6e 29 | with tr|adition)|
|00004e90| 2e 0a 58 2e 54 50 0a 58 | 2e 49 20 44 0a 58 55 73 |..X.TP.X|.I D.XUs|
|00004ea0| 65 20 74 68 65 20 6f 6c | 64 20 64 69 73 63 69 70 |e the ol|d discip|
|00004eb0| 6c 69 6e 65 2c 20 77 69 | 74 68 6f 75 74 20 6a 6f |line, wi|thout jo|
|00004ec0| 62 20 63 6f 6e 74 72 6f | 6c 20 6f 72 20 6f 74 68 |b contro|l or oth|
|00004ed0| 65 72 20 66 61 6e 63 79 | 20 74 74 79 20 66 65 61 |er fancy| tty fea|
|00004ee0| 74 75 72 65 73 2e 0a 58 | 2e 54 50 0a 58 2e 49 20 |tures..X|.TP.X.I |
|00004ef0| 65 0a 58 45 63 68 6f 20 | 63 68 61 72 61 63 74 65 |e.XEcho |characte|
|00004f00| 72 73 20 28 64 65 66 61 | 75 6c 74 29 2e 0a 58 2e |rs (defa|ult)..X.|
|00004f10| 54 50 0a 58 2e 49 20 45 | 0a 58 44 6f 20 6e 6f 74 |TP.X.I E|.XDo not|
|00004f20| 20 65 63 68 6f 2e 0a 58 | 2e 54 50 0a 58 2e 49 20 | echo..X|.TP.X.I |
|00004f30| 6e 0a 58 43 68 61 6e 67 | 65 20 72 65 74 75 72 6e |n.XChang|e return|
|00004f40| 20 74 6f 20 6e 65 77 6c | 69 6e 65 20 28 64 65 66 | to newl|ine (def|
|00004f50| 61 75 6c 74 29 2e 0a 58 | 2e 54 50 0a 58 2e 49 20 |ault)..X|.TP.X.I |
|00004f60| 4e 0a 58 44 6f 20 6e 6f | 74 20 63 68 61 6e 67 65 |N.XDo no|t change|
|00004f70| 20 72 65 74 75 72 6e 20 | 74 6f 20 6e 65 77 6c 69 | return |to newli|
|00004f80| 6e 65 2e 0a 58 2e 54 50 | 0a 58 2e 49 20 72 0a 58 |ne..X.TP|.X.I r.X|
|00004f90| 53 65 74 20 72 61 77 20 | 6d 6f 64 65 3a 20 64 6f |Set raw |mode: do|
|00004fa0| 20 6e 6f 74 20 70 72 6f | 64 75 63 65 20 73 69 67 | not pro|duce sig|
|00004fb0| 6e 61 6c 73 2c 20 61 6e | 64 20 70 61 73 73 20 65 |nals, an|d pass e|
|00004fc0| 69 67 68 74 2d 62 69 74 | 20 63 68 61 72 61 63 74 |ight-bit| charact|
|00004fd0| 65 72 73 2e 0a 58 2e 54 | 50 0a 58 2e 49 20 52 0a |ers..X.T|P.X.I R.|
|00004fe0| 58 53 65 74 20 6e 6f 6e | 2d 72 61 77 20 28 60 60 |XSet non|-raw (``|
|00004ff0| 63 6f 6f 6b 65 64 27 27 | 29 20 6d 6f 64 65 20 28 |cooked''|) mode (|
|00005000| 64 65 66 61 75 6c 74 29 | 2e 0a 58 2e 54 50 0a 58 |default)|..X.TP.X|
|00005010| 2e 49 20 73 0a 58 53 65 | 74 20 6c 69 6e 65 20 65 |.I s.XSe|t line e|
|00005020| 64 69 74 69 6e 67 20 6d | 6f 64 65 73 20 61 70 70 |diting m|odes app|
|00005030| 72 6f 70 72 69 61 74 65 | 20 66 6f 72 20 61 20 73 |ropriate| for a s|
|00005040| 63 72 65 65 6e 20 28 64 | 65 66 61 75 6c 74 29 2e |creen (d|efault).|
|00005050| 0a 58 2e 54 50 0a 58 2e | 49 20 53 0a 58 44 6f 20 |.X.TP.X.|I S.XDo |
|00005060| 6e 6f 74 20 73 65 74 20 | 63 72 74 20 6c 69 6e 65 |not set |crt line|
|00005070| 20 65 64 69 74 69 6e 67 | 20 6d 6f 64 65 73 2e 0a | editing| modes..|
|00005080| 58 2e 54 50 0a 58 2e 49 | 20 30 0a 58 41 6e 20 61 |X.TP.X.I| 0.XAn a|
|00005090| 62 62 72 65 76 69 61 74 | 69 6f 6e 20 66 6f 72 20 |bbreviat|ion for |
|000050a0| 70 63 45 4e 2e 0a 58 2e | 52 45 0a 58 2e 54 50 0a |pcEN..X.|RE.X.TP.|
|000050b0| 58 5c 66 42 5c 2d 78 5c | 66 49 73 73 73 0a 58 55 |X\fB\-x\|fIsss.XU|
|000050c0| 73 65 20 73 65 63 75 72 | 69 74 79 2c 20 65 78 70 |se secur|ity, exp|
|000050d0| 65 72 69 6d 65 6e 74 61 | 6c 2c 20 6f 72 20 65 78 |erimenta|l, or ex|
|000050e0| 74 65 6e 64 65 64 20 6d | 65 61 73 75 72 65 73 20 |tended m|easures |
|000050f0| 73 70 65 63 69 66 69 65 | 64 20 62 79 0a 58 2e 49 |specifie|d by.X.I|
|00005100| 20 73 2e 0a 58 53 6f 6d | 65 20 6f 66 20 74 68 65 | s..XSom|e of the|
|00005110| 73 65 20 6d 61 79 20 62 | 65 20 72 65 71 75 69 72 |se may b|e requir|
|00005120| 65 64 20 6f 72 20 64 69 | 73 61 62 6c 65 64 20 62 |ed or di|sabled b|
|00005130| 79 20 79 6f 75 72 20 73 | 79 73 74 65 6d 20 61 64 |y your s|ystem ad|
|00005140| 6d 69 6e 69 73 74 72 61 | 74 6f 72 2e 0a 58 50 72 |ministra|tor..XPr|
|00005150| 65 64 65 66 69 6e 65 64 | 20 76 61 6c 75 65 73 3a |edefined| values:|
|00005160| 0a 58 2e 52 53 0a 58 2e | 54 50 20 35 0a 58 2e 49 |.X.RS.X.|TP 5.X.I|
|00005170| 20 63 0a 58 43 68 61 6e | 67 65 20 74 68 65 20 6f | c.XChan|ge the o|
|00005180| 77 6e 65 72 73 68 69 70 | 20 61 6e 64 20 70 72 6f |wnership| and pro|
|00005190| 74 65 63 74 69 6f 6e 73 | 20 6f 66 20 74 68 65 20 |tections| of the |
|000051a0| 70 74 79 20 61 70 70 72 | 6f 70 72 69 61 74 65 6c |pty appr|opriatel|
|000051b0| 79 2e 0a 58 54 68 69 73 | 20 72 65 66 6c 65 63 74 |y..XThis| reflect|
|000051c0| 73 20 73 65 76 65 72 61 | 6c 20 65 72 72 6f 72 73 |s severa|l errors|
|000051d0| 20 69 6e 20 74 68 65 0a | 58 2e 49 20 70 74 79 0a | in the.|X.I pty.|
|000051e0| 58 6d 6f 64 65 6c 2c 20 | 62 75 74 20 69 74 27 73 |Xmodel, |but it's|
|000051f0| 20 63 75 73 74 6f 6d 61 | 72 79 2e 0a 58 2e 54 50 | customa|ry..X.TP|
|00005200| 0a 58 2e 49 20 43 0a 58 | 44 6f 20 6e 6f 74 20 63 |.X.I C.X|Do not c|
|00005210| 68 61 6e 67 65 20 70 74 | 79 20 6f 77 6e 65 72 73 |hange pt|y owners|
|00005220| 68 69 70 20 28 64 65 66 | 61 75 6c 74 29 2e 0a 58 |hip (def|ault)..X|
|00005230| 2e 54 50 0a 58 2e 49 20 | 65 0a 58 4f 70 65 6e 20 |.TP.X.I |e.XOpen |
|00005240| 73 74 64 65 72 72 20 77 | 72 69 74 65 2d 6f 6e 6c |stderr w|rite-onl|
|00005250| 79 20 74 6f 20 74 68 65 | 20 70 73 65 75 64 6f 2d |y to the| pseudo-|
|00005260| 74 65 72 6d 69 6e 61 6c | 2e 0a 58 54 68 69 73 20 |terminal|..XThis |
|00005270| 73 68 6f 75 6c 64 20 62 | 65 20 64 65 66 61 75 6c |should b|e defaul|
|00005280| 74 2c 20 62 75 74 20 73 | 75 63 68 20 70 72 6f 67 |t, but s|uch prog|
|00005290| 72 61 6d 73 20 61 73 0a | 58 2e 49 20 63 73 68 0a |rams as.|X.I csh.|
|000052a0| 58 61 6e 64 0a 58 2e 49 | 20 6d 6f 72 65 0a 58 69 |Xand.X.I| more.Xi|
|000052b0| 6e 73 69 73 74 20 6f 6e | 20 72 65 61 64 69 6e 67 |nsist on| reading|
|000052c0| 20 66 72 6f 6d 20 73 74 | 64 65 72 72 20 61 6e 64 | from st|derr and|
|000052d0| 20 64 79 69 6e 67 20 68 | 6f 72 72 69 62 6c 79 0a | dying h|orribly.|
|000052e0| 58 69 66 20 74 68 65 79 | 20 66 61 69 6c 2e 0a 58 |Xif they| fail..X|
|000052f0| 2e 42 5c 2d 78 65 0a 58 | 69 73 20 75 73 65 6c 65 |.B\-xe.X|is usele|
|00005300| 73 73 20 75 6e 64 65 72 | 0a 58 2e 42 5c 2d 65 2e |ss under|.X.B\-e.|
|00005310| 0a 58 2e 54 50 0a 58 2e | 49 20 45 0a 58 4f 70 65 |.X.TP.X.|I E.XOpe|
|00005320| 6e 20 73 74 64 65 72 72 | 20 66 6f 72 20 72 65 61 |n stderr| for rea|
|00005330| 64 69 6e 67 20 61 6e 64 | 20 77 72 69 74 69 6e 67 |ding and| writing|
|00005340| 20 28 64 65 66 61 75 6c | 74 29 2e 0a 58 2e 54 50 | (defaul|t)..X.TP|
|00005350| 0a 58 2e 49 20 75 0a 58 | 45 6e 74 65 72 20 6c 6f |.X.I u.X|Enter lo|
|00005360| 67 69 6e 20 6e 61 6d 65 | 20 69 6e 74 6f 20 2f 65 |gin name| into /e|
|00005370| 74 63 2f 75 74 6d 70 2e | 0a 58 41 73 20 61 20 72 |tc/utmp.|.XAs a r|
|00005380| 75 6c 65 20 6f 66 20 74 | 68 75 6d 62 2c 0a 58 79 |ule of t|humb,.Xy|
|00005390| 6f 75 20 73 68 6f 75 6c | 64 20 64 6f 20 74 68 69 |ou shoul|d do thi|
|000053a0| 73 20 66 6f 72 20 69 6e | 74 65 72 61 63 74 69 76 |s for in|teractiv|
|000053b0| 65 20 73 65 73 73 69 6f | 6e 73 2e 0a 58 2e 54 50 |e sessio|ns..X.TP|
|000053c0| 0a 58 2e 49 20 6e 0a 58 | 55 73 65 20 73 6f 6d 65 |.X.I n.X|Use some|
|000053d0| 20 68 65 75 72 69 73 74 | 69 63 73 20 74 6f 20 74 | heurist|ics to t|
|000053e0| 72 79 20 74 6f 20 66 69 | 67 75 72 65 20 6f 75 74 |ry to fi|gure out|
|000053f0| 20 69 66 20 73 6f 6d 65 | 6f 6e 65 0a 58 68 61 73 | if some|one.Xhas|
|00005400| 20 74 68 65 20 70 74 79 | 20 6f 70 65 6e 20 28 64 | the pty| open (d|
|00005410| 65 66 61 75 6c 74 29 2e | 0a 58 2e 54 50 0a 58 2e |efault).|.X.TP.X.|
|00005420| 49 20 4e 0a 58 44 6f 6e | 27 74 20 77 6f 72 72 79 |I N.XDon|'t worry|
|00005430| 20 61 62 6f 75 74 20 70 | 72 65 2d 6f 70 65 6e 65 | about p|re-opene|
|00005440| 64 20 70 74 79 73 2e 0a | 58 2e 54 50 0a 58 2e 49 |d ptys..|X.TP.X.I|
|00005450| 20 6f 0a 58 53 61 6d 65 | 20 61 73 0a 58 2e 42 5c | o.XSame| as.X.B\|
|00005460| 2d 78 6e 2c 0a 58 62 75 | 74 20 67 6f 20 6f 6e 20 |-xn,.Xbu|t go on |
|00005470| 74 6f 20 74 68 65 20 6e | 65 78 74 20 70 73 65 75 |to the n|ext pseu|
|00005480| 64 6f 2d 74 65 72 6d 69 | 6e 61 6c 0a 58 69 66 20 |do-termi|nal.Xif |
|00005490| 74 68 69 73 20 6f 6e 65 | 20 69 73 20 6f 70 65 6e |this one| is open|
|000054a0| 2e 0a 58 2e 54 50 0a 58 | 2e 49 20 4f 0a 58 44 6f |..X.TP.X|.I O.XDo|
|000054b0| 6e 27 74 20 73 6b 69 70 | 20 70 72 65 2d 6f 70 65 |n't skip| pre-ope|
|000054c0| 6e 65 64 20 70 74 79 73 | 2e 0a 58 2e 54 50 0a 58 |ned ptys|..X.TP.X|
|000054d0| 2e 49 20 72 0a 58 52 61 | 6e 64 6f 6d 20 70 73 65 |.I r.XRa|ndom pse|
|000054e0| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 20 73 65 61 |udo-term|inal sea|
|000054f0| 72 63 68 69 6e 67 20 28 | 64 65 66 61 75 6c 74 29 |rching (|default)|
|00005500| 2e 0a 58 54 68 69 73 20 | 63 61 6e 20 70 72 6f 76 |..XThis |can prov|
|00005510| 69 64 65 20 61 20 68 75 | 67 65 20 62 6f 6f 73 74 |ide a hu|ge boost|
|00005520| 20 74 6f 20 73 70 65 65 | 64 20 61 6e 64 20 73 65 | to spee|d and se|
|00005530| 63 75 72 69 74 79 2e 0a | 58 49 74 20 68 61 73 6e |curity..|XIt hasn|
|00005540| 27 74 20 62 65 65 6e 20 | 75 73 65 64 20 62 65 63 |'t been |used bec|
|00005550| 61 75 73 65 20 70 72 6f | 67 72 61 6d 6d 65 72 73 |ause pro|grammers|
|00005560| 20 64 6f 6e 27 74 20 72 | 65 61 6c 69 7a 65 0a 58 | don't r|ealize.X|
|00005570| 74 68 65 20 76 69 72 74 | 75 65 73 20 6f 66 20 6d |the virt|ues of m|
|00005580| 6f 64 75 6c 61 72 69 74 | 79 2c 20 61 72 65 20 63 |odularit|y, are c|
|00005590| 6f 6e 73 65 71 75 65 6e | 74 6c 79 20 74 6f 6f 20 |onsequen|tly too |
|000055a0| 6c 61 7a 79 20 74 6f 0a | 58 77 72 69 74 65 20 73 |lazy to.|Xwrite s|
|000055b0| 6f 6d 65 74 68 69 6e 67 | 20 6c 69 6b 65 0a 58 2e |omething| like.X.|
|000055c0| 49 20 70 74 79 2c 0a 58 | 61 6e 64 20 64 6f 6e 27 |I pty,.X|and don'|
|000055d0| 74 20 77 61 6e 74 20 74 | 6f 20 74 61 6b 65 20 74 |t want t|o take t|
|000055e0| 68 65 20 65 66 66 6f 72 | 74 20 66 6f 72 20 72 61 |he effor|t for ra|
|000055f0| 6e 64 6f 6d 20 70 74 79 | 20 73 65 61 72 63 68 69 |ndom pty| searchi|
|00005600| 6e 67 0a 58 69 6e 20 65 | 76 65 72 79 20 70 72 6f |ng.Xin e|very pro|
|00005610| 67 72 61 6d 20 74 68 61 | 74 20 75 73 65 73 20 70 |gram tha|t uses p|
|00005620| 73 65 75 64 6f 2d 74 65 | 72 6d 69 6e 61 6c 73 2e |seudo-te|rminals.|
|00005630| 0a 58 2e 54 50 0a 58 2e | 49 20 52 0a 58 53 74 72 |.X.TP.X.|I R.XStr|
|00005640| 61 69 67 68 74 20 70 74 | 79 20 73 65 61 72 63 68 |aight pt|y search|
|00005650| 69 6e 67 2c 20 66 72 6f | 6d 20 74 68 65 20 62 6f |ing, fro|m the bo|
|00005660| 74 74 6f 6d 20 6f 6e 20 | 75 70 2e 0a 58 2e 54 50 |ttom on |up..X.TP|
|00005670| 0a 58 2e 49 20 73 0a 58 | 53 65 74 75 69 64 20 28 |.X.I s.X|Setuid (|
|00005680| 64 65 66 61 75 6c 74 29 | 2e 0a 58 2e 49 20 70 74 |default)|..X.I pt|
|00005690| 79 20 0a 58 77 69 6c 6c | 20 75 73 65 20 61 20 63 |y .Xwill| use a c|
|000056a0| 6f 6d 6d 6f 6e 20 64 69 | 72 65 63 74 6f 72 79 0a |ommon di|rectory.|
|000056b0| 58 66 6f 72 20 73 74 6f | 72 69 6e 67 20 73 65 73 |Xfor sto|ring ses|
|000056c0| 73 69 6f 6e 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |sion inf|ormation|
|000056d0| 2e 0a 58 2e 54 50 0a 58 | 2e 49 20 53 0a 58 4e 6f |..X.TP.X|.I S.XNo|
|000056e0| 74 20 73 65 74 75 69 64 | 2e 0a 58 2e 49 20 70 74 |t setuid|..X.I pt|
|000056f0| 79 0a 58 77 69 6c 6c 20 | 72 65 76 6f 6b 65 20 61 |y.Xwill |revoke a|
|00005700| 6c 6c 20 70 72 69 76 69 | 6c 65 67 65 73 20 61 6e |ll privi|leges an|
|00005710| 64 0a 58 75 73 65 20 61 | 20 73 75 62 64 69 72 65 |d.Xuse a| subdire|
|00005720| 63 74 6f 72 79 20 6f 66 | 20 79 6f 75 72 20 48 4f |ctory of| your HO|
|00005730| 4d 45 20 64 69 72 65 63 | 74 6f 72 79 2e 0a 58 2e |ME direc|tory..X.|
|00005740| 54 50 0a 58 2e 49 20 55 | 0a 58 44 6f 20 6e 6f 74 |TP.X.I U|.XDo not|
|00005750| 20 75 73 65 20 75 74 6d | 70 20 28 64 65 66 61 75 | use utm|p (defau|
|00005760| 6c 74 29 2e 0a 58 2e 54 | 50 0a 58 2e 49 20 77 0a |lt)..X.T|P.X.I w.|
|00005770| 58 4d 61 6b 65 20 61 6e | 20 65 6e 74 72 79 20 69 |XMake an| entry i|
|00005780| 6e 20 2f 75 73 72 2f 61 | 64 6d 2f 77 74 6d 70 2e |n /usr/a|dm/wtmp.|
|00005790| 0a 58 54 68 69 73 20 70 | 72 6f 62 61 62 6c 79 20 |.XThis p|robably |
|000057a0| 69 73 6e 27 74 20 61 20 | 67 6f 6f 64 20 69 64 65 |isn't a |good ide|
|000057b0| 61 20 66 6f 72 20 67 65 | 6e 65 72 61 6c 20 75 73 |a for ge|neral us|
|000057c0| 65 2c 0a 58 61 73 0a 58 | 63 6f 6e 6e 65 63 74 69 |e,.Xas.X|connecti|
|000057d0| 6f 6e 20 74 69 6d 65 20 | 72 65 63 6f 72 64 65 64 |on time |recorded|
|000057e0| 20 69 6e 0a 58 2e 49 20 | 77 74 6d 70 0a 58 69 73 | in.X.I |wtmp.Xis|
|000057f0| 20 6f 66 74 65 6e 20 70 | 72 65 73 73 65 64 20 69 | often p|ressed i|
|00005800| 6e 74 6f 20 75 6e 66 6f | 72 74 75 6e 61 74 65 20 |nto unfo|rtunate |
|00005810| 73 65 72 76 69 63 65 20 | 61 73 0a 58 61 20 73 65 |service |as.Xa se|
|00005820| 6e 73 65 6c 65 73 73 20 | 62 61 73 69 73 20 66 6f |nseless |basis fo|
|00005830| 72 20 63 68 61 72 67 65 | 64 20 63 6f 6d 70 75 74 |r charge|d comput|
|00005840| 65 72 20 74 69 6d 65 2e | 0a 58 2e 54 50 0a 58 2e |er time.|.X.TP.X.|
|00005850| 49 20 57 0a 58 44 6f 20 | 6e 6f 74 20 75 73 65 20 |I W.XDo |not use |
|00005860| 77 74 6d 70 20 28 64 65 | 66 61 75 6c 74 29 2e 0a |wtmp (de|fault)..|
|00005870| 58 2e 54 50 0a 58 2e 49 | 20 78 0a 58 53 65 74 20 |X.TP.X.I| x.XSet |
|00005880| 65 78 63 6c 75 73 69 76 | 65 20 75 73 65 20 6f 6e |exclusiv|e use on|
|00005890| 20 74 68 65 20 70 74 79 | 2e 0a 58 4e 6f 20 70 72 | the pty|..XNo pr|
|000058a0| 6f 63 65 73 73 65 73 20 | 63 61 6e 20 6f 70 65 6e |ocesses |can open|
|000058b0| 20 74 68 65 20 70 74 79 | 20 61 66 74 65 72 20 74 | the pty| after t|
|000058c0| 68 69 73 3b 0a 58 2e 49 | 20 70 72 6f 67 72 61 6d |his;.X.I| program|
|000058d0| 0a 58 63 61 6e 27 74 20 | 65 76 65 6e 20 72 65 6f |.Xcan't |even reo|
|000058e0| 70 65 6e 0a 58 2f 64 65 | 76 2f 74 74 79 21 0a 58 |pen.X/de|v/tty!.X|
|000058f0| 28 49 74 20 63 61 6e 20 | 75 73 65 20 66 69 6c 65 |(It can |use file|
|00005900| 20 64 65 73 63 72 69 70 | 74 6f 72 20 33 20 69 6e | descrip|tor 3 in|
|00005910| 73 74 65 61 64 2e 29 0a | 58 54 68 69 73 20 63 61 |stead.).|XThis ca|
|00005920| 6e 20 62 65 20 76 65 72 | 79 20 69 6d 70 6f 72 74 |n be ver|y import|
|00005930| 61 6e 74 20 66 6f 72 20 | 73 65 63 75 72 69 74 79 |ant for |security|
|00005940| 20 77 68 65 6e 0a 58 2e | 49 20 70 74 79 0a 58 68 | when.X.|I pty.Xh|
|00005950| 61 73 20 6e 6f 74 20 62 | 65 65 6e 20 69 6e 73 74 |as not b|een inst|
|00005960| 61 6c 6c 65 64 20 62 79 | 20 74 68 65 20 73 79 73 |alled by| the sys|
|00005970| 74 65 6d 20 61 64 6d 69 | 6e 69 73 74 72 61 74 6f |tem admi|nistrato|
|00005980| 72 2e 0a 58 49 74 20 73 | 68 6f 75 6c 64 20 62 65 |r..XIt s|hould be|
|00005990| 20 73 65 74 20 61 6c 6c | 20 74 68 65 20 74 69 6d | set all| the tim|
|000059a0| 65 2c 20 62 75 74 0a 58 | 74 6f 6f 20 6d 61 6e 79 |e, but.X|too many|
|000059b0| 20 70 72 6f 67 72 61 6d | 73 20 72 65 6c 79 20 6f | program|s rely o|
|000059c0| 6e 20 61 20 66 69 6c 65 | 6e 61 6d 65 20 66 6f 72 |n a file|name for|
|000059d0| 20 74 68 65 20 74 65 72 | 6d 69 6e 61 6c 2e 0a 58 | the ter|minal..X|
|000059e0| 2e 54 50 0a 58 2e 49 20 | 58 0a 58 44 6f 20 6e 6f |.TP.X.I |X.XDo no|
|000059f0| 74 20 73 65 74 20 65 78 | 63 6c 75 73 69 76 65 20 |t set ex|clusive |
|00005a00| 75 73 65 20 28 64 65 66 | 61 75 6c 74 29 2e 0a 58 |use (def|ault)..X|
|00005a10| 2e 52 45 0a 58 2e 50 50 | 0a 58 2e 53 48 20 44 49 |.RE.X.PP|.X.SH DI|
|00005a20| 41 47 4e 4f 53 54 49 43 | 53 0a 58 2e 54 50 0a 58 |AGNOSTIC|S.X.TP.X|
|00005a30| 76 61 72 69 6f 75 73 20 | 75 73 61 67 65 20 6d 65 |various |usage me|
|00005a40| 73 73 61 67 65 73 0a 58 | 45 78 69 74 20 31 2e 0a |ssages.X|Exit 1..|
|00005a50| 58 2e 54 50 0a 58 2e 49 | 20 66 61 74 61 6c 3a 20 |X.TP.X.I| fatal: |
|00005a60| 63 61 6e 6e 6f 74 20 66 | 69 6e 64 20 63 6f 6e 74 |cannot f|ind cont|
|00005a70| 72 6f 6c 20 74 65 72 6d | 69 6e 61 6c 0a 58 2e 49 |rol term|inal.X.I|
|00005a80| 20 70 74 79 0a 58 69 73 | 20 75 6e 61 62 6c 65 20 | pty.Xis| unable |
|00005a90| 74 6f 20 66 69 6e 64 20 | 69 74 73 20 63 75 72 72 |to find |its curr|
|00005aa0| 65 6e 74 20 63 6f 6e 74 | 72 6f 6c 20 74 65 72 6d |ent cont|rol term|
|00005ab0| 69 6e 61 6c 2e 0a 58 45 | 78 69 74 20 32 2e 0a 58 |inal..XE|xit 2..X|
|00005ac0| 2e 54 50 0a 58 2e 49 20 | 66 61 74 61 6c 3a 20 63 |.TP.X.I |fatal: c|
|00005ad0| 61 6e 6e 6f 74 20 67 65 | 74 20 63 75 72 72 65 6e |annot ge|t curren|
|00005ae0| 74 20 74 74 79 20 6d 6f | 64 65 73 0a 58 54 68 69 |t tty mo|des.XThi|
|00005af0| 73 20 73 68 6f 75 6c 64 | 6e 27 74 20 68 61 70 70 |s should|n't happ|
|00005b00| 65 6e 2e 0a 58 45 78 69 | 74 20 33 2e 0a 58 2e 54 |en..XExi|t 3..X.T|
|00005b10| 50 0a 58 2e 49 20 66 61 | 74 61 6c 3a 20 63 61 6e |P.X.I fa|tal: can|
|00005b20| 6e 6f 74 20 73 65 74 20 | 6d 6f 64 65 73 20 6f 66 |not set |modes of|
|00005b30| 20 6f 72 69 67 69 6e 61 | 6c 20 74 74 79 0a 58 54 | origina|l tty.XT|
|00005b40| 68 69 73 20 73 68 6f 75 | 6c 64 6e 27 74 20 68 61 |his shou|ldn't ha|
|00005b50| 70 70 65 6e 2e 0a 58 45 | 78 69 74 20 34 2e 0a 58 |ppen..XE|xit 4..X|
|00005b60| 2e 54 50 0a 58 2e 49 20 | 66 61 74 61 6c 3a 20 6e |.TP.X.I |fatal: n|
|00005b70| 6f 20 70 74 79 73 20 61 | 76 61 69 6c 61 62 6c 65 |o ptys a|vailable|
|00005b80| 0a 58 53 65 6c 66 2d 65 | 78 70 6c 61 6e 61 74 6f |.XSelf-e|xplanato|
|00005b90| 72 79 2e 0a 58 45 78 69 | 74 20 35 2e 0a 58 2e 54 |ry..XExi|t 5..X.T|
|00005ba0| 50 0a 58 2e 49 20 66 61 | 74 61 6c 3a 20 63 61 6e |P.X.I fa|tal: can|
|00005bb0| 27 74 20 66 63 6e 74 6c | 20 70 74 79 0a 58 2e 54 |'t fcntl| pty.X.T|
|00005bc0| 50 0a 58 2e 49 20 66 61 | 74 61 6c 3a 20 73 6c 61 |P.X.I fa|tal: sla|
|00005bd0| 76 65 20 75 6e 6f 70 65 | 6e 61 62 6c 65 0a 58 54 |ve unope|nable.XT|
|00005be0| 68 65 72 65 27 73 20 61 | 20 73 65 72 69 6f 75 73 |here's a| serious|
|00005bf0| 20 70 72 6f 62 6c 65 6d | 20 77 69 74 68 20 79 6f | problem| with yo|
|00005c00| 75 72 20 70 73 65 75 64 | 6f 2d 74 65 72 6d 69 6e |ur pseud|o-termin|
|00005c10| 61 6c 20 73 65 74 75 70 | 2e 0a 58 52 65 70 6f 72 |al setup|..XRepor|
|00005c20| 74 20 74 68 69 73 20 65 | 72 72 6f 72 20 74 6f 20 |t this e|rror to |
|00005c30| 79 6f 75 72 20 73 79 73 | 74 65 6d 20 61 64 6d 69 |your sys|tem admi|
|00005c40| 6e 69 73 74 72 61 74 6f | 72 2e 0a 58 45 78 69 74 |nistrato|r..XExit|
|00005c50| 20 36 2e 0a 58 2e 54 50 | 0a 58 2e 49 20 66 61 74 | 6..X.TP|.X.I fat|
|00005c60| 61 6c 3a 20 63 61 6e 6e | 6f 74 20 66 6f 72 6b 0a |al: cann|ot fork.|
|00005c70| 58 2e 49 20 70 74 79 0a | 58 68 61 73 20 72 75 6e |X.I pty.|Xhas run|
|00005c80| 20 6f 75 74 20 6f 66 20 | 70 72 6f 63 65 73 73 65 | out of |processe|
|00005c90| 73 2e 0a 58 45 78 69 74 | 20 37 2e 0a 58 2e 54 50 |s..XExit| 7..X.TP|
|00005ca0| 0a 58 2e 49 20 66 61 74 | 61 6c 3a 20 63 61 6e 6e |.X.I fat|al: cann|
|00005cb0| 6f 74 20 63 68 61 6e 67 | 65 20 74 6f 20 73 65 73 |ot chang|e to ses|
|00005cc0| 73 69 6f 6e 20 64 69 72 | 65 63 74 6f 72 79 0a 58 |sion dir|ectory.X|
|00005cd0| 53 65 6c 66 2d 65 78 70 | 6c 61 6e 61 74 6f 72 79 |Self-exp|lanatory|
|00005ce0| 2e 0a 58 45 78 69 74 20 | 38 2e 0a 58 2e 54 50 0a |..XExit |8..X.TP.|
|00005cf0| 58 2e 49 20 66 61 74 61 | 6c 3a 20 63 61 6e 6e 6f |X.I fata|l: canno|
|00005d00| 74 20 6f 70 65 6e 20 69 | 6e 74 65 72 6e 61 6c 20 |t open i|nternal |
|00005d10| 70 69 70 65 2e 0a 58 43 | 61 6e 6e 6f 74 20 68 61 |pipe..XC|annot ha|
|00005d20| 70 70 65 6e 2e 0a 58 45 | 78 69 74 20 31 30 2e 0a |ppen..XE|xit 10..|
|00005d30| 58 2e 54 50 0a 58 2e 49 | 20 66 61 74 61 6c 3a 20 |X.TP.X.I| fatal: |
|00005d40| 73 6f 63 6b 65 74 20 72 | 65 61 64 20 65 72 72 6f |socket r|ead erro|
|00005d50| 72 0a 58 53 65 6c 66 2d | 65 78 70 6c 61 6e 61 74 |r.XSelf-|explanat|
|00005d60| 6f 72 79 2e 20 45 78 69 | 74 20 31 31 2e 0a 58 2e |ory. Exi|t 11..X.|
|00005d70| 54 50 0a 58 2e 49 20 66 | 61 74 61 6c 3a 20 73 6f |TP.X.I f|atal: so|
|00005d80| 63 6b 65 74 20 77 72 69 | 74 65 20 65 72 72 6f 72 |cket wri|te error|
|00005d90| 0a 58 53 65 6c 66 2d 65 | 78 70 6c 61 6e 61 74 6f |.XSelf-e|xplanato|
|00005da0| 72 79 2e 20 45 78 69 74 | 20 31 32 2e 0a 58 2e 54 |ry. Exit| 12..X.T|
|00005db0| 50 0a 58 2e 49 20 66 61 | 74 61 6c 3a 20 69 6e 70 |P.X.I fa|tal: inp|
|00005dc0| 75 74 20 72 65 61 64 20 | 65 72 72 6f 72 0a 58 53 |ut read |error.XS|
|00005dd0| 65 6c 66 2d 65 78 70 6c | 61 6e 61 74 6f 72 79 2e |elf-expl|anatory.|
|00005de0| 20 45 78 69 74 20 31 33 | 2e 0a 58 2e 54 50 0a 58 | Exit 13|..X.TP.X|
|00005df0| 2e 49 20 66 61 74 61 6c | 3a 20 6f 75 74 70 75 74 |.I fatal|: output|
|00005e00| 20 77 72 69 74 65 20 65 | 72 72 6f 72 0a 58 53 65 | write e|rror.XSe|
|00005e10| 6c 66 2d 65 78 70 6c 61 | 6e 61 74 6f 72 79 2e 20 |lf-expla|natory. |
|00005e20| 45 78 69 74 20 31 34 2e | 0a 58 2e 53 48 20 52 45 |Exit 14.|.X.SH RE|
|00005e30| 53 54 52 49 43 54 49 4f | 4e 53 0a 58 54 68 65 72 |STRICTIO|NS.XTher|
|00005e40| 65 20 61 72 65 20 6d 61 | 6e 79 20 73 65 63 75 72 |e are ma|ny secur|
|00005e50| 69 74 79 20 70 72 6f 62 | 6c 65 6d 73 0a 58 61 6e |ity prob|lems.Xan|
|00005e60| 64 20 6c 69 6d 69 74 61 | 74 69 6f 6e 73 20 61 73 |d limita|tions as|
|00005e70| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 20 42 53 |sociated| with BS|
|00005e80| 44 2d 73 74 79 6c 65 20 | 74 74 79 73 2e 0a 58 2e |D-style |ttys..X.|
|00005e90| 49 20 70 74 79 0a 58 64 | 6f 65 73 20 69 74 73 20 |I pty.Xd|oes its |
|00005ea0| 62 65 73 74 20 74 6f 20 | 61 76 6f 69 64 20 74 68 |best to |avoid th|
|00005eb0| 65 6d 2c 0a 58 62 75 74 | 20 61 20 53 74 72 65 61 |em,.Xbut| a Strea|
|00005ec0| 6d 73 2d 62 61 73 65 64 | 20 73 79 73 74 65 6d 20 |ms-based| system |
|00005ed0| 77 6f 75 6c 64 20 62 65 | 20 6d 75 63 68 20 62 65 |would be| much be|
|00005ee0| 74 74 65 72 2e 0a 58 54 | 68 65 20 61 75 74 68 6f |tter..XT|he autho|
|00005ef0| 72 20 70 6c 61 6e 73 20 | 74 6f 20 72 65 77 72 69 |r plans |to rewri|
|00005f00| 74 65 0a 58 2e 49 20 70 | 74 79 2c 0a 58 77 69 74 |te.X.I p|ty,.Xwit|
|00005f10| 68 20 74 68 65 20 73 61 | 6d 65 20 69 6e 74 65 72 |h the sa|me inter|
|00005f20| 66 61 63 65 2c 0a 58 66 | 6f 72 20 61 20 53 74 72 |face,.Xf|or a Str|
|00005f30| 65 61 6d 73 20 73 79 73 | 74 65 6d 2e 0a 58 2e 50 |eams sys|tem..X.P|
|00005f40| 50 0a 58 54 68 65 20 63 | 75 72 72 65 6e 74 0a 58 |P.XThe c|urrent.X|
|00005f50| 2e 42 5c 2d 4a 0a 58 62 | 65 68 61 76 69 6f 72 20 |.B\-J.Xb|ehavior |
|00005f60| 69 73 20 61 20 62 69 74 | 20 64 75 6c 6c 2e 0a 58 |is a bit| dull..X|
|00005f70| 49 20 77 69 73 68 20 70 | 72 6f 67 72 61 6d 73 20 |I wish p|rograms |
|00005f80| 77 6f 75 6c 64 20 75 73 | 65 20 74 68 65 20 6a 6f |would us|e the jo|
|00005f90| 62 20 63 6f 6e 74 72 6f | 6c 0a 58 6d 65 63 68 61 |b contro|l.Xmecha|
|00005fa0| 6e 69 73 6d 73 20 6d 6f | 72 65 20 63 6c 65 61 6e |nisms mo|re clean|
|00005fb0| 6c 79 2e 0a 58 2e 50 50 | 0a 58 54 6f 20 61 76 6f |ly..X.PP|.XTo avo|
|00005fc0| 69 64 20 61 20 72 61 63 | 65 20 63 6f 6e 64 69 74 |id a rac|e condit|
|00005fd0| 69 6f 6e 2c 0a 58 2e 49 | 20 70 74 79 0a 58 63 68 |ion,.X.I| pty.Xch|
|00005fe0| 65 77 73 20 75 70 20 61 | 20 74 69 6e 79 20 62 69 |ews up a| tiny bi|
|00005ff0| 74 20 6d 6f 72 65 20 43 | 50 55 20 74 69 6d 65 20 |t more C|PU time |
|00006000| 74 68 61 6e 20 69 74 20 | 73 68 6f 75 6c 64 20 65 |than it |should e|
|00006010| 76 65 72 79 0a 58 74 69 | 6d 65 0a 58 2e 49 20 70 |very.Xti|me.X.I p|
|00006020| 72 6f 67 72 61 6d 0a 58 | 69 73 20 73 74 6f 70 70 |rogram.X|is stopp|
|00006030| 65 64 20 61 6e 64 20 74 | 68 65 6e 20 72 65 73 74 |ed and t|hen rest|
|00006040| 61 72 74 65 64 2e 0a 58 | 2e 50 50 0a 58 49 66 0a |arted..X|.PP.XIf.|
|00006050| 58 2e 49 20 70 72 6f 67 | 72 61 6d 0a 58 63 6c 6f |X.I prog|ram.Xclo|
|00006060| 73 65 73 20 74 68 65 20 | 70 73 65 75 64 6f 2d 74 |ses the |pseudo-t|
|00006070| 65 72 6d 69 6e 61 6c 20 | 62 75 74 20 64 6f 65 73 |erminal |but does|
|00006080| 6e 27 74 20 64 69 65 2c | 0a 58 2e 49 20 70 74 79 |n't die,|.X.I pty|
|00006090| 0a 58 77 69 6c 6c 20 77 | 61 69 74 20 66 6f 72 20 |.Xwill w|ait for |
|000060a0| 69 74 2c 20 65 76 65 6e | 20 74 68 6f 75 67 68 20 |it, even| though |
|000060b0| 69 74 20 77 69 6c 6c 20 | 68 61 76 65 20 6e 6f 20 |it will |have no |
|000060c0| 66 75 72 74 68 65 72 20 | 69 6e 74 65 72 61 63 74 |further |interact|
|000060d0| 69 6f 6e 20 77 69 74 68 | 0a 58 69 74 2e 0a 58 2e |ion with|.Xit..X.|
|000060e0| 50 50 0a 58 2e 49 20 70 | 74 79 0a 58 64 6f 65 73 |PP.X.I p|ty.Xdoes|
|000060f0| 20 6e 6f 74 20 70 72 6f | 76 69 64 65 20 61 6e 79 | not pro|vide any|
|00006100| 20 77 61 79 20 74 6f 20 | 6c 6f 75 64 6c 79 20 70 | way to |loudly p|
|00006110| 72 6f 63 6c 61 69 6d 20 | 74 68 61 74 0a 58 2e 49 |roclaim |that.X.I|
|00006120| 20 70 72 6f 67 72 61 6d | 0a 58 64 6f 65 73 6e 27 | program|.Xdoesn'|
|00006130| 74 20 65 78 69 73 74 2e | 0a 58 49 74 20 73 69 6d |t exist.|.XIt sim|
|00006140| 70 6c 79 20 64 69 65 73 | 20 71 75 69 65 74 6c 79 |ply dies| quietly|
|00006150| 2e 0a 58 2e 50 50 0a 58 | 42 65 63 61 75 73 65 20 |..X.PP.X|Because |
|00006160| 6f 66 20 42 53 44 27 73 | 20 72 69 64 69 63 75 6c |of BSD's| ridicul|
|00006170| 6f 75 73 20 63 6f 6e 74 | 72 6f 6c 6c 69 6e 67 20 |ous cont|rolling |
|00006180| 74 65 72 6d 69 6e 61 6c | 20 6d 65 63 68 61 6e 69 |terminal| mechani|
|00006190| 73 6d 2c 0a 58 61 20 72 | 65 63 6f 6e 6e 65 63 74 |sm,.Xa r|econnect|
|000061a0| 69 6e 67 0a 58 2e 49 20 | 70 74 79 0a 58 68 61 73 |ing.X.I |pty.Xhas|
|000061b0| 20 74 6f 0a 58 70 61 73 | 73 20 74 68 65 20 6e 61 | to.Xpas|s the na|
|000061c0| 6d 65 20 6f 66 20 69 74 | 73 20 6f 72 69 67 69 6e |me of it|s origin|
|000061d0| 61 6c 20 74 65 72 6d 69 | 6e 61 6c 0a 58 74 6f 20 |al termi|nal.Xto |
|000061e0| 74 68 65 20 73 65 73 73 | 69 6f 6e 20 75 6e 64 65 |the sess|ion unde|
|000061f0| 72 6e 65 61 74 68 2e 0a | 58 53 69 6e 63 65 20 74 |rneath..|XSince t|
|00006200| 68 65 72 65 20 69 73 20 | 6e 6f 20 70 6f 72 74 61 |here is |no porta|
|00006210| 62 6c 65 20 77 61 79 20 | 74 6f 20 66 69 6e 64 20 |ble way |to find |
|00006220| 6f 75 74 20 74 68 61 74 | 20 6e 61 6d 65 2c 0a 58 |out that| name,.X|
|00006230| 2e 49 20 70 74 79 0a 58 | 72 65 71 75 69 72 65 73 |.I pty.X|requires|
|00006240| 20 74 68 61 74 20 73 6f | 6d 65 20 66 69 6c 65 20 | that so|me file |
|00006250| 64 65 73 63 72 69 70 74 | 6f 72 20 62 65 20 6f 70 |descript|or be op|
|00006260| 65 6e 2c 20 70 6f 69 6e | 74 69 6e 67 0a 58 74 6f |en, poin|ting.Xto|
|00006270| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 74 65 72 | the cur|rent ter|
|00006280| 6d 69 6e 61 6c 0a 58 2e | 49 20 28 6e 6f 74 0a 58 |minal.X.|I (not.X|
|00006290| 2f 64 65 76 2f 74 74 79 | 21 29 2e 0a 58 28 4d 6f |/dev/tty|!)..X(Mo|
|000062a0| 72 65 20 70 72 65 63 69 | 73 65 6c 79 2c 0a 58 74 |re preci|sely,.Xt|
|000062b0| 68 65 20 68 69 67 68 65 | 73 74 2d 6e 75 6d 62 65 |he highe|st-numbe|
|000062c0| 72 65 64 20 66 69 6c 65 | 20 64 65 73 63 72 69 70 |red file| descrip|
|000062d0| 74 6f 72 20 74 68 61 74 | 0a 58 69 73 20 61 20 74 |tor that|.Xis a t|
|000062e0| 65 72 6d 69 6e 61 6c 20 | 66 69 6c 65 20 62 75 74 |erminal |file but|
|000062f0| 20 6e 6f 74 20 2f 64 65 | 76 2f 74 74 79 0a 58 6d | not /de|v/tty.Xm|
|00006300| 75 73 74 20 62 65 20 74 | 68 65 20 72 65 61 6c 20 |ust be t|he real |
|00006310| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 6f 72 69 67 |name of |the orig|
|00006320| 69 6e 61 6c 20 63 6f 6e | 74 72 6f 6c 6c 69 6e 67 |inal con|trolling|
|00006330| 20 74 65 72 6d 69 6e 61 | 6c 2e 0a 58 54 68 61 74 | termina|l..XThat|
|00006340| 27 73 20 6f 6e 65 20 67 | 6f 6f 64 20 75 73 65 20 |'s one g|ood use |
|00006350| 66 6f 72 20 66 64 20 33 | 2e 0a 58 49 66 20 74 68 |for fd 3|..XIf th|
|00006360| 61 74 20 66 69 6c 65 20 | 64 65 73 63 72 69 70 74 |at file |descript|
|00006370| 6f 72 20 69 73 20 73 6f | 6d 65 20 6f 74 68 65 72 |or is so|me other|
|00006380| 20 74 65 72 6d 69 6e 61 | 6c 2c 0a 58 74 68 65 20 | termina|l,.Xthe |
|00006390| 72 65 63 6f 6e 6e 65 63 | 74 20 77 69 6c 6c 20 66 |reconnec|t will f|
|000063a0| 61 69 6c 20 6d 69 73 65 | 72 61 62 6c 79 2e 29 0a |ail mise|rably.).|
|000063b0| 58 2e 53 48 20 42 55 47 | 53 0a 58 4e 6f 6e 65 20 |X.SH BUG|S.XNone |
|000063c0| 6b 6e 6f 77 6e 2c 20 62 | 75 74 20 74 68 65 79 27 |known, b|ut they'|
|000063d0| 72 65 20 70 72 6f 62 61 | 62 6c 79 20 68 69 64 69 |re proba|bly hidi|
|000063e0| 6e 67 20 73 6f 6d 65 77 | 68 65 72 65 2e 0a 58 49 |ng somew|here..XI|
|000063f0| 74 20 69 73 20 74 68 65 | 20 61 75 74 68 6f 72 27 |t is the| author'|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.