home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news 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| 34 3a 20 20 52 75 6e 20 | 61 20 70 72 6f 67 72 61 |4: 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 34 2f 30 36 |ssion, P|art04/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 63 |ecksum-S|nefru: c|
|00000090| 63 65 65 64 61 35 62 20 | 65 32 31 33 64 66 62 32 |ceeda5b |e213dfb2|
|000000a0| 20 64 39 64 62 32 31 34 | 63 20 31 62 38 34 36 62 | d9db214|c 1b846b|
|000000b0| 61 62 0a 0a 53 75 62 6d | 69 74 74 65 64 2d 62 79 |ab..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| 34 0a 41 72 63 68 69 76 | 65 2d 6e 61 6d 65 3a 20 |4.Archiv|e-name: |
|00000120| 70 74 79 2f 70 61 72 74 | 30 34 0a 0a 23 21 20 2f |pty/part|04..#! /|
|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 43 4f 50 59 | Content|s: COPY|
|00000280| 52 49 47 48 54 20 51 55 | 45 53 54 49 4f 4e 53 20 |RIGHT QU|ESTIONS |
|00000290| 54 45 53 54 53 20 70 61 | 74 63 68 2f 4d 61 6b 65 |TESTS pa|tch/Make|
|000002a0| 66 69 6c 65 20 70 61 74 | 63 68 2f 52 45 41 44 4d |file pat|ch/READM|
|000002b0| 45 0a 23 20 20 20 73 69 | 67 2e 63 20 73 6c 61 76 |E.# si|g.c slav|
|000002c0| 65 2e 63 20 74 65 78 74 | 73 2e 63 20 75 74 69 6c |e.c text|s.c util|
|000002d0| 2f 62 69 66 66 2e 63 20 | 75 74 69 6c 2f 73 65 73 |/biff.c |util/ses|
|000002e0| 73 6c 69 73 74 2e 63 20 | 75 74 69 6c 2f 73 65 73 |slist.c |util/ses|
|000002f0| 73 75 73 65 72 2e 31 0a | 23 20 20 20 75 74 69 6c |suser.1.|# util|
|00000300| 2f 73 65 73 73 75 73 65 | 72 2e 63 20 75 74 69 6c |/sessuse|r.c util|
|00000310| 2f 73 65 73 73 75 74 69 | 6c 2e 63 20 75 74 69 6c |/sessuti|l.c util|
|00000320| 2f 77 72 69 74 65 2e 63 | 20 75 74 69 6c 2f 78 73 |/write.c| util/xs|
|00000330| 65 73 73 75 74 69 6c 2e | 63 0a 23 20 57 72 61 70 |essutil.|c.# Wrap|
|00000340| 70 65 64 20 62 79 20 72 | 73 61 6c 7a 40 6c 69 74 |ped by r|salz@lit|
|00000350| 63 68 69 2e 62 62 6e 2e | 63 6f 6d 20 6f 6e 20 57 |chi.bbn.|com on W|
|00000360| 65 64 20 4f 63 74 20 31 | 30 20 31 30 3a 31 31 3a |ed Oct 1|0 10:11:|
|00000370| 33 39 20 31 39 39 30 0a | 50 41 54 48 3d 2f 62 69 |39 1990.|PATH=/bi|
|00000380| 6e 3a 2f 75 73 72 2f 62 | 69 6e 3a 2f 75 73 72 2f |n:/usr/b|in:/usr/|
|00000390| 75 63 62 20 3b 20 65 78 | 70 6f 72 74 20 50 41 54 |ucb ; ex|port PAT|
|000003a0| 48 0a 65 63 68 6f 20 49 | 66 20 74 68 69 73 20 61 |H.echo I|f this a|
|000003b0| 72 63 68 69 76 65 20 69 | 73 20 63 6f 6d 70 6c 65 |rchive i|s comple|
|000003c0| 74 65 2c 20 79 6f 75 20 | 77 69 6c 6c 20 73 65 65 |te, you |will see|
|000003d0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|000003e0| 65 73 73 61 67 65 3a 0a | 65 63 68 6f 20 27 20 20 |essage:.|echo ' |
|000003f0| 20 20 20 20 20 20 20 20 | 22 73 68 61 72 3a 20 45 | |"shar: E|
|00000400| 6e 64 20 6f 66 20 61 72 | 63 68 69 76 65 20 34 20 |nd of ar|chive 4 |
|00000410| 28 6f 66 20 36 29 2e 22 | 27 0a 69 66 20 74 65 73 |(of 6)."|'.if tes|
|00000420| 74 20 2d 66 20 27 43 4f | 50 59 52 49 47 48 54 27 |t -f 'CO|PYRIGHT'|
|00000430| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00000440| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00000450| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00000460| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00000470| 67 20 66 69 6c 65 20 5c | 22 27 43 4f 50 59 52 49 |g file \|"'COPYRI|
|00000480| 47 48 54 27 5c 22 0a 65 | 6c 73 65 0a 20 20 65 63 |GHT'\".e|lse. ec|
|00000490| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|000004a0| 69 6e 67 20 5c 22 27 43 | 4f 50 59 52 49 47 48 54 |ing \"'C|OPYRIGHT|
|000004b0| 27 5c 22 20 5c 28 32 31 | 32 39 20 63 68 61 72 61 |'\" \(21|29 chara|
|000004c0| 63 74 65 72 73 5c 29 0a | 20 20 73 65 64 20 22 73 |cters\).| sed "s|
|000004d0| 2f 5e 58 2f 2f 22 20 3e | 27 43 4f 50 59 52 49 47 |/^X//" >|'COPYRIG|
|000004e0| 48 54 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |HT' <<'E|ND_OF_FI|
|000004f0| 4c 45 27 0a 58 70 74 79 | 20 76 65 72 73 69 6f 6e |LE'.Xpty| version|
|00000500| 20 33 2e 30 30 31 2c 20 | 41 75 67 75 73 74 20 32 | 3.001, |August 2|
|00000510| 31 2c 20 31 39 39 30 2e | 0a 58 43 6f 70 79 72 69 |1, 1990.|.XCopyri|
|00000520| 67 68 74 20 28 63 29 20 | 31 39 39 30 2c 20 44 61 |ght (c) |1990, Da|
|00000530| 6e 69 65 6c 20 4a 2e 20 | 42 65 72 6e 73 74 65 69 |niel J. |Bernstei|
|00000540| 6e 2e 0a 58 41 6c 6c 20 | 72 69 67 68 74 73 20 72 |n..XAll |rights r|
|00000550| 65 73 65 72 76 65 64 2e | 0a 58 0a 58 49 20 77 61 |eserved.|.X.XI wa|
|00000560| 6e 74 20 74 68 69 73 20 | 70 72 6f 67 72 61 6d 20 |nt this |program |
|00000570| 74 6f 20 62 65 20 64 69 | 73 74 72 69 62 75 74 65 |to be di|stribute|
|00000580| 64 20 66 72 65 65 6c 79 | 20 69 6e 20 6f 72 69 67 |d freely| in orig|
|00000590| 69 6e 61 6c 20 66 6f 72 | 6d 2e 0a 58 0a 58 4f 6e |inal for|m..X.XOn|
|000005a0| 63 65 20 79 6f 75 27 76 | 65 20 72 65 63 65 69 76 |ce you'v|e receiv|
|000005b0| 65 64 20 61 20 6c 65 67 | 61 6c 20 63 6f 70 79 20 |ed a leg|al copy |
|000005c0| 6f 66 20 74 68 69 73 20 | 70 72 6f 67 72 61 6d 2c |of this |program,|
|000005d0| 20 79 6f 75 20 63 61 6e | 20 75 73 65 20 69 74 2e | you can| use it.|
|000005e0| 0a 58 46 6f 72 65 76 65 | 72 2e 20 4e 6f 62 6f 64 |.XForeve|r. Nobod|
|000005f0| 79 20 63 61 6e 20 74 61 | 6b 65 20 74 68 61 74 20 |y can ta|ke that |
|00000600| 72 69 67 68 74 20 61 77 | 61 79 20 66 72 6f 6d 20 |right aw|ay from |
|00000610| 79 6f 75 2e 20 59 6f 75 | 20 63 61 6e 20 6d 61 6b |you. You| can mak|
|00000620| 65 20 63 68 61 6e 67 65 | 73 0a 58 61 6e 64 20 62 |e change|s.Xand b|
|00000630| 61 63 6b 75 70 20 63 6f | 70 69 65 73 20 66 6f 72 |ackup co|pies for|
|00000640| 20 79 6f 75 72 20 75 73 | 65 20 28 6f 72 2c 20 69 | your us|e (or, i|
|00000650| 66 20 79 6f 75 27 72 65 | 20 61 6e 20 6f 72 67 61 |f you're| an orga|
|00000660| 6e 69 7a 61 74 69 6f 6e | 2c 20 66 6f 72 20 74 68 |nization|, for th|
|00000670| 65 0a 58 75 73 65 20 6f | 66 20 65 76 65 72 79 6f |e.Xuse o|f everyo|
|00000680| 6e 65 20 69 6e 20 74 68 | 65 20 6f 72 67 61 6e 69 |ne in th|e organi|
|00000690| 7a 61 74 69 6f 6e 29 2e | 20 59 6f 75 20 63 61 6e |zation).| You can|
|000006a0| 20 64 69 73 74 72 69 62 | 75 74 65 20 70 61 74 63 | distrib|ute patc|
|000006b0| 68 65 73 20 28 74 68 6f | 75 67 68 0a 58 6e 6f 74 |hes (tho|ugh.Xnot|
|000006c0| 20 70 61 74 63 68 65 64 | 20 76 65 72 73 69 6f 6e | patched| version|
|000006d0| 73 29 2e 20 59 6f 75 27 | 64 20 68 61 76 65 20 61 |s). You'|d have a|
|000006e0| 6c 6c 20 74 68 65 73 65 | 20 72 69 67 68 74 73 20 |ll these| rights |
|000006f0| 65 76 65 6e 20 69 66 20 | 49 20 64 69 64 6e 27 74 |even if |I didn't|
|00000700| 20 74 65 6c 6c 0a 58 79 | 6f 75 20 61 62 6f 75 74 | tell.Xy|ou about|
|00000710| 20 74 68 65 6d 2e 0a 58 | 0a 58 43 6f 70 79 72 69 | them..X|.XCopyri|
|00000720| 67 68 74 20 6c 61 77 20 | 67 69 76 65 73 20 61 6e |ght law |gives an|
|00000730| 20 61 75 74 68 6f 72 20 | 74 68 65 20 65 78 63 6c | author |the excl|
|00000740| 75 73 69 76 65 20 72 69 | 67 68 74 20 74 6f 20 63 |usive ri|ght to c|
|00000750| 6f 70 79 20 61 6e 64 20 | 64 69 73 74 72 69 62 75 |opy and |distribu|
|00000760| 74 65 20 68 69 73 0a 58 | 77 6f 72 6b 73 2e 20 53 |te his.X|works. S|
|00000770| 6f 20 74 68 61 74 20 79 | 6f 75 20 64 6f 6e 27 74 |o that y|ou don't|
|00000780| 20 68 61 76 65 20 74 6f | 20 77 6f 72 72 79 20 61 | have to| worry a|
|00000790| 62 6f 75 74 20 74 68 65 | 73 65 20 6c 65 67 61 6c |bout the|se legal|
|000007a0| 69 74 69 65 73 2c 20 49 | 20 67 72 61 6e 74 20 79 |ities, I| grant y|
|000007b0| 6f 75 20 74 68 65 0a 58 | 72 69 67 68 74 20 74 6f |ou the.X|right to|
|000007c0| 20 6d 61 6b 65 20 61 6e | 64 20 64 69 73 74 72 69 | make an|d distri|
|000007d0| 62 75 74 65 20 65 78 61 | 63 74 20 61 6e 64 20 63 |bute exa|ct and c|
|000007e0| 6f 6d 70 6c 65 74 65 20 | 63 6f 70 69 65 73 20 6f |omplete |copies o|
|000007f0| 66 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 2e 0a |f this p|rogram..|
|00000800| 58 0a 58 4f 6e 20 74 68 | 65 20 6f 74 68 65 72 20 |X.XOn th|e other |
|00000810| 68 61 6e 64 2c 20 49 20 | 64 6f 6e 27 74 20 77 61 |hand, I |don't wa|
|00000820| 6e 74 20 74 68 69 73 20 | 70 72 6f 67 72 61 6d 20 |nt this |program |
|00000830| 73 6f 6c 64 20 77 69 74 | 68 6f 75 74 20 6d 79 20 |sold wit|hout my |
|00000840| 70 65 72 6d 69 73 73 69 | 6f 6e 2e 0a 58 55 6e 6c |permissi|on..XUnl|
|00000850| 65 73 73 20 49 20 67 69 | 76 65 20 79 6f 75 20 70 |ess I gi|ve you p|
|00000860| 65 72 6d 69 73 73 69 6f | 6e 2c 20 79 6f 75 20 6d |ermissio|n, you m|
|00000870| 61 79 20 6e 6f 74 20 63 | 68 61 72 67 65 20 66 6f |ay not c|harge fo|
|00000880| 72 20 63 6f 70 69 65 73 | 2e 20 59 6f 75 20 6d 61 |r copies|. You ma|
|00000890| 79 20 63 68 61 72 67 65 | 20 66 6f 72 0a 58 64 69 |y charge| for.Xdi|
|000008a0| 73 74 72 69 62 75 74 69 | 6f 6e 2d 2d 2d 62 75 74 |stributi|on---but|
|000008b0| 20 6f 6e 6c 79 20 69 66 | 20 79 6f 75 20 66 69 72 | only if| you fir|
|000008c0| 73 74 20 77 61 72 6e 20 | 74 68 65 20 72 65 63 69 |st warn |the reci|
|000008d0| 70 69 65 6e 74 20 74 68 | 61 74 20 74 68 65 20 63 |pient th|at the c|
|000008e0| 6f 64 65 20 69 73 20 66 | 72 65 65 2c 0a 58 61 6e |ode is f|ree,.Xan|
|000008f0| 64 20 74 65 6c 6c 20 68 | 69 6d 20 77 68 65 72 65 |d tell h|im where|
|00000900| 20 79 6f 75 20 67 6f 74 | 20 69 74 20 66 72 6f 6d | you got| it from|
|00000910| 2e 0a 58 0a 58 49 20 64 | 6f 6e 27 74 20 77 61 6e |..X.XI d|on't wan|
|00000920| 74 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 64 |t this p|rogram d|
|00000930| 69 73 74 72 69 62 75 74 | 65 64 20 77 69 74 68 6f |istribut|ed witho|
|00000940| 75 74 20 6d 79 20 6e 61 | 6d 65 20 6f 6e 20 69 74 |ut my na|me on it|
|00000950| 2e 20 49 20 61 6c 73 6f | 20 64 6f 6e 27 74 0a 58 |. I also| don't.X|
|00000960| 77 61 6e 74 20 6c 6f 74 | 73 20 6f 66 20 64 69 66 |want lot|s of dif|
|00000970| 66 65 72 65 6e 74 20 76 | 65 72 73 69 6f 6e 73 20 |ferent v|ersions |
|00000980| 72 75 6e 6e 69 6e 67 20 | 61 72 6f 75 6e 64 2c 20 |running |around, |
|00000990| 73 6f 20 75 6e 6c 65 73 | 73 20 49 20 67 69 76 65 |so unles|s I give|
|000009a0| 20 79 6f 75 20 70 65 72 | 6d 69 73 73 69 6f 6e 0a | you per|mission.|
|000009b0| 58 79 6f 75 20 63 61 6e | 27 74 20 73 65 6e 64 20 |Xyou can|'t send |
|000009c0| 6f 75 74 20 61 20 6d 6f | 64 69 66 69 65 64 20 76 |out a mo|dified v|
|000009d0| 65 72 73 69 6f 6e 2e 20 | 49 74 27 73 20 70 65 72 |ersion. |It's per|
|000009e0| 66 65 63 74 6c 79 20 61 | 6c 6c 20 72 69 67 68 74 |fectly a|ll right|
|000009f0| 20 74 6f 20 73 65 6e 64 | 20 6f 74 68 65 72 0a 58 | to send| other.X|
|00000a00| 70 65 6f 70 6c 65 20 61 | 20 64 65 73 63 72 69 70 |people a| descrip|
|00000a10| 74 69 6f 6e 20 6f 66 20 | 68 6f 77 20 74 6f 20 6d |tion of |how to m|
|00000a20| 61 6b 65 20 79 6f 75 72 | 20 63 68 61 6e 67 65 73 |ake your| changes|
|00000a30| 20 28 69 2e 65 2e 2c 20 | 61 20 70 61 74 63 68 29 | (i.e., |a patch)|
|00000a40| 2c 20 62 65 63 61 75 73 | 65 20 74 68 65 6e 0a 58 |, becaus|e then.X|
|00000a50| 65 61 63 68 20 72 65 63 | 69 70 69 65 6e 74 20 6b |each rec|ipient k|
|00000a60| 6e 6f 77 73 20 66 69 72 | 73 74 68 61 6e 64 20 77 |nows fir|sthand w|
|00000a70| 68 61 74 20 70 61 74 63 | 68 65 73 20 68 65 27 73 |hat patc|hes he's|
|00000a80| 20 69 6e 73 74 61 6c 6c | 65 64 2c 20 61 6e 64 20 | install|ed, and |
|00000a90| 49 20 77 6f 6e 27 74 20 | 67 6f 0a 58 63 68 61 73 |I won't |go.Xchas|
|00000aa0| 69 6e 67 20 67 68 6f 73 | 74 73 2e 20 28 41 6e 20 |ing ghos|ts. (An |
|00000ab0| 61 75 74 68 6f 72 20 68 | 61 73 20 6e 6f 20 72 69 |author h|as no ri|
|00000ac0| 67 68 74 20 74 6f 20 63 | 6f 6e 74 72 6f 6c 20 70 |ght to c|ontrol p|
|00000ad0| 61 74 63 68 65 73 20 69 | 6e 20 61 6e 79 20 63 61 |atches i|n any ca|
|00000ae0| 73 65 2e 29 0a 58 0a 58 | 49 66 20 79 6f 75 20 72 |se.).X.X|If you r|
|00000af0| 75 6e 20 61 6e 20 61 72 | 63 68 69 76 65 20 73 69 |un an ar|chive si|
|00000b00| 74 65 3a 20 57 68 65 6e | 20 79 6f 75 20 72 65 63 |te: When| you rec|
|00000b10| 65 69 76 65 20 61 20 70 | 61 74 63 68 20 73 75 70 |eive a p|atch sup|
|00000b20| 70 6f 73 65 64 6c 79 20 | 66 72 6f 6d 20 6d 65 2c |posedly |from me,|
|00000b30| 20 64 6f 20 79 6f 75 0a | 58 61 70 70 6c 79 20 69 | do you.|Xapply i|
|00000b40| 74 20 74 6f 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |t to the| origina|
|00000b50| 6c 20 70 61 63 6b 61 67 | 65 20 61 6e 64 20 72 65 |l packag|e and re|
|00000b60| 70 61 63 6b 61 67 65 20 | 69 74 3f 20 49 20 65 6e |package |it? I en|
|00000b70| 63 6f 75 72 61 67 65 20 | 79 6f 75 20 74 6f 20 63 |courage |you to c|
|00000b80| 68 61 6e 67 65 0a 58 79 | 6f 75 72 20 70 6f 6c 69 |hange.Xy|our poli|
|00000b90| 63 79 2c 20 69 66 20 66 | 6f 72 20 6e 6f 20 6f 74 |cy, if f|or no ot|
|00000ba0| 68 65 72 20 72 65 61 73 | 6f 6e 20 74 68 61 6e 20 |her reas|on than |
|00000bb0| 74 6f 20 67 69 76 65 20 | 72 65 63 69 70 69 65 6e |to give |recipien|
|00000bc0| 74 73 20 61 20 66 61 6c | 6c 62 61 63 6b 20 69 6e |ts a fal|lback in|
|00000bd0| 20 63 61 73 65 0a 58 6f | 66 20 62 75 67 67 79 20 | case.Xo|f buggy |
|00000be0| 70 61 74 63 68 65 73 2e | 20 49 66 20 79 6f 75 27 |patches.| If you'|
|00000bf0| 72 65 20 72 65 61 6c 6c | 79 20 73 65 74 20 6f 6e |re reall|y set on|
|00000c00| 20 74 68 69 73 2c 20 68 | 6f 77 20 61 62 6f 75 74 | this, h|ow about|
|00000c10| 20 69 6e 63 6c 75 64 69 | 6e 67 20 74 68 65 20 70 | includi|ng the p|
|00000c20| 61 74 63 68 65 73 0a 58 | 61 73 20 73 65 70 61 72 |atches.X|as separ|
|00000c30| 61 74 65 2c 20 75 6e 61 | 70 70 6c 69 65 64 20 50 |ate, una|pplied P|
|00000c40| 41 54 43 48 6e 6e 20 66 | 69 6c 65 73 20 69 6e 73 |ATCHnn f|iles ins|
|00000c50| 69 64 65 20 74 68 65 20 | 70 61 63 6b 61 67 65 3f |ide the |package?|
|00000c60| 20 54 68 61 74 27 73 20 | 66 69 6e 65 20 62 79 20 | That's |fine by |
|00000c70| 6d 65 2e 0a 58 0a 58 49 | 66 20 79 6f 75 20 68 61 |me..X.XI|f you ha|
|00000c80| 76 65 20 71 75 65 73 74 | 69 6f 6e 73 20 61 62 6f |ve quest|ions abo|
|00000c90| 75 74 20 74 68 69 73 20 | 70 72 6f 67 72 61 6d 20 |ut this |program |
|00000ca0| 6f 72 20 61 62 6f 75 74 | 20 74 68 69 73 20 6e 6f |or about| this no|
|00000cb0| 74 69 63 65 2c 20 6f 72 | 20 69 66 20 79 6f 75 0a |tice, or| if you.|
|00000cc0| 58 77 6f 75 6c 64 20 6c | 69 6b 65 20 61 64 64 69 |Xwould l|ike addi|
|00000cd0| 74 69 6f 6e 61 6c 20 72 | 69 67 68 74 73 20 62 65 |tional r|ights be|
|00000ce0| 79 6f 6e 64 20 74 68 6f | 73 65 20 67 72 61 6e 74 |yond tho|se grant|
|00000cf0| 65 64 20 61 62 6f 76 65 | 2c 20 6f 72 20 69 66 20 |ed above|, or if |
|00000d00| 79 6f 75 20 68 61 76 65 | 0a 58 61 20 70 61 74 63 |you have|.Xa patc|
|00000d10| 68 20 74 68 61 74 20 79 | 6f 75 20 64 6f 6e 27 74 |h that y|ou don't|
|00000d20| 20 6d 69 6e 64 20 73 68 | 61 72 69 6e 67 2c 20 70 | mind sh|aring, p|
|00000d30| 6c 65 61 73 65 20 63 6f | 6e 74 61 63 74 20 6d 65 |lease co|ntact me|
|00000d40| 20 6f 6e 20 74 68 65 20 | 49 6e 74 65 72 6e 65 74 | on the |Internet|
|00000d50| 0a 58 61 74 20 62 72 6e | 73 74 6e 64 40 61 63 66 |.Xat brn|stnd@acf|
|00000d60| 31 30 2e 6e 79 75 2e 65 | 64 75 2e 0a 45 4e 44 5f |10.nyu.e|du..END_|
|00000d70| 4f 46 5f 46 49 4c 45 0a | 20 20 69 66 20 74 65 73 |OF_FILE.| if tes|
|00000d80| 74 20 32 31 32 39 20 2d | 6e 65 20 60 77 63 20 2d |t 2129 -|ne `wc -|
|00000d90| 63 20 3c 27 43 4f 50 59 | 52 49 47 48 54 27 60 3b |c <'COPY|RIGHT'`;|
|00000da0| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|00000db0| 68 61 72 3a 20 5c 22 27 | 43 4f 50 59 52 49 47 48 |har: \"'|COPYRIGH|
|00000dc0| 54 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |T'\" unp|acked wi|
|00000dd0| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 20 |th wrong| size!. |
|00000de0| 20 66 69 0a 20 20 23 20 | 65 6e 64 20 6f 66 20 27 | fi. # |end of '|
|00000df0| 43 4f 50 59 52 49 47 48 | 54 27 0a 66 69 0a 69 66 |COPYRIGH|T'.fi.if|
|00000e00| 20 74 65 73 74 20 2d 66 | 20 27 51 55 45 53 54 49 | test -f| 'QUESTI|
|00000e10| 4f 4e 53 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |ONS' -a |"${1}" !|
|00000e20| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00000e30| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00000e40| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00000e50| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 51 55 |sting fi|le \"'QU|
|00000e60| 45 53 54 49 4f 4e 53 27 | 5c 22 0a 65 6c 73 65 0a |ESTIONS'|\".else.|
|00000e70| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 | echo s|har: Ext|
|00000e80| 72 61 63 74 69 6e 67 20 | 5c 22 27 51 55 45 53 54 |racting |\"'QUEST|
|00000e90| 49 4f 4e 53 27 5c 22 20 | 5c 28 34 32 30 32 20 63 |IONS'\" |\(4202 c|
|00000ea0| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 20 20 73 65 |haracter|s\). se|
|00000eb0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 51 55 45 |d "s/^X/|/" >'QUE|
|00000ec0| 53 54 49 4f 4e 53 27 20 | 3c 3c 27 45 4e 44 5f 4f |STIONS' |<<'END_O|
|00000ed0| 46 5f 46 49 4c 45 27 0a | 58 49 20 73 65 6c 65 63 |F_FILE'.|XI selec|
|00000ee0| 74 65 64 20 74 68 65 20 | 71 75 65 73 74 69 6f 6e |ted the |question|
|00000ef0| 73 20 62 65 6c 6f 77 20 | 66 72 6f 6d 20 61 72 74 |s below |from art|
|00000f00| 69 63 6c 65 73 20 70 6f | 73 74 65 64 20 74 6f 20 |icles po|sted to |
|00000f10| 74 68 65 20 55 53 45 4e | 45 54 0a 58 6e 65 77 73 |the USEN|ET.Xnews|
|00000f20| 67 72 6f 75 70 20 63 6f | 6d 70 2e 75 6e 69 78 2e |group co|mp.unix.|
|00000f30| 71 75 65 73 74 69 6f 6e | 73 2e 20 41 6c 6c 20 74 |question|s. All t|
|00000f40| 68 65 20 71 75 65 73 74 | 69 6f 6e 73 20 61 72 65 |he quest|ions are|
|00000f50| 20 72 65 61 73 6f 6e 61 | 62 6c 79 20 65 61 73 79 | reasona|bly easy|
|00000f60| 20 74 6f 0a 58 61 6e 73 | 77 65 72 20 77 69 74 68 | to.Xans|wer with|
|00000f70| 20 70 74 79 20 61 6e 64 | 20 6e 6f 74 20 74 6f 6f | pty and| not too|
|00000f80| 20 65 61 73 79 20 74 6f | 20 61 6e 73 77 65 72 20 | easy to| answer |
|00000f90| 77 69 74 68 20 6f 74 68 | 65 72 20 77 69 64 65 6c |with oth|er widel|
|00000fa0| 79 20 61 76 61 69 6c 61 | 62 6c 65 0a 58 74 6f 6f |y availa|ble.Xtoo|
|00000fb0| 6c 73 2e 20 53 6f 20 49 | 20 68 6f 70 65 20 74 68 |ls. So I| hope th|
|00000fc0| 69 73 20 66 69 6c 65 20 | 69 73 20 75 73 65 66 75 |is file |is usefu|
|00000fd0| 6c 2c 20 61 6e 64 20 49 | 20 68 6f 70 65 20 6f 74 |l, and I| hope ot|
|00000fe0| 68 65 72 20 73 6f 66 74 | 77 61 72 65 20 61 75 74 |her soft|ware aut|
|00000ff0| 68 6f 72 73 0a 58 61 64 | 6f 70 74 20 74 68 65 20 |hors.Xad|opt the |
|00001000| 51 55 45 53 54 49 4f 4e | 53 20 69 64 65 61 2e 0a |QUESTION|S idea..|
|00001010| 58 0a 58 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |X.XOrgan|ization:|
|00001020| 20 71 75 65 73 74 69 6f | 6e 2c 20 6f 6e 65 2d 73 | questio|n, one-s|
|00001030| 65 6e 74 65 6e 63 65 20 | 61 6e 73 77 65 72 2c 20 |entence |answer, |
|00001040| 66 75 72 74 68 65 72 20 | 64 65 74 61 69 6c 73 20 |further |details |
|00001050| 6f 66 0a 58 61 6e 73 77 | 65 72 2c 20 77 68 79 20 |of.Xansw|er, why |
|00001060| 74 68 65 20 71 75 65 73 | 74 69 6f 6e 20 6e 6f 72 |the ques|tion nor|
|00001070| 6d 61 6c 6c 79 20 70 6f | 73 65 73 20 61 20 70 72 |mally po|ses a pr|
|00001080| 6f 62 6c 65 6d 2c 20 61 | 6e 64 20 77 68 79 20 74 |oblem, a|nd why t|
|00001090| 68 65 20 61 6e 73 77 65 | 72 0a 58 67 69 76 65 6e |he answe|r.Xgiven|
|000010a0| 20 73 6f 6c 76 65 73 20 | 74 68 65 20 70 72 6f 62 | solves |the prob|
|000010b0| 6c 65 6d 2e 0a 58 0a 58 | 0a 58 31 2e 20 48 6f 77 |lem..X.X|.X1. How|
|000010c0| 20 74 6f 20 72 65 64 69 | 72 65 63 74 20 74 65 6c | to redi|rect tel|
|000010d0| 6e 65 74 27 73 20 69 6e | 70 75 74 3f 0a 58 0a 58 |net's in|put?.X.X|
|000010e0| 52 75 6e 20 70 74 79 20 | 74 65 6c 6e 65 74 20 69 |Run pty |telnet i|
|000010f0| 6e 73 74 65 61 64 20 6f | 66 20 74 65 6c 6e 65 74 |nstead o|f telnet|
|00001100| 2e 20 43 61 76 65 61 74 | 3a 20 74 65 6c 6e 65 74 |. Caveat|: telnet|
|00001110| 20 73 74 75 70 69 64 6c | 79 20 66 6c 75 73 68 65 | stupidl|y flushe|
|00001120| 73 20 69 74 73 0a 58 69 | 6e 70 75 74 20 61 74 20 |s its.Xi|nput at |
|00001130| 63 6f 6e 6e 65 63 74 20 | 74 69 6d 65 2c 20 73 6f |connect |time, so|
|00001140| 20 62 65 20 63 61 72 65 | 66 75 6c 20 6e 6f 74 20 | be care|ful not |
|00001150| 74 6f 20 66 6c 6f 6f 64 | 20 69 74 3b 20 69 6e 73 |to flood| it; ins|
|00001160| 74 65 61 64 20 64 6f 0a | 58 73 6f 6d 65 74 68 69 |tead do.|Xsomethi|
|00001170| 6e 67 20 6c 69 6b 65 20 | 25 20 28 73 6c 65 65 70 |ng like |% (sleep|
|00001180| 20 35 3b 65 63 68 6f 20 | 68 65 6c 70 3b 65 63 68 | 5;echo |help;ech|
|00001190| 6f 20 71 75 69 74 29 20 | 7c 20 70 74 79 20 74 65 |o quit) || pty te|
|000011a0| 6c 6e 65 74 20 77 68 61 | 74 65 76 65 72 20 32 35 |lnet wha|tever 25|
|000011b0| 2e 0a 58 28 54 72 79 20 | 69 74 21 29 20 54 68 65 |..X(Try |it!) The|
|000011c0| 20 66 69 76 65 2d 73 65 | 63 6f 6e 64 20 70 61 75 | five-se|cond pau|
|000011d0| 73 65 20 73 68 6f 75 6c | 64 20 62 65 20 65 6e 6f |se shoul|d be eno|
|000011e0| 75 67 68 2e 20 46 6f 72 | 20 61 20 6d 6f 72 65 0a |ugh. For| a more.|
|000011f0| 58 73 6f 70 68 69 73 74 | 69 63 61 74 65 64 20 28 |Xsophist|icated (|
|00001200| 61 6e 64 20 72 65 6c 69 | 61 62 6c 65 29 20 74 65 |and reli|able) te|
|00001210| 63 68 6e 69 71 75 65 2c | 20 73 65 65 20 23 34 20 |chnique,| see #4 |
|00001220| 62 65 6c 6f 77 2e 0a 58 | 0a 58 54 68 65 20 70 72 |below..X|.XThe pr|
|00001230| 6f 62 6c 65 6d 20 68 65 | 72 65 20 69 73 20 74 68 |oblem he|re is th|
|00001240| 61 74 20 74 65 6c 6e 65 | 74 20 77 61 6e 74 73 20 |at telne|t wants |
|00001250| 74 6f 20 74 61 6b 65 20 | 69 74 73 20 69 6e 70 75 |to take |its inpu|
|00001260| 74 20 66 72 6f 6d 20 61 | 20 74 65 72 6d 69 6e 61 |t from a| termina|
|00001270| 6c 2e 0a 58 4d 6f 73 74 | 20 6f 74 68 65 72 20 69 |l..XMost| other i|
|00001280| 6e 74 65 72 61 63 74 69 | 76 65 20 61 70 70 6c 69 |nteracti|ve appli|
|00001290| 63 61 74 69 6f 6e 73 20 | 28 65 2e 67 2e 2c 20 65 |cations |(e.g., e|
|000012a0| 64 69 74 6f 72 73 29 20 | 66 65 65 6c 20 74 68 65 |ditors) |feel the|
|000012b0| 20 73 61 6d 65 20 77 61 | 79 0a 58 61 62 6f 75 74 | same wa|y.Xabout|
|000012c0| 20 73 74 64 69 6e 2c 20 | 73 74 64 6f 75 74 2c 20 | stdin, |stdout, |
|000012d0| 61 6e 64 20 73 74 64 65 | 72 72 2e 20 70 74 79 20 |and stde|rr. pty |
|000012e0| 73 6f 6c 76 65 73 20 74 | 68 69 73 20 62 79 20 73 |solves t|his by s|
|000012f0| 65 74 74 69 6e 67 20 69 | 6e 70 75 74 2c 0a 58 6f |etting i|nput,.Xo|
|00001300| 75 74 70 75 74 2c 20 61 | 6e 64 20 65 72 72 6f 72 |utput, a|nd error|
|00001310| 20 61 6c 6c 20 74 6f 20 | 74 68 65 20 70 73 65 75 | all to |the pseu|
|00001320| 64 6f 2d 74 65 72 6d 69 | 6e 61 6c 2e 0a 58 0a 58 |do-termi|nal..X.X|
|00001330| 0a 58 32 2e 20 48 6f 77 | 20 74 6f 20 72 65 64 69 |.X2. How| to redi|
|00001340| 72 65 63 74 20 73 75 27 | 73 20 69 6e 70 75 74 3f |rect su'|s input?|
|00001350| 0a 58 0a 58 70 74 79 20 | 73 75 20 3c 20 69 6e 70 |.X.Xpty |su < inp|
|00001360| 75 74 2c 20 6f 66 20 63 | 6f 75 72 73 65 2e 20 28 |ut, of c|ourse. (|
|00001370| 49 20 63 65 72 74 61 69 | 6e 6c 79 20 64 6f 6e 27 |I certai|nly don'|
|00001380| 74 20 72 65 63 6f 6d 6d | 65 6e 64 20 70 75 74 74 |t recomm|end putt|
|00001390| 69 6e 67 20 79 6f 75 72 | 0a 58 70 61 73 73 77 6f |ing your|.Xpasswo|
|000013a0| 72 64 20 69 6e 20 70 6c | 61 69 6e 74 65 78 74 20 |rd in pl|aintext |
|000013b0| 74 6f 20 62 65 20 66 65 | 64 20 74 6f 20 73 75 2c |to be fe|d to su,|
|000013c0| 20 62 75 74 20 69 74 20 | 63 61 6e 20 62 65 20 64 | but it |can be d|
|000013d0| 6f 6e 65 21 29 20 4e 6f | 74 65 20 74 68 61 74 0a |one!) No|te that.|
|000013e0| 58 73 6f 6d 65 20 73 75 | 27 73 20 66 6c 75 73 68 |Xsome su|'s flush|
|000013f0| 20 74 68 65 69 72 20 69 | 6e 70 75 74 3b 20 73 6f | their i|nput; so|
|00001400| 6c 76 65 20 74 68 69 73 | 20 61 73 20 69 6e 20 23 |lve this| as in #|
|00001410| 31 20 61 62 6f 76 65 20 | 6f 72 20 23 34 20 62 65 |1 above |or #4 be|
|00001420| 6c 6f 77 2e 0a 58 0a 58 | 54 68 65 20 70 72 6f 62 |low..X.X|The prob|
|00001430| 6c 65 6d 20 69 73 20 74 | 68 61 74 20 73 75 20 6f |lem is t|hat su o|
|00001440| 70 65 6e 73 20 2f 64 65 | 76 2f 74 74 79 20 66 6f |pens /de|v/tty fo|
|00001450| 72 20 69 74 73 20 69 6e | 70 75 74 2e 20 4d 61 6e |r its in|put. Man|
|00001460| 79 20 6f 74 68 65 72 20 | 70 72 6f 67 72 61 6d 73 |y other |programs|
|00001470| 0a 58 75 73 65 20 2f 64 | 65 76 2f 74 74 79 20 65 |.Xuse /d|ev/tty e|
|00001480| 78 70 6c 69 63 69 74 6c | 79 20 66 6f 72 20 69 6e |xplicitl|y for in|
|00001490| 70 75 74 20 61 6e 64 20 | 6f 75 74 70 75 74 3b 20 |put and |output; |
|000014a0| 68 6f 77 20 64 6f 20 79 | 6f 75 20 72 65 64 69 72 |how do y|ou redir|
|000014b0| 65 63 74 20 74 68 65 6d | 3f 0a 58 70 74 79 20 73 |ect them|?.Xpty s|
|000014c0| 6f 6c 76 65 73 20 74 68 | 69 73 20 62 65 63 61 75 |olves th|is becau|
|000014d0| 73 65 20 61 20 70 72 6f | 67 72 61 6d 20 75 6e 64 |se a pro|gram und|
|000014e0| 65 72 20 61 20 70 73 65 | 75 64 6f 2d 74 65 72 6d |er a pse|udo-term|
|000014f0| 69 6e 61 6c 20 72 65 66 | 65 72 73 20 74 6f 20 74 |inal ref|ers to t|
|00001500| 68 61 74 0a 58 74 65 72 | 6d 69 6e 61 6c 20 77 68 |hat.Xter|minal wh|
|00001510| 65 6e 20 69 74 20 6f 70 | 65 6e 73 20 2f 64 65 76 |en it op|ens /dev|
|00001520| 2f 74 74 79 2e 0a 58 0a | 58 0a 58 33 2e 20 48 6f |/tty..X.|X.X3. Ho|
|00001530| 77 20 74 6f 20 6d 61 6b | 65 20 73 65 64 20 27 73 |w to mak|e sed 's|
|00001540| 2f 66 6f 6f 2f 62 61 72 | 2f 67 27 20 7c 20 6d 6f |/foo/bar|/g' | mo|
|00001550| 72 65 20 77 6f 72 6b 3f | 0a 58 0a 58 70 74 79 20 |re work?|.X.Xpty |
|00001560| 2d 30 20 73 65 64 20 27 | 73 2f 66 6f 6f 2f 62 61 |-0 sed '|s/foo/ba|
|00001570| 72 2f 67 27 20 7c 20 6d | 6f 72 65 2e 20 59 6f 75 |r/g' | m|ore. You|
|00001580| 20 63 61 6e 20 61 62 62 | 72 65 76 69 61 74 65 20 | can abb|reviate |
|00001590| 70 74 79 20 2d 30 20 61 | 73 20 63 6f 6e 64 6f 6d |pty -0 a|s condom|
|000015a0| 2e 0a 58 0a 58 54 68 65 | 20 70 72 6f 62 6c 65 6d |..X.XThe| problem|
|000015b0| 20 69 73 20 74 68 61 74 | 20 73 65 64 20 75 73 65 | is that| sed use|
|000015c0| 73 20 73 74 64 69 6f 2e | 20 73 74 64 69 6f 20 63 |s stdio.| stdio c|
|000015d0| 68 65 63 6b 73 20 77 68 | 65 74 68 65 72 20 69 74 |hecks wh|ether it|
|000015e0| 73 20 6f 75 74 70 75 74 | 20 69 73 20 61 0a 58 74 |s output| is a.Xt|
|000015f0| 65 72 6d 69 6e 61 6c 3b | 20 69 66 20 6e 6f 74 2c |erminal;| if not,|
|00001600| 20 69 74 20 62 75 66 66 | 65 72 73 20 61 20 62 6c | it buff|ers a bl|
|00001610| 6f 63 6b 20 6f 66 20 64 | 61 74 61 20 69 6e 73 69 |ock of d|ata insi|
|00001620| 64 65 20 74 68 65 20 70 | 72 6f 67 72 61 6d 2e 20 |de the p|rogram. |
|00001630| 54 6f 20 73 65 65 0a 58 | 74 68 69 73 20 69 6e 20 |To see.X|this in |
|00001640| 61 63 74 69 6f 6e 2c 20 | 74 72 79 20 74 68 65 20 |action, |try the |
|00001650| 6f 72 69 67 69 6e 61 6c | 20 25 20 73 65 64 20 27 |original| % sed '|
|00001660| 73 2f 66 6f 6f 2f 62 61 | 72 2f 67 27 20 7c 20 6d |s/foo/ba|r/g' | m|
|00001670| 6f 72 65 3b 20 75 6e 6c | 65 73 73 20 79 6f 75 0a |ore; unl|ess you.|
|00001680| 58 74 79 70 65 20 61 20 | 6c 6f 74 20 6f 66 20 69 |Xtype a |lot of i|
|00001690| 6e 70 75 74 2c 20 73 65 | 64 20 77 69 6c 6c 20 6b |nput, se|d will k|
|000016a0| 65 65 70 20 62 75 66 66 | 65 72 69 6e 67 20 69 74 |eep buff|ering it|
|000016b0| 73 20 6f 75 74 70 75 74 | 2c 20 73 6f 20 79 6f 75 |s output|, so you|
|000016c0| 27 6c 6c 20 6e 65 76 65 | 72 0a 58 73 65 65 20 61 |'ll neve|r.Xsee a|
|000016d0| 6e 79 74 68 69 6e 67 2e | 0a 58 0a 58 70 74 79 20 |nything.|.X.Xpty |
|000016e0| 73 6f 6c 76 65 73 20 74 | 68 65 20 73 74 64 69 6f |solves t|he stdio|
|000016f0| 20 62 75 66 66 65 72 20 | 70 72 6f 62 6c 65 6d 20 | buffer |problem |
|00001700| 62 65 63 61 75 73 65 20 | 61 20 70 72 6f 67 72 61 |because |a progra|
|00001710| 6d 20 75 6e 64 65 72 20 | 73 74 64 69 6f 20 64 6f |m under |stdio do|
|00001720| 65 73 0a 58 68 61 76 65 | 20 61 20 74 65 72 6d 69 |es.Xhave| a termi|
|00001730| 6e 61 6c 20 28 74 68 65 | 20 70 73 65 75 64 6f 2d |nal (the| pseudo-|
|00001740| 74 65 72 6d 69 6e 61 6c | 29 20 61 73 20 6f 75 74 |terminal|) as out|
|00001750| 70 75 74 2e 20 53 6f 20 | 73 74 64 69 6f 20 62 75 |put. So |stdio bu|
|00001760| 66 66 65 72 73 20 6f 6e | 6c 79 20 61 0a 58 6c 69 |ffers on|ly a.Xli|
|00001770| 6e 65 20 61 74 20 61 20 | 74 69 6d 65 2e 0a 58 0a |ne at a |time..X.|
|00001780| 58 0a 58 34 2e 20 48 6f | 77 20 74 6f 20 73 74 61 |X.X4. Ho|w to sta|
|00001790| 72 74 20 61 20 70 72 6f | 67 72 61 6d 2c 20 72 65 |rt a pro|gram, re|
|000017a0| 73 70 6f 6e 64 20 74 6f | 20 69 74 73 20 70 72 6f |spond to| its pro|
|000017b0| 6d 70 74 73 2c 20 67 69 | 76 65 20 74 68 65 20 63 |mpts, gi|ve the c|
|000017c0| 6f 72 72 65 63 74 0a 58 | 20 20 20 72 65 70 6c 69 |orrect.X| repli|
|000017d0| 65 73 2c 20 61 6e 64 20 | 63 61 74 63 68 20 74 68 |es, and |catch th|
|000017e0| 65 20 6f 75 74 70 75 74 | 3f 0a 58 0a 58 4f 6e 20 |e output|?.X.XOn |
|000017f0| 61 20 6d 61 63 68 69 6e | 65 20 77 69 74 68 20 6e |a machin|e with n|
|00001800| 61 6d 65 64 20 70 69 70 | 65 73 20 63 72 65 61 74 |amed pip|es creat|
|00001810| 65 64 20 62 79 20 6d 6b | 6e 6f 64 20 66 6f 6f 20 |ed by mk|nod foo |
|00001820| 70 3a 0a 58 0a 58 20 20 | 23 21 2f 62 69 6e 2f 73 |p:.X.X |#!/bin/s|
|00001830| 68 0a 58 20 20 23 20 47 | 65 6e 65 72 69 63 20 72 |h.X # G|eneric r|
|00001840| 65 61 64 65 72 2d 77 72 | 69 74 65 72 2e 0a 58 20 |eader-wr|iter..X |
|00001850| 20 28 75 6d 61 73 6b 20 | 30 37 37 3b 6d 6b 6e 6f | (umask |077;mkno|
|00001860| 64 20 69 6e 70 75 74 20 | 70 3b 6d 6b 6e 6f 64 20 |d input |p;mknod |
|00001870| 6f 75 74 70 75 74 20 70 | 29 0a 58 20 20 70 74 79 |output p|).X pty|
|00001880| 20 2d 30 20 70 72 6f 67 | 72 61 6d 20 61 72 67 73 | -0 prog|ram args|
|00001890| 20 3c 20 69 6e 70 75 74 | 20 7c 20 70 74 79 20 2d | < input| | pty -|
|000018a0| 30 20 74 65 65 20 72 65 | 63 6f 72 64 20 3e 20 6f |0 tee re|cord > o|
|000018b0| 75 74 70 75 74 20 26 0a | 58 20 20 65 78 65 63 20 |utput &.|X exec |
|000018c0| 34 3e 69 6e 70 75 74 20 | 35 3c 6f 75 74 70 75 74 |4>input |5<output|
|000018d0| 0a 58 20 20 23 20 4e 6f | 77 20 72 65 61 64 20 70 |.X # No|w read p|
|000018e0| 72 6f 6d 70 74 73 20 66 | 72 6f 6d 20 3c 26 35 20 |rompts f|rom <&5 |
|000018f0| 61 6e 64 20 77 72 69 74 | 65 20 72 65 70 6c 69 65 |and writ|e replie|
|00001900| 73 20 74 6f 20 3e 26 34 | 2e 0a 58 20 20 23 20 41 |s to >&4|..X # A|
|00001910| 20 74 72 61 6e 73 63 72 | 69 70 74 20 69 73 20 6b | transcr|ipt is k|
|00001920| 65 70 74 20 69 6e 20 72 | 65 63 6f 72 64 2e 0a 58 |ept in r|ecord..X|
|00001930| 0a 58 41 6e 6f 74 68 65 | 72 20 73 6f 6c 75 74 69 |.XAnothe|r soluti|
|00001940| 6f 6e 20 69 73 20 74 6f | 20 63 72 65 61 74 65 20 |on is to| create |
|00001950| 74 77 6f 20 28 75 6e 6e | 61 6d 65 64 29 20 70 69 |two (unn|amed) pi|
|00001960| 70 65 73 2c 20 74 68 65 | 6e 20 73 74 69 63 6b 20 |pes, the|n stick |
|00001970| 70 74 79 0a 58 62 65 74 | 77 65 65 6e 20 74 68 65 |pty.Xbet|ween the|
|00001980| 6d 20 61 73 20 61 62 6f | 76 65 2e 20 54 68 69 73 |m as abo|ve. This|
|00001990| 20 72 65 71 75 69 72 65 | 73 20 43 20 63 6f 64 65 | require|s C code|
|000019a0| 20 62 75 74 20 69 73 20 | 6d 6f 72 65 20 70 6f 72 | but is |more por|
|000019b0| 74 61 62 6c 65 2e 0a 58 | 0a 58 54 68 65 20 70 72 |table..X|.XThe pr|
|000019c0| 6f 62 6c 65 6d 73 20 68 | 65 72 65 20 61 72 65 20 |oblems h|ere are |
|000019d0| 6a 75 73 74 20 74 68 65 | 20 70 72 6f 62 6c 65 6d |just the| problem|
|000019e0| 73 20 69 6e 20 23 31 2d | 23 33 20 61 62 6f 76 65 |s in #1-|#3 above|
|000019f0| 2e 0a 58 0a 58 0a 58 35 | 2e 20 48 6f 77 20 74 6f |..X.X.X5|. How to|
|00001a00| 20 66 6f 6f 6c 20 72 6e | 20 69 6e 74 6f 20 70 72 | fool rn| into pr|
|00001a10| 6f 63 65 73 73 69 6e 67 | 20 4b 49 4c 4c 20 66 69 |ocessing| KILL fi|
|00001a20| 6c 65 73 20 69 6e 20 74 | 68 65 20 62 61 63 6b 67 |les in t|he backg|
|00001a30| 72 6f 75 6e 64 3f 0a 58 | 0a 58 70 74 79 20 2d 54 |round?.X|.Xpty -T|
|00001a40| 20 72 6e 20 26 2e 20 54 | 68 69 73 20 64 6f 65 73 | rn &. T|his does|
|00001a50| 20 68 61 76 65 20 6f 6e | 65 20 64 65 66 69 63 69 | have on|e defici|
|00001a60| 65 6e 63 79 3a 20 63 6f | 6e 74 72 6f 6c 20 63 68 |ency: co|ntrol ch|
|00001a70| 61 72 61 63 74 65 72 73 | 20 6c 69 6b 65 20 5e 43 |aracters| like ^C|
|00001a80| 2c 0a 58 5e 5a 2c 20 61 | 6e 64 20 73 6f 20 6f 6e |,.X^Z, a|nd so on|
|00001a90| 20 61 66 66 65 63 74 20 | 70 74 79 20 72 61 74 68 | affect |pty rath|
|00001aa0| 65 72 20 74 68 61 6e 20 | 72 6e 2e 20 28 54 68 61 |er than |rn. (Tha|
|00001ab0| 74 27 73 20 77 68 61 74 | 20 2d 54 20 64 6f 65 73 |t's what| -T does|
|00001ac0| 2e 29 20 54 68 69 73 0a | 58 64 6f 65 73 6e 27 74 |.) This.|Xdoesn't|
|00001ad0| 20 6d 61 74 74 65 72 20 | 66 6f 72 20 72 6e 2c 20 | matter |for rn, |
|00001ae0| 62 75 74 20 70 74 79 20 | 2d 54 20 76 69 20 76 65 |but pty |-T vi ve|
|00001af0| 72 79 6c 6f 6e 67 66 69 | 6c 65 20 64 65 66 69 6e |rylongfi|le defin|
|00001b00| 69 74 65 6c 79 20 64 6f | 65 73 6e 27 74 0a 58 77 |itely do|esn't.Xw|
|00001b10| 6f 72 6b 20 74 68 65 20 | 72 69 67 68 74 20 77 61 |ork the |right wa|
|00001b20| 79 2e 20 54 6f 20 70 61 | 73 73 20 63 6f 6e 74 72 |y. To pa|ss contr|
|00001b30| 6f 6c 20 63 68 61 72 61 | 63 74 65 72 73 20 74 68 |ol chara|cters th|
|00001b40| 72 6f 75 67 68 2c 20 73 | 74 61 72 74 20 77 69 74 |rough, s|tart wit|
|00001b50| 68 0a 58 0a 58 20 20 25 | 20 70 74 79 20 2d 73 20 |h.X.X %| pty -s |
|00001b60| 73 68 20 2d 63 20 27 73 | 65 73 73 6e 61 6d 65 3b |sh -c 's|essname;|
|00001b70| 64 69 73 63 6f 6e 6e 65 | 63 74 3b 70 74 79 20 76 |disconne|ct;pty v|
|00001b80| 69 20 76 65 72 79 6c 6f | 6e 67 66 69 6c 65 27 0a |i verylo|ngfile'.|
|00001b90| 58 0a 58 28 70 74 79 20 | 2d 73 20 63 61 6e 20 62 |X.X(pty |-s can b|
|00001ba0| 65 20 61 62 62 72 65 76 | 69 61 74 65 64 20 61 73 |e abbrev|iated as|
|00001bb0| 20 73 65 73 73 2e 29 20 | 54 68 65 6e 20 77 61 74 | sess.) |Then wat|
|00001bc0| 63 68 20 74 68 65 20 76 | 69 20 70 72 6f 63 65 73 |ch the v|i proces|
|00001bd0| 73 20 77 69 74 68 20 70 | 73 0a 58 6f 72 20 62 79 |s with p|s.Xor by|
|00001be0| 20 74 79 70 69 6e 67 20 | 70 74 79 20 2d 73 54 20 | typing |pty -sT |
|00001bf0| 72 65 63 6f 6e 6e 65 63 | 74 20 78 78 2c 20 77 61 |reconnec|t xx, wa|
|00001c00| 74 63 68 69 6e 67 2c 20 | 74 68 65 6e 20 70 72 65 |tching, |then pre|
|00001c10| 73 73 69 6e 67 20 5e 43 | 2c 20 77 68 65 72 65 20 |ssing ^C|, where |
|00001c20| 78 78 0a 58 69 73 20 74 | 68 65 20 73 65 73 73 69 |xx.Xis t|he sessi|
|00001c30| 6f 6e 20 6e 61 6d 65 20 | 28 70 74 79 20 65 78 74 |on name |(pty ext|
|00001c40| 65 6e 73 69 6f 6e 29 2e | 20 57 68 65 6e 20 79 6f |ension).| When yo|
|00001c50| 75 20 77 61 6e 74 20 74 | 6f 20 72 65 63 6f 6e 6e |u want t|o reconn|
|00001c60| 65 63 74 20 61 6e 64 20 | 70 61 73 73 0a 58 63 6f |ect and |pass.Xco|
|00001c70| 6e 74 72 6f 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ntrol ch|aracters|
|00001c80| 20 74 6f 20 76 69 2c 20 | 74 79 70 65 20 25 20 70 | to vi, |type % p|
|00001c90| 74 79 20 2d 73 20 72 65 | 63 6f 6e 6e 65 63 74 20 |ty -s re|connect |
|00001ca0| 78 78 2e 20 46 72 6f 6d | 20 74 68 61 74 20 70 6f |xx. From| that po|
|00001cb0| 69 6e 74 0a 58 69 74 27 | 6c 6c 20 66 65 65 6c 20 |int.Xit'|ll feel |
|00001cc0| 6a 75 73 74 20 6c 69 6b | 65 20 61 20 6e 6f 72 6d |just lik|e a norm|
|00001cd0| 61 6c 20 76 69 2e 0a 58 | 0a 58 54 68 65 20 70 72 |al vi..X|.XThe pr|
|00001ce0| 6f 62 6c 65 6d 20 69 73 | 20 74 68 61 74 20 72 6e |oblem is| that rn|
|00001cf0| 2d 2d 2d 6c 69 6b 65 20 | 61 6c 6c 20 63 68 61 72 |---like |all char|
|00001d00| 61 63 74 65 72 2d 62 61 | 73 65 64 20 69 6e 74 65 |acter-ba|sed inte|
|00001d10| 72 61 63 74 69 76 65 0a | 58 61 70 70 6c 69 63 61 |ractive.|Xapplica|
|00001d20| 74 69 6f 6e 73 2d 2d 2d | 77 61 6e 74 73 20 74 6f |tions---|wants to|
|00001d30| 20 63 68 61 6e 67 65 20 | 74 68 65 20 74 74 79 20 | change |the tty |
|00001d40| 6d 6f 64 65 20 74 6f 20 | 72 65 61 64 20 6f 6e 65 |mode to |read one|
|00001d50| 20 63 68 61 72 61 63 74 | 65 72 20 61 74 20 61 0a | charact|er at a.|
|00001d60| 58 74 69 6d 65 20 69 6e | 73 74 65 61 64 20 6f 66 |Xtime in|stead of|
|00001d70| 20 6f 6e 65 20 6c 69 6e | 65 20 61 74 20 61 20 74 | one lin|e at a t|
|00001d80| 69 6d 65 2e 20 54 68 65 | 20 74 74 79 20 64 72 69 |ime. The| tty dri|
|00001d90| 76 65 72 20 64 6f 65 73 | 6e 27 74 20 6c 65 74 20 |ver does|n't let |
|00001da0| 69 74 20 64 6f 0a 58 74 | 68 69 73 20 69 6e 20 74 |it do.Xt|his in t|
|00001db0| 68 65 20 62 61 63 6b 67 | 72 6f 75 6e 64 2e 20 70 |he backg|round. p|
|00001dc0| 74 79 20 2d 54 20 72 6e | 20 73 6f 6c 76 65 73 20 |ty -T rn| solves |
|00001dd0| 74 68 69 73 20 62 65 63 | 61 75 73 65 20 72 6e 20 |this bec|ause rn |
|00001de0| 69 73 20 72 65 61 6c 6c | 79 20 69 6e 0a 58 74 68 |is reall|y in.Xth|
|00001df0| 65 20 66 6f 72 65 67 72 | 6f 75 6e 64 20 75 6e 64 |e foregr|ound und|
|00001e00| 65 72 20 74 68 65 20 70 | 74 79 2e 0a 58 0a 58 0a |er the p|ty..X.X.|
|00001e10| 58 36 2e 20 48 6f 77 20 | 74 6f 20 67 65 74 20 74 |X6. How |to get t|
|00001e20| 65 72 6d 69 6e 61 6c 20 | 73 70 65 65 64 20 66 72 |erminal |speed fr|
|00001e30| 6f 6d 20 73 68 65 6c 6c | 20 73 63 72 69 70 74 3f |om shell| script?|
|00001e40| 0a 58 0a 58 22 60 70 74 | 79 20 73 74 74 79 20 73 |.X.X"`pt|y stty s|
|00001e50| 70 65 65 64 60 22 2c 20 | 61 73 73 75 6d 69 6e 67 |peed`", |assuming|
|00001e60| 20 66 64 20 30 20 6f 72 | 20 66 64 20 32 20 69 73 | fd 0 or| fd 2 is|
|00001e70| 20 74 68 65 20 74 74 79 | 2e 0a 58 0a 58 54 68 65 | the tty|..X.XThe|
|00001e80| 20 70 72 6f 62 6c 65 6d | 20 69 73 20 74 68 61 74 | problem| is that|
|00001e90| 20 61 20 73 74 72 61 69 | 67 68 74 20 60 73 74 74 | a strai|ght `stt|
|00001ea0| 79 20 73 70 65 65 64 60 | 20 70 69 70 65 73 20 73 |y speed`| pipes s|
|00001eb0| 74 74 79 27 73 20 6f 75 | 74 70 75 74 20 61 77 61 |tty's ou|tput awa|
|00001ec0| 79 0a 58 66 72 6f 6d 20 | 79 6f 75 72 20 74 65 72 |y.Xfrom |your ter|
|00001ed0| 6d 69 6e 61 6c 20 61 6e | 64 20 62 61 63 6b 20 69 |minal an|d back i|
|00001ee0| 6e 74 6f 20 79 6f 75 72 | 20 73 68 65 6c 6c 2e 20 |nto your| shell. |
|00001ef0| 4d 61 6e 79 20 76 65 72 | 73 69 6f 6e 73 20 6f 66 |Many ver|sions of|
|00001f00| 20 73 74 74 79 0a 58 61 | 73 73 75 6d 65 20 74 68 | stty.Xa|ssume th|
|00001f10| 61 74 20 74 68 65 69 72 | 20 6f 75 74 70 75 74 20 |at their| output |
|00001f20| 70 6f 69 6e 74 73 20 74 | 6f 20 74 68 65 20 74 65 |points t|o the te|
|00001f30| 72 6d 69 6e 61 6c 2c 20 | 73 6f 20 74 68 65 79 20 |rminal, |so they |
|00001f40| 62 6c 6f 77 20 75 70 2e | 20 70 74 79 0a 58 73 6f |blow up.| pty.Xso|
|00001f50| 6c 76 65 73 20 74 68 69 | 73 20 62 65 63 61 75 73 |lves thi|s becaus|
|00001f60| 65 20 69 74 20 63 6f 70 | 69 65 73 20 69 6e 66 6f |e it cop|ies info|
|00001f70| 72 6d 61 74 69 6f 6e 20 | 66 72 6f 6d 20 74 68 65 |rmation |from the|
|00001f80| 20 72 65 61 6c 20 74 65 | 72 6d 69 6e 61 6c 20 74 | real te|rminal t|
|00001f90| 6f 20 74 68 65 0a 58 70 | 73 65 75 64 6f 2d 74 65 |o the.Xp|seudo-te|
|00001fa0| 72 6d 69 6e 61 6c 2e 0a | 45 4e 44 5f 4f 46 5f 46 |rminal..|END_OF_F|
|00001fb0| 49 4c 45 0a 20 20 69 66 | 20 74 65 73 74 20 34 32 |ILE. if| test 42|
|00001fc0| 30 32 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |02 -ne `|wc -c <'|
|00001fd0| 51 55 45 53 54 49 4f 4e | 53 27 60 3b 20 74 68 65 |QUESTION|S'`; the|
|00001fe0| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00001ff0| 20 5c 22 27 51 55 45 53 | 54 49 4f 4e 53 27 5c 22 | \"'QUES|TIONS'\"|
|00002000| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00002010| 72 6f 6e 67 20 73 69 7a | 65 21 0a 20 20 66 69 0a |rong siz|e!. fi.|
|00002020| 20 20 23 20 65 6e 64 20 | 6f 66 20 27 51 55 45 53 | # end |of 'QUES|
|00002030| 54 49 4f 4e 53 27 0a 66 | 69 0a 69 66 20 74 65 73 |TIONS'.f|i.if tes|
|00002040| 74 20 2d 66 20 27 54 45 | 53 54 53 27 20 2d 61 20 |t -f 'TE|STS' -a |
|00002050| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00002060| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00002070| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00002080| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00002090| 6c 65 20 5c 22 27 54 45 | 53 54 53 27 5c 22 0a 65 |le \"'TE|STS'\".e|
|000020a0| 6c 73 65 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |lse. ec|ho shar:|
|000020b0| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 54 | Extract|ing \"'T|
|000020c0| 45 53 54 53 27 5c 22 20 | 5c 28 33 36 35 37 20 63 |ESTS'\" |\(3657 c|
|000020d0| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 20 20 73 65 |haracter|s\). se|
|000020e0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 54 45 53 |d "s/^X/|/" >'TES|
|000020f0| 54 53 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |TS' <<'E|ND_OF_FI|
|00002100| 4c 45 27 0a 58 23 21 2f | 62 69 6e 2f 73 68 0a 58 |LE'.X#!/|bin/sh.X|
|00002110| 23 20 54 68 69 73 20 69 | 73 20 61 20 73 68 65 6c |# This i|s a shel|
|00002120| 6c 20 73 63 72 69 70 74 | 2e 20 46 65 65 64 20 69 |l script|. Feed i|
|00002130| 74 20 74 6f 20 73 68 2e | 0a 58 65 63 68 6f 20 27 |t to sh.|.Xecho '|
|00002140| 0a 58 48 69 2c 20 61 6e | 64 20 77 65 6c 63 6f 6d |.XHi, an|d welcom|
|00002150| 65 20 74 6f 20 74 68 65 | 20 70 74 79 20 74 65 73 |e to the| pty tes|
|00002160| 74 20 73 63 72 69 70 74 | 2e 0a 58 0a 58 41 73 20 |t script|..X.XAs |
|00002170| 69 6e 20 69 6e 73 74 61 | 6c 6c 61 74 69 6f 6e 2c |in insta|llation,|
|00002180| 20 49 27 5c 27 27 6d 20 | 6e 6f 74 20 61 63 74 75 | I'\''m |not actu|
|00002190| 61 6c 6c 79 20 67 6f 69 | 6e 67 20 74 6f 20 64 6f |ally goi|ng to do|
|000021a0| 20 61 6e 79 74 68 69 6e | 67 2e 0a 58 49 27 5c 27 | anythin|g..XI'\'|
|000021b0| 27 6c 6c 20 6a 75 73 74 | 20 67 75 69 64 65 20 79 |'ll just| guide y|
|000021c0| 6f 75 20 74 68 72 6f 75 | 67 68 20 61 20 66 65 77 |ou throu|gh a few|
|000021d0| 20 28 6e 6f 6e 2d 63 6f | 6d 70 72 65 68 65 6e 73 | (non-co|mprehens|
|000021e0| 69 76 65 29 20 74 65 73 | 74 73 2e 0a 58 0a 58 52 |ive) tes|ts..X.XR|
|000021f0| 65 6d 65 6d 62 65 72 3a | 20 4c 69 6b 65 20 61 6c |emember:| Like al|
|00002200| 6c 20 73 6f 66 74 77 61 | 72 65 2c 20 70 74 79 20 |l softwa|re, pty |
|00002210| 63 6f 6d 65 73 20 77 69 | 74 68 6f 75 74 20 77 61 |comes wi|thout wa|
|00002220| 72 72 61 6e 74 79 2c 20 | 74 6f 20 74 68 65 20 65 |rranty, |to the e|
|00002230| 78 74 65 6e 74 0a 58 70 | 65 72 6d 69 74 74 65 64 |xtent.Xp|ermitted|
|00002240| 20 62 79 20 61 70 70 6c | 69 63 61 62 6c 65 20 6c | by appl|icable l|
|00002250| 61 77 2e 20 55 73 65 20 | 69 74 20 61 74 20 79 6f |aw. Use |it at yo|
|00002260| 75 72 20 6f 77 6e 20 72 | 69 73 6b 2e 0a 58 27 0a |ur own r|isk..X'.|
|00002270| 58 0a 58 65 63 68 6f 20 | 27 2d 2d 2d 2d 2d 20 50 |X.Xecho |'----- P|
|00002280| 72 65 73 73 20 72 65 74 | 75 72 6e 20 74 6f 20 63 |ress ret|urn to c|
|00002290| 6f 6e 74 69 6e 75 65 2e | 20 27 20 7c 20 74 72 20 |ontinue.| ' | tr |
|000022a0| 2d 64 20 27 5c 30 31 32 | 27 3b 20 72 65 61 64 20 |-d '\012|'; read |
|000022b0| 63 6f 6e 74 6c 69 6e 65 | 0a 58 0a 58 65 63 68 6f |contline|.X.Xecho|
|000022c0| 20 27 0a 58 46 69 72 73 | 74 2c 20 6a 75 73 74 20 | '.XFirs|t, just |
|000022d0| 74 72 79 20 25 20 70 74 | 79 20 76 69 2e 20 59 6f |try % pt|y vi. Yo|
|000022e0| 75 20 73 68 6f 75 6c 64 | 6e 27 5c 27 27 74 20 62 |u should|n'\''t b|
|000022f0| 65 20 61 62 6c 65 20 74 | 6f 20 74 65 6c 6c 20 74 |e able t|o tell t|
|00002300| 68 65 0a 58 64 69 66 66 | 65 72 65 6e 63 65 20 62 |he.Xdiff|erence b|
|00002310| 65 74 77 65 65 6e 20 74 | 68 69 73 20 61 6e 64 20 |etween t|his and |
|00002320| 61 20 6e 6f 72 6d 61 6c | 20 76 69 3b 20 73 74 6f |a normal| vi; sto|
|00002330| 70 70 69 6e 67 20 61 6e | 64 20 72 65 73 74 61 72 |pping an|d restar|
|00002340| 74 69 6e 67 20 73 68 6f | 75 6c 64 0a 58 77 6f 72 |ting sho|uld.Xwor|
|00002350| 6b 20 70 65 72 66 65 63 | 74 6c 79 2c 20 61 73 20 |k perfec|tly, as |
|00002360| 73 68 6f 75 6c 64 20 6e | 6f 72 6d 61 6c 20 74 79 |should n|ormal ty|
|00002370| 70 69 6e 67 2e 0a 58 27 | 0a 58 0a 58 65 63 68 6f |ping..X'|.X.Xecho|
|00002380| 20 27 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 | '----- |Press re|
|00002390| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|000023a0| 2e 20 27 20 7c 20 74 72 | 20 2d 64 20 27 5c 30 31 |. ' | tr| -d '\01|
|000023b0| 32 27 3b 20 72 65 61 64 | 20 63 6f 6e 74 6c 69 6e |2'; read| contlin|
|000023c0| 65 0a 58 0a 58 65 63 68 | 6f 20 27 0a 58 4e 65 78 |e.X.Xech|o '.XNex|
|000023d0| 74 2c 20 74 72 79 20 25 | 20 70 74 79 20 2d 30 20 |t, try %| pty -0 |
|000023e0| 74 72 20 5c 21 20 5c 3f | 20 7c 20 70 74 79 20 76 |tr \! \?| | pty v|
|000023f0| 69 2e 20 54 68 69 73 20 | 73 68 6f 75 6c 64 20 77 |i. This |should w|
|00002400| 6f 72 6b 20 6a 75 73 74 | 20 6c 69 6b 65 20 74 68 |ork just| like th|
|00002410| 65 0a 58 6c 61 73 74 20 | 76 69 2c 20 77 69 74 68 |e.Xlast |vi, with|
|00002420| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 64 | the fol|lowing d|
|00002430| 69 66 66 65 72 65 6e 63 | 65 73 3a 20 31 2e 20 53 |ifferenc|es: 1. S|
|00002440| 74 6f 70 70 69 6e 67 20 | 77 69 6c 6c 20 72 65 71 |topping |will req|
|00002450| 75 69 72 65 20 74 77 6f | 0a 58 5e 5a 73 2c 20 62 |uire two|.X^Zs, b|
|00002460| 65 63 61 75 73 65 20 63 | 73 68 20 69 64 69 6f 74 |ecause c|sh idiot|
|00002470| 69 63 61 6c 6c 79 20 64 | 6f 65 73 6e 27 5c 27 27 |ically d|oesn'\''|
|00002480| 74 20 74 68 69 6e 6b 20 | 61 20 70 69 70 65 6c 69 |t think |a pipeli|
|00002490| 6e 65 20 68 61 73 20 73 | 74 6f 70 70 65 64 0a 58 |ne has s|topped.X|
|000024a0| 77 68 65 6e 20 6a 75 73 | 74 20 69 74 73 20 73 65 |when jus|t its se|
|000024b0| 63 6f 6e 64 20 63 6f 6d | 70 6f 6e 65 6e 74 20 73 |cond com|ponent s|
|000024c0| 74 6f 70 73 2e 20 32 2e | 20 45 78 69 74 69 6e 67 |tops. 2.| Exiting|
|000024d0| 20 77 69 6c 6c 20 72 65 | 71 75 69 72 65 20 61 6e | will re|quire an|
|000024e0| 20 65 78 74 72 61 0a 58 | 6c 69 6e 65 20 74 6f 20 | extra.X|line to |
|000024f0| 66 65 65 64 20 74 68 72 | 6f 75 67 68 20 74 72 2c |feed thr|ough tr,|
|00002500| 20 73 6f 20 74 68 61 74 | 20 69 74 20 67 65 74 73 | so that| it gets|
|00002510| 20 61 20 62 72 6f 6b 65 | 6e 20 70 69 70 65 3b 20 | a broke|n pipe; |
|00002520| 74 68 69 73 20 69 73 20 | 6d 6f 72 65 0a 58 73 65 |this is |more.Xse|
|00002530| 6e 73 69 62 6c 65 20 74 | 68 61 6e 20 23 31 2e 20 |nsible t|han #1. |
|00002540| 33 2e 20 41 6c 6c 20 65 | 78 63 6c 61 6d 61 74 69 |3. All e|xclamati|
|00002550| 6f 6e 20 70 6f 69 6e 74 | 73 20 77 69 6c 6c 20 62 |on point|s will b|
|00002560| 65 20 74 75 72 6e 65 64 | 20 69 6e 74 6f 20 71 75 |e turned| into qu|
|00002570| 65 73 74 69 6f 6e 0a 58 | 6d 61 72 6b 73 2e 20 54 |estion.X|marks. T|
|00002580| 68 69 73 20 68 61 73 20 | 6f 62 76 69 6f 75 73 20 |his has |obvious |
|00002590| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 2e 20 3a 77 |applicat|ions. :w|
|000025a0| 20 2f 64 65 76 2f 6e 75 | 6c 6c 20 68 65 6c 70 73 | /dev/nu|ll helps|
|000025b0| 20 74 6f 20 65 73 63 61 | 70 65 2e 0a 58 27 0a 58 | to esca|pe..X'.X|
|000025c0| 0a 58 65 63 68 6f 20 27 | 2d 2d 2d 2d 2d 20 50 72 |.Xecho '|----- Pr|
|000025d0| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|000025e0| 6e 74 69 6e 75 65 2e 20 | 27 20 7c 20 74 72 20 2d |ntinue. |' | tr -|
|000025f0| 64 20 27 5c 30 31 32 27 | 3b 20 72 65 61 64 20 63 |d '\012'|; read c|
|00002600| 6f 6e 74 6c 69 6e 65 0a | 58 0a 58 65 63 68 6f 20 |ontline.|X.Xecho |
|00002610| 27 0a 58 43 6f 6e 74 69 | 6e 75 69 6e 67 20 61 6c |'.XConti|nuing al|
|00002620| 6f 6e 67 20 74 68 65 20 | 6c 69 6e 65 73 20 6f 66 |ong the |lines of|
|00002630| 20 68 6f 77 20 74 6f 20 | 73 74 69 63 6b 20 61 6e | how to |stick an|
|00002640| 6e 6f 79 69 6e 67 20 70 | 72 6f 67 72 61 6d 73 20 |noying p|rograms |
|00002650| 69 6e 74 6f 20 61 0a 58 | 70 69 70 65 2c 20 74 72 |into a.X|pipe, tr|
|00002660| 79 20 25 20 70 74 79 20 | 2d 30 20 73 65 64 20 27 |y % pty |-0 sed '|
|00002670| 5c 27 27 73 2f 66 6f 6f | 2f 62 61 72 2f 67 27 5c |\''s/foo|/bar/g'\|
|00002680| 27 27 20 7c 20 6d 6f 72 | 65 2e 20 28 52 65 6d 65 |'' | mor|e. (Reme|
|00002690| 6d 62 65 72 20 74 68 61 | 74 20 73 65 64 20 6f 75 |mber tha|t sed ou|
|000026a0| 74 70 75 74 73 0a 58 65 | 61 63 68 20 6c 69 6e 65 |tputs.Xe|ach line|
|000026b0| 20 6f 6e 6c 79 20 61 66 | 74 65 72 20 69 74 20 72 | only af|ter it r|
|000026c0| 65 63 65 69 76 65 73 20 | 74 68 65 20 6e 65 78 74 |eceives |the next|
|000026d0| 2e 29 20 54 72 79 20 74 | 68 65 20 73 61 6d 65 20 |.) Try t|he same |
|000026e0| 74 68 69 6e 67 20 77 69 | 74 68 6f 75 74 0a 58 70 |thing wi|thout.Xp|
|000026f0| 74 79 2e 0a 58 0a 58 4e | 6f 74 65 20 74 68 61 74 |ty..X.XN|ote that|
|00002700| 20 70 74 79 20 2d 30 20 | 63 61 6e 20 62 65 20 61 | pty -0 |can be a|
|00002710| 62 62 72 65 76 69 61 74 | 65 64 20 61 73 20 63 6f |bbreviat|ed as co|
|00002720| 6e 64 6f 6d 2e 0a 58 27 | 0a 58 0a 58 65 63 68 6f |ndom..X'|.X.Xecho|
|00002730| 20 27 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 | '----- |Press re|
|00002740| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|00002750| 2e 20 27 20 7c 20 74 72 | 20 2d 64 20 27 5c 30 31 |. ' | tr| -d '\01|
|00002760| 32 27 3b 20 72 65 61 64 | 20 63 6f 6e 74 6c 69 6e |2'; read| contlin|
|00002770| 65 0a 58 0a 58 65 63 68 | 6f 20 27 0a 58 4e 65 78 |e.X.Xech|o '.XNex|
|00002780| 74 2c 20 74 72 79 20 75 | 73 69 6e 67 20 74 68 65 |t, try u|sing the|
|00002790| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 20 73 63 72 | replace|ment scr|
|000027a0| 69 70 74 20 70 72 6f 67 | 72 61 6d 2e 20 25 20 73 |ipt prog|ram. % s|
|000027b0| 63 72 69 70 74 2e 20 54 | 79 70 65 20 76 61 72 69 |cript. T|ype vari|
|000027c0| 6f 75 73 0a 58 63 6f 6d | 6d 61 6e 64 73 3b 20 74 |ous.Xcom|mands; t|
|000027d0| 72 79 20 6c 6f 67 67 69 | 6e 67 20 6f 6e 20 74 6f |ry loggi|ng on to|
|000027e0| 20 61 6e 6f 74 68 65 72 | 20 74 65 72 6d 69 6e 61 | another| termina|
|000027f0| 6c 20 61 6e 64 20 75 73 | 69 6e 67 20 74 61 6c 6b |l and us|ing talk|
|00002800| 3b 20 6f 62 73 65 72 76 | 65 0a 58 74 68 61 74 20 |; observ|e.Xthat |
|00002810| 79 6f 75 27 5c 27 27 72 | 65 20 6c 69 73 74 65 64 |you'\''r|e listed|
|00002820| 20 69 6e 20 2f 65 74 63 | 2f 75 74 6d 70 2e 20 54 | in /etc|/utmp. T|
|00002830| 72 79 20 74 68 65 20 63 | 6c 6f 6e 65 73 20 6f 66 |ry the c|lones of|
|00002840| 20 74 74 79 2c 20 6d 65 | 73 67 2c 20 62 69 66 66 | tty, me|sg, biff|
|00002850| 2c 0a 58 75 2c 20 77 61 | 6c 6c 2c 20 77 68 6f 2c |,.Xu, wa|ll, who,|
|00002860| 20 6c 6f 63 6b 2e 20 28 | 54 72 79 20 74 68 65 6d | lock. (|Try them|
|00002870| 20 75 6e 64 65 72 20 61 | 20 6e 6f 6e 2d 70 74 79 | under a| non-pty|
|00002880| 20 73 65 73 73 69 6f 6e | 20 74 6f 6f 2e 29 0a 58 | session| too.).X|
|00002890| 27 0a 58 0a 58 65 63 68 | 6f 20 27 2d 2d 2d 2d 2d |'.X.Xech|o '-----|
|000028a0| 20 50 72 65 73 73 20 72 | 65 74 75 72 6e 20 74 6f | Press r|eturn to|
|000028b0| 20 63 6f 6e 74 69 6e 75 | 65 2e 20 27 20 7c 20 74 | continu|e. ' | t|
|000028c0| 72 20 2d 64 20 27 5c 30 | 31 32 27 3b 20 72 65 61 |r -d '\0|12'; rea|
|000028d0| 64 20 63 6f 6e 74 6c 69 | 6e 65 0a 58 0a 58 65 63 |d contli|ne.X.Xec|
|000028e0| 68 6f 20 27 0a 58 4d 75 | 63 68 20 6f 66 20 74 68 |ho '.XMu|ch of th|
|000028f0| 65 20 66 75 6e 20 6f 66 | 20 70 74 79 20 69 73 20 |e fun of| pty is |
|00002900| 69 6e 20 64 69 73 63 6f | 6e 6e 65 63 74 69 6e 67 |in disco|nnecting|
|00002910| 20 61 6e 64 20 72 65 63 | 6f 6e 6e 65 63 74 69 6e | and rec|onnectin|
|00002920| 67 20 73 65 73 73 69 6f | 6e 73 2e 0a 58 49 66 20 |g sessio|ns..XIf |
|00002930| 79 6f 75 27 5c 27 27 72 | 65 20 61 6d 62 69 74 69 |you'\''r|e ambiti|
|00002940| 6f 75 73 2c 20 74 72 79 | 20 25 20 73 65 73 73 20 |ous, try| % sess |
|00002950| 73 68 2e 20 5e 5a 20 77 | 69 6c 6c 20 67 65 74 20 |sh. ^Z w|ill get |
|00002960| 79 6f 75 20 6f 75 74 20 | 61 6e 64 20 62 61 63 6b |you out |and back|
|00002970| 20 69 6e 2e 0a 58 54 72 | 79 20 73 65 73 73 6e 61 | in..XTr|y sessna|
|00002980| 6d 65 20 77 69 74 68 6f | 75 74 20 61 6e 20 61 72 |me witho|ut an ar|
|00002990| 67 75 6d 65 6e 74 3b 20 | 74 72 79 20 69 74 20 77 |gument; |try it w|
|000029a0| 69 74 68 20 61 6e 20 61 | 72 67 75 6d 65 6e 74 2e |ith an a|rgument.|
|000029b0| 20 54 72 79 20 73 65 73 | 73 6c 69 73 74 2e 0a 58 | Try ses|slist..X|
|000029c0| 46 69 6e 61 6c 6c 79 2c | 20 74 72 79 20 24 20 64 |Finally,| try $ d|
|000029d0| 69 73 63 6f 6e 6e 65 63 | 74 2c 20 61 6e 64 20 67 |isconnec|t, and g|
|000029e0| 6f 20 6f 6e 20 74 6f 20 | 74 68 65 20 6e 65 78 74 |o on to |the next|
|000029f0| 20 70 61 72 74 20 6f 66 | 20 74 68 69 73 20 73 63 | part of| this sc|
|00002a00| 72 69 70 74 2e 0a 58 27 | 0a 58 0a 58 65 63 68 6f |ript..X'|.X.Xecho|
|00002a10| 20 27 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 | '----- |Press re|
|00002a20| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|00002a30| 2e 20 27 20 7c 20 74 72 | 20 2d 64 20 27 5c 30 31 |. ' | tr| -d '\01|
|00002a40| 32 27 3b 20 72 65 61 64 | 20 63 6f 6e 74 6c 69 6e |2'; read| contlin|
|00002a50| 65 0a 58 0a 58 65 63 68 | 6f 20 27 0a 58 41 6c 74 |e.X.Xech|o '.XAlt|
|00002a60| 68 6f 75 67 68 20 69 74 | 20 6c 6f 6f 6b 73 20 6c |hough it| looks l|
|00002a70| 69 6b 65 20 79 6f 75 72 | 20 73 68 20 73 65 73 73 |ike your| sh sess|
|00002a80| 69 6f 6e 20 68 61 73 20 | 66 69 6e 69 73 68 65 64 |ion has |finished|
|00002a90| 2c 20 69 74 27 5c 27 27 | 73 20 61 63 74 75 61 6c |, it'\''|s actual|
|00002aa0| 6c 79 0a 58 73 69 74 74 | 69 6e 67 20 69 6e 20 6c |ly.Xsitt|ing in l|
|00002ab0| 69 6d 62 6f 2c 20 77 61 | 69 74 69 6e 67 20 66 6f |imbo, wa|iting fo|
|00002ac0| 72 20 79 6f 75 20 74 6f | 20 72 65 63 6f 6e 6e 65 |r you to| reconne|
|00002ad0| 63 74 2e 20 59 6f 75 20 | 63 61 6e 20 73 74 69 6c |ct. You |can stil|
|00002ae0| 6c 20 73 65 65 20 69 74 | 0a 58 75 6e 64 65 72 20 |l see it|.Xunder |
|00002af0| 77 68 6f 2c 20 73 65 73 | 73 6c 69 73 74 2c 20 6f |who, ses|slist, o|
|00002b00| 72 20 70 73 2e 20 4e 6f | 77 20 74 72 79 20 25 20 |r ps. No|w try % |
|00002b10| 73 65 73 73 20 72 65 63 | 6f 6e 6e 65 63 74 20 71 |sess rec|onnect q|
|00002b20| 37 20 20 6f 72 20 77 68 | 61 74 65 76 65 72 20 74 |7 or wh|atever t|
|00002b30| 68 65 0a 58 65 78 74 65 | 6e 73 69 6f 6e 20 6f 66 |he.Xexte|nsion of|
|00002b40| 20 74 68 65 20 64 69 73 | 63 6f 6e 6e 65 63 74 65 | the dis|connecte|
|00002b50| 64 20 73 65 73 73 69 6f | 6e 20 69 73 3b 20 79 6f |d sessio|n is; yo|
|00002b60| 75 20 73 68 6f 75 6c 64 | 20 62 65 20 72 69 67 68 |u should| be righ|
|00002b70| 74 20 62 61 63 6b 20 69 | 6e 2e 0a 58 0a 58 59 6f |t back i|n..X.XYo|
|00002b80| 75 20 63 61 6e 20 74 72 | 79 20 74 68 65 20 73 61 |u can tr|y the sa|
|00002b90| 6d 65 20 74 68 69 6e 67 | 20 62 79 20 61 63 74 75 |me thing| by actu|
|00002ba0| 61 6c 6c 79 20 68 61 6e | 67 69 6e 67 20 75 70 20 |ally han|ging up |
|00002bb0| 79 6f 75 72 20 63 6f 6e | 6e 65 63 74 69 6f 6e 2c |your con|nection,|
|00002bc0| 20 74 68 65 6e 0a 58 6c | 6f 67 67 69 6e 67 20 69 | then.Xl|ogging i|
|00002bd0| 6e 20 61 67 61 69 6e 20 | 61 6e 64 20 72 65 63 6f |n again |and reco|
|00002be0| 6e 6e 65 63 74 69 6e 67 | 2e 0a 58 27 0a 58 0a 58 |nnecting|..X'.X.X|
|00002bf0| 65 63 68 6f 20 27 2d 2d | 2d 2d 2d 20 50 72 65 73 |echo '--|--- Pres|
|00002c00| 73 20 72 65 74 75 72 6e | 20 74 6f 20 63 6f 6e 74 |s return| to cont|
|00002c10| 69 6e 75 65 2e 20 27 20 | 7c 20 74 72 20 2d 64 20 |inue. ' || tr -d |
|00002c20| 27 5c 30 31 32 27 3b 20 | 72 65 61 64 20 63 6f 6e |'\012'; |read con|
|00002c30| 74 6c 69 6e 65 0a 58 0a | 58 65 63 68 6f 20 27 0a |tline.X.|Xecho '.|
|00002c40| 58 46 6f 72 20 6f 6e 65 | 20 66 69 6e 61 6c 20 74 |XFor one| final t|
|00002c50| 72 69 63 6b 2c 0a 58 25 | 20 73 65 73 73 20 73 68 |rick,.X%| sess sh|
|00002c60| 0a 58 24 20 50 53 31 3d | 46 4f 4f 2e 3b 20 64 69 |.X$ PS1=|FOO.; di|
|00002c70| 73 63 6f 6e 6e 65 63 74 | 0a 58 25 20 73 65 73 73 |sconnect|.X% sess|
|00002c80| 20 73 68 0a 58 24 20 73 | 65 73 73 6c 69 73 74 0a | sh.X$ s|esslist.|
|00002c90| 58 2e 2e 2e 0a 58 24 20 | 50 53 31 3d 42 41 52 2e |X....X$ |PS1=BAR.|
|00002ca0| 3b 20 72 65 63 6f 6e 6e | 65 63 74 20 71 37 3b 20 |; reconn|ect q7; |
|00002cb0| 64 69 73 63 6f 6e 6e 65 | 63 74 0a 58 46 4f 4f 2e |disconne|ct.XFOO.|
|00002cc0| 72 65 63 6f 6e 6e 65 63 | 74 20 70 34 3b 20 64 69 |reconnec|t p4; di|
|00002cd0| 73 63 6f 6e 6e 65 63 74 | 0a 58 42 41 52 2e 72 65 |sconnect|.XBAR.re|
|00002ce0| 63 6f 6e 6e 65 63 74 20 | 71 37 3b 20 64 69 73 63 |connect |q7; disc|
|00002cf0| 6f 6e 6e 65 63 74 0a 58 | 46 4f 4f 2e 65 63 68 6f |onnect.X|FOO.echo|
|00002d00| 20 4e 65 61 74 2c 20 66 | 6c 69 70 70 69 6e 67 20 | Neat, f|lipping |
|00002d10| 72 69 67 68 74 20 62 61 | 63 6b 20 61 6e 64 20 66 |right ba|ck and f|
|00002d20| 6f 72 74 68 21 0a 58 27 | 0a 58 0a 58 65 63 68 6f |orth!.X'|.X.Xecho|
|00002d30| 20 27 2d 2d 2d 2d 2d 20 | 50 72 65 73 73 20 72 65 | '----- |Press re|
|00002d40| 74 75 72 6e 20 74 6f 20 | 63 6f 6e 74 69 6e 75 65 |turn to |continue|
|00002d50| 2e 20 27 20 7c 20 74 72 | 20 2d 64 20 27 5c 30 31 |. ' | tr| -d '\01|
|00002d60| 32 27 3b 20 72 65 61 64 | 20 63 6f 6e 74 6c 69 6e |2'; read| contlin|
|00002d70| 65 0a 58 0a 58 65 63 68 | 6f 20 27 0a 58 54 68 61 |e.X.Xech|o '.XTha|
|00002d80| 74 27 5c 27 27 73 20 69 | 74 21 20 4d 61 6b 65 20 |t'\''s i|t! Make |
|00002d90| 73 75 72 65 20 74 68 65 | 20 6d 61 6e 75 61 6c 20 |sure the| manual |
|00002da0| 70 61 67 65 73 20 61 6e | 64 20 70 72 6f 67 72 61 |pages an|d progra|
|00002db0| 6d 73 20 61 72 65 20 65 | 61 73 69 6c 79 0a 58 61 |ms are e|asily.Xa|
|00002dc0| 63 63 65 73 73 69 62 6c | 65 2e 20 54 6f 20 72 65 |ccessibl|e. To re|
|00002dd0| 70 65 61 74 20 61 20 6e | 6f 74 65 20 66 72 6f 6d |peat a n|ote from|
|00002de0| 20 49 4e 53 54 41 4c 4c | 3a 0a 58 0a 58 49 66 20 | INSTALL|:.X.XIf |
|00002df0| 79 6f 75 20 6d 61 6b 65 | 20 69 74 20 74 68 72 6f |you make| it thro|
|00002e00| 75 67 68 20 69 6e 73 74 | 61 6c 6c 61 74 69 6f 6e |ugh inst|allation|
|00002e10| 20 61 6e 64 20 74 65 73 | 74 69 6e 67 20 61 6e 64 | and tes|ting and|
|00002e20| 20 67 65 74 20 70 74 79 | 20 72 75 6e 6e 69 6e 67 | get pty| running|
|00002e30| 2c 0a 58 70 6c 65 61 73 | 65 20 73 65 6e 64 20 61 |,.Xpleas|e send a|
|00002e40| 20 6e 6f 74 65 20 74 6f | 20 74 68 65 20 61 75 74 | note to| the aut|
|00002e50| 68 6f 72 2c 20 44 61 6e | 20 42 65 72 6e 73 74 65 |hor, Dan| Bernste|
|00002e60| 69 6e 2c 20 6f 6e 20 74 | 68 65 20 49 6e 74 65 72 |in, on t|he Inter|
|00002e70| 6e 65 74 0a 58 61 74 20 | 62 72 6e 73 74 6e 64 40 |net.Xat |brnstnd@|
|00002e80| 6e 79 75 2e 65 64 75 2e | 20 4c 65 74 20 68 69 6d |nyu.edu.| Let him|
|00002e90| 20 6b 6e 6f 77 20 79 6f | 75 72 20 63 6f 6d 70 75 | know yo|ur compu|
|00002ea0| 74 65 72 20 6d 6f 64 65 | 6c 2c 20 4f 53 20 76 65 |ter mode|l, OS ve|
|00002eb0| 72 73 69 6f 6e 2c 20 61 | 6e 64 0a 58 77 68 61 74 |rsion, a|nd.Xwhat|
|00002ec0| 20 63 68 61 6e 67 65 73 | 20 79 6f 75 20 68 61 64 | changes| you had|
|00002ed0| 20 74 6f 20 6d 61 6b 65 | 2e 20 49 66 20 79 6f 75 | to make|. If you|
|00002ee0| 20 68 61 76 65 20 61 6e | 79 20 74 72 6f 75 62 6c | have an|y troubl|
|00002ef0| 65 2c 20 70 6c 65 61 73 | 65 20 61 6c 73 6f 20 67 |e, pleas|e also g|
|00002f00| 65 74 0a 58 69 6e 20 74 | 6f 75 63 68 20 77 69 74 |et.Xin t|ouch wit|
|00002f10| 68 20 74 68 65 20 61 75 | 74 68 6f 72 2e 20 49 66 |h the au|thor. If|
|00002f20| 20 79 6f 75 20 68 61 76 | 65 20 61 20 64 69 66 66 | you hav|e a diff|
|00002f30| 65 72 65 6e 74 20 6b 69 | 6e 64 20 6f 66 20 73 79 |erent ki|nd of sy|
|00002f40| 73 74 65 6d 20 77 69 74 | 68 0a 58 70 73 65 75 64 |stem wit|h.Xpseud|
|00002f50| 6f 2d 74 65 72 6d 69 6e | 61 6c 20 73 75 70 70 6f |o-termin|al suppo|
|00002f60| 72 74 20 74 68 61 74 20 | 63 6f 75 6c 64 20 75 73 |rt that |could us|
|00002f70| 65 20 61 20 70 74 79 20 | 70 6f 72 74 2c 20 74 68 |e a pty |port, th|
|00002f80| 65 20 61 75 74 68 6f 72 | 20 77 6f 75 6c 64 0a 58 |e author| would.X|
|00002f90| 6c 6f 76 65 20 74 6f 20 | 68 65 61 72 20 61 62 6f |love to |hear abo|
|00002fa0| 75 74 20 69 74 2e 0a 58 | 0a 58 54 68 61 6e 6b 73 |ut it..X|.XThanks|
|00002fb0| 21 0a 58 27 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |!.X'.END|_OF_FILE|
|00002fc0| 0a 20 20 69 66 20 74 65 | 73 74 20 33 36 35 37 20 |. if te|st 3657 |
|00002fd0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 54 45 53 |-ne `wc |-c <'TES|
|00002fe0| 54 53 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |TS'`; th|en. e|
|00002ff0| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 54 45 53 |cho shar|: \"'TES|
|00003000| 54 53 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |TS'\" un|packed w|
|00003010| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00003020| 20 20 66 69 0a 20 20 23 | 20 65 6e 64 20 6f 66 20 | fi. #| end of |
|00003030| 27 54 45 53 54 53 27 0a | 66 69 0a 69 66 20 74 65 |'TESTS'.|fi.if te|
|00003040| 73 74 20 2d 66 20 27 70 | 61 74 63 68 2f 4d 61 6b |st -f 'p|atch/Mak|
|00003050| 65 66 69 6c 65 27 20 2d | 61 20 22 24 7b 31 7d 22 |efile' -|a "${1}"|
|00003060| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00003070| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00003080| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00003090| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|000030a0| 70 61 74 63 68 2f 4d 61 | 6b 65 66 69 6c 65 27 5c |patch/Ma|kefile'\|
|000030b0| 22 0a 65 6c 73 65 0a 20 | 20 65 63 68 6f 20 73 68 |".else. | echo sh|
|000030c0| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|000030d0| 22 27 70 61 74 63 68 2f | 4d 61 6b 65 66 69 6c 65 |"'patch/|Makefile|
|000030e0| 27 5c 22 20 5c 28 32 38 | 31 33 20 63 68 61 72 61 |'\" \(28|13 chara|
|000030f0| 63 74 65 72 73 5c 29 0a | 20 20 73 65 64 20 22 73 |cters\).| sed "s|
|00003100| 2f 5e 58 2f 2f 22 20 3e | 27 70 61 74 63 68 2f 4d |/^X//" >|'patch/M|
|00003110| 61 6b 65 66 69 6c 65 27 | 20 3c 3c 27 45 4e 44 5f |akefile'| <<'END_|
|00003120| 4f 46 5f 46 49 4c 45 27 | 0a 58 74 70 61 74 3a 20 |OF_FILE'|.Xtpat: |
|00003130| 74 70 61 74 31 0a 58 0a | 58 74 70 61 74 31 3a 20 |tpat1.X.|Xtpat1: |
|00003140| 69 67 6e 74 74 0a 58 09 | 65 63 68 6f 20 27 31 2e |igntt.X.|echo '1.|
|00003150| 20 47 65 74 20 74 68 65 | 20 6e 65 77 20 74 65 6c | Get the| new tel|
|00003160| 6e 65 74 64 20 66 72 6f | 6d 20 75 63 62 61 72 70 |netd fro|m ucbarp|
|00003170| 61 2e 62 65 72 6b 65 6c | 65 79 2e 65 64 75 3a 27 |a.berkel|ey.edu:'|
|00003180| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 54 68 | 1>&2.X.|echo 'Th|
|00003190| 69 73 20 63 6f 6d 6d 61 | 6e 64 20 77 69 6c 6c 20 |is comma|nd will |
|000031a0| 72 65 74 72 69 65 76 65 | 20 74 65 6c 6e 65 74 2e |retrieve| telnet.|
|000031b0| 39 30 2e 30 36 2e 32 38 | 2e 74 61 72 2e 5a 2e 27 |90.06.28|.tar.Z.'|
|000031c0| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 54 6f | 1>&2.X.|echo 'To|
|000031d0| 20 65 78 65 63 75 74 65 | 20 69 74 2c 20 6a 75 73 | execute| it, jus|
|000031e0| 74 20 70 72 65 73 73 20 | 72 65 74 75 72 6e 2e 27 |t press |return.'|
|000031f0| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 54 6f | 1>&2.X.|echo 'To|
|00003200| 20 63 6f 6e 74 69 6e 75 | 65 2c 20 6a 75 73 74 20 | continu|e, just |
|00003210| 6d 61 6b 65 20 74 70 61 | 74 32 20 3e 20 2f 64 65 |make tpa|t2 > /de|
|00003220| 76 2f 6e 75 6c 6c 2e 27 | 20 31 3e 26 32 0a 58 09 |v/null.'| 1>&2.X.|
|00003230| 2e 2f 69 67 6e 74 74 20 | 74 69 6f 63 73 74 69 20 |./igntt |tiocsti |
|00003240| 27 66 74 70 20 2d 6e 20 | 31 32 38 2e 33 32 2e 31 |'ftp -n |128.32.1|
|00003250| 33 30 2e 31 31 20 3c 20 | 54 45 4c 4e 45 54 2e 46 |30.11 < |TELNET.F|
|00003260| 54 50 27 0a 58 0a 58 74 | 70 61 74 32 3a 20 69 67 |TP'.X.Xt|pat2: ig|
|00003270| 6e 74 74 0a 58 09 65 63 | 68 6f 20 27 32 2e 20 55 |ntt.X.ec|ho '2. U|
|00003280| 6e 70 61 63 6b 20 74 65 | 6c 6e 65 74 64 3a 27 20 |npack te|lnetd:' |
|00003290| 31 3e 26 32 0a 58 09 65 | 63 68 6f 20 27 54 68 69 |1>&2.X.e|cho 'Thi|
|000032a0| 73 20 69 73 20 73 65 6c | 66 2d 65 78 70 6c 61 6e |s is sel|f-explan|
|000032b0| 61 74 6f 72 79 2e 20 59 | 6f 75 20 6d 61 79 20 77 |atory. Y|ou may w|
|000032c0| 61 6e 74 20 74 61 72 20 | 78 76 66 20 74 6f 20 73 |ant tar |xvf to s|
|000032d0| 65 65 20 61 20 66 69 6c | 65 20 6c 69 73 74 2e 27 |ee a fil|e list.'|
|000032e0| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 54 6f | 1>&2.X.|echo 'To|
|000032f0| 20 63 6f 6e 74 69 6e 75 | 65 2c 20 6a 75 73 74 20 | continu|e, just |
|00003300| 6d 61 6b 65 20 74 70 61 | 74 33 20 3e 20 2f 64 65 |make tpa|t3 > /de|
|00003310| 76 2f 6e 75 6c 6c 2e 27 | 20 31 3e 26 32 0a 58 09 |v/null.'| 1>&2.X.|
|00003320| 69 66 20 74 65 73 74 20 | 2d 66 20 74 65 6c 6e 65 |if test |-f telne|
|00003330| 74 2e 39 30 2e 30 36 2e | 32 38 2e 74 61 72 2e 5a |t.90.06.|28.tar.Z|
|00003340| 20 3b 5c 0a 58 09 74 68 | 65 6e 20 2e 2f 69 67 6e | ;\.X.th|en ./ign|
|00003350| 74 74 20 74 69 6f 63 73 | 74 69 20 27 75 6e 63 6f |tt tiocs|ti 'unco|
|00003360| 6d 70 72 65 73 73 20 3c | 20 74 65 6c 6e 65 74 2e |mpress <| telnet.|
|00003370| 39 30 2e 30 36 2e 32 38 | 2e 74 61 72 2e 5a 20 7c |90.06.28|.tar.Z ||
|00003380| 20 74 61 72 20 78 66 20 | 2d 27 20 3b 5c 0a 58 09 | tar xf |-' ;\.X.|
|00003390| 65 6c 73 65 20 65 63 68 | 6f 20 27 41 61 63 6b 21 |else ech|o 'Aack!|
|000033a0| 20 74 65 6c 6e 65 74 2e | 39 30 2e 30 36 2e 32 38 | telnet.|90.06.28|
|000033b0| 2e 74 61 72 2e 5a 20 64 | 6f 65 73 6e 27 5c 27 27 |.tar.Z d|oesn'\''|
|000033c0| 74 20 65 78 69 73 74 21 | 27 20 3b 5c 0a 58 09 66 |t exist!|' ;\.X.f|
|000033d0| 69 0a 58 0a 58 74 70 61 | 74 33 3a 20 69 67 6e 74 |i.X.Xtpa|t3: ignt|
|000033e0| 74 0a 58 09 65 63 68 6f | 20 27 33 2e 20 41 70 70 |t.X.echo| '3. App|
|000033f0| 6c 79 20 74 68 65 73 65 | 20 70 61 74 63 68 65 73 |ly these| patches|
|00003400| 2c 20 61 6e 64 20 63 68 | 65 63 6b 20 74 68 61 74 |, and ch|eck that|
|00003410| 20 74 68 65 79 27 5c 27 | 27 72 65 20 73 61 66 65 | they'\'|'re safe|
|00003420| 3a 27 20 31 3e 26 32 0a | 58 09 65 63 68 6f 20 27 |:' 1>&2.|X.echo '|
|00003430| 49 66 20 61 6c 6c 20 67 | 6f 65 73 20 77 65 6c 6c |If all g|oes well|
|00003440| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 73 65 65 |, you sh|ould see|
|00003450| 20 61 20 66 6c 6f 6f 64 | 20 6f 66 20 73 75 63 63 | a flood| of succ|
|00003460| 65 73 73 66 75 6c 20 70 | 61 74 63 68 20 6f 75 74 |essful p|atch out|
|00003470| 70 75 74 2e 27 20 31 3e | 26 32 0a 58 09 65 63 68 |put.' 1>|&2.X.ech|
|00003480| 6f 20 27 54 68 65 20 75 | 6e 69 66 64 65 66 73 20 |o 'The u|nifdefs |
|00003490| 61 72 65 20 74 6f 20 63 | 68 65 63 6b 20 74 68 65 |are to c|heck the|
|000034a0| 20 73 61 66 65 74 79 20 | 6f 66 20 74 68 65 20 70 | safety |of the p|
|000034b0| 61 74 63 68 65 73 3b 27 | 20 31 3e 26 32 0a 58 09 |atches;'| 1>&2.X.|
|000034c0| 65 63 68 6f 20 27 61 73 | 20 79 6f 75 20 77 69 6c |echo 'as| you wil|
|000034d0| 6c 20 73 65 65 2c 20 74 | 68 65 20 70 61 74 63 68 |l see, t|he patch|
|000034e0| 65 73 20 64 6f 20 6e 6f | 74 68 69 6e 67 20 77 69 |es do no|thing wi|
|000034f0| 74 68 20 55 53 45 50 54 | 59 20 75 6e 64 65 66 69 |th USEPT|Y undefi|
|00003500| 6e 65 64 2e 27 20 31 3e | 26 32 0a 58 09 65 63 68 |ned.' 1>|&2.X.ech|
|00003510| 6f 20 27 54 6f 20 63 6f | 6e 74 69 6e 75 65 2c 20 |o 'To co|ntinue, |
|00003520| 6a 75 73 74 20 6d 61 6b | 65 20 74 70 61 74 34 20 |just mak|e tpat4 |
|00003530| 3e 20 2f 64 65 76 2f 6e | 75 6c 6c 2e 27 20 31 3e |> /dev/n|ull.' 1>|
|00003540| 26 32 0a 58 09 69 66 20 | 74 65 73 74 20 2d 64 20 |&2.X.if |test -d |
|00003550| 74 65 6c 6e 65 74 2e 39 | 30 2e 30 36 2e 32 38 20 |telnet.9|0.06.28 |
|00003560| 3b 5c 0a 58 09 74 68 65 | 6e 20 2e 2f 69 67 6e 74 |;\.X.the|n ./ignt|
|00003570| 74 20 74 69 6f 63 73 74 | 69 20 27 63 64 20 74 65 |t tiocst|i 'cd te|
|00003580| 6c 6e 65 74 2e 39 30 2e | 30 36 2e 32 38 2f 74 65 |lnet.90.|06.28/te|
|00003590| 6c 6e 65 74 64 3b 20 27 | 20 5c 0a 58 09 09 09 20 |lnetd; '| \.X... |
|000035a0| 20 20 20 20 27 70 61 74 | 63 68 20 3c 20 2e 2e 2f | 'pat|ch < ../|
|000035b0| 2e 2e 2f 74 65 6c 6e 65 | 74 64 2e 39 30 2e 30 36 |../telne|td.90.06|
|000035c0| 2e 32 38 2e 70 61 74 63 | 68 3b 20 27 20 5c 0a 58 |.28.patc|h; ' \.X|
|000035d0| 09 09 09 20 20 20 20 20 | 27 75 6e 69 66 64 65 66 |... |'unifdef|
|000035e0| 20 2d 55 55 53 45 50 54 | 59 20 73 79 73 5f 74 65 | -UUSEPT|Y sys_te|
|000035f0| 72 6d 2e 63 20 7c 20 63 | 6d 70 20 2d 20 73 79 73 |rm.c | c|mp - sys|
|00003600| 5f 74 65 72 6d 2e 63 2e | 6f 72 69 67 3b 20 27 20 |_term.c.|orig; ' |
|00003610| 5c 0a 58 09 09 09 20 20 | 20 20 20 27 75 6e 69 66 |\.X... | 'unif|
|00003620| 64 65 66 20 2d 55 55 53 | 45 50 54 59 20 74 65 6c |def -UUS|EPTY tel|
|00003630| 6e 65 74 64 2e 63 20 7c | 20 63 6d 70 20 2d 20 74 |netd.c || cmp - t|
|00003640| 65 6c 6e 65 74 64 2e 63 | 2e 6f 72 69 67 3b 20 27 |elnetd.c|.orig; '|
|00003650| 20 5c 0a 58 09 09 09 20 | 20 20 20 20 27 75 6e 69 | \.X... | 'uni|
|00003660| 66 64 65 66 20 2d 55 55 | 53 45 50 54 59 20 70 61 |fdef -UU|SEPTY pa|
|00003670| 74 68 6e 61 6d 65 73 2e | 68 20 7c 20 63 6d 70 20 |thnames.|h | cmp |
|00003680| 2d 20 70 61 74 68 6e 61 | 6d 65 73 2e 68 2e 6f 72 |- pathna|mes.h.or|
|00003690| 69 67 3b 20 27 20 5c 0a | 58 09 09 09 20 20 20 20 |ig; ' \.|X... |
|000036a0| 20 27 63 64 20 2e 2e 2f | 2e 2e 27 20 3b 5c 0a 58 | 'cd ../|..' ;\.X|
|000036b0| 09 66 69 0a 58 0a 58 74 | 70 61 74 34 3a 20 69 67 |.fi.X.Xt|pat4: ig|
|000036c0| 6e 74 74 0a 58 09 65 63 | 68 6f 20 27 34 2e 20 43 |ntt.X.ec|ho '4. C|
|000036d0| 68 65 63 6b 20 74 68 65 | 20 70 74 79 20 70 61 74 |heck the| pty pat|
|000036e0| 68 6e 61 6d 65 20 61 6e | 64 20 66 69 78 20 69 74 |hname an|d fix it|
|000036f0| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 3a 27 20 | if nece|ssary:' |
|00003700| 31 3e 26 32 0a 58 09 65 | 63 68 6f 20 27 53 69 6e |1>&2.X.e|cho 'Sin|
|00003710| 63 65 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 73 |ce there| is no s|
|00003720| 74 61 6e 64 61 72 64 20 | 6c 69 6b 65 20 2f 69 6e |tandard |like /in|
|00003730| 73 74 20 66 6f 72 20 77 | 68 65 72 65 20 70 72 6f |st for w|here pro|
|00003740| 67 72 61 6d 73 20 67 6f | 2c 27 20 31 3e 26 32 0a |grams go|,' 1>&2.|
|00003750| 58 09 65 63 68 6f 20 27 | 79 6f 75 20 68 61 64 20 |X.echo '|you had |
|00003760| 62 65 74 74 65 72 20 6d | 61 6b 65 20 73 75 72 65 |better m|ake sure|
|00003770| 20 74 65 6c 6e 65 74 64 | 27 73 20 70 61 74 68 6e | telnetd|'s pathn|
|00003780| 61 6d 65 73 2e 68 20 69 | 73 20 63 6f 72 72 65 63 |ames.h i|s correc|
|00003790| 74 2e 27 20 31 3e 26 32 | 0a 58 09 65 63 68 6f 20 |t.' 1>&2|.X.echo |
|000037a0| 27 54 6f 20 63 6f 6e 74 | 69 6e 75 65 2c 20 6a 75 |'To cont|inue, ju|
|000037b0| 73 74 20 6d 61 6b 65 20 | 74 70 61 74 35 20 3e 20 |st make |tpat5 > |
|000037c0| 2f 64 65 76 2f 6e 75 6c | 6c 2e 27 20 31 3e 26 32 |/dev/nul|l.' 1>&2|
|000037d0| 0a 58 09 2e 2f 69 67 6e | 74 74 20 74 69 6f 63 73 |.X../ign|tt tiocs|
|000037e0| 74 69 20 27 67 72 65 70 | 20 50 41 54 48 5f 50 54 |ti 'grep| PATH_PT|
|000037f0| 59 20 74 65 6c 6e 65 74 | 2e 39 30 2e 30 36 2e 32 |Y telnet|.90.06.2|
|00003800| 38 2f 74 65 6c 6e 65 74 | 64 2f 70 61 74 68 6e 61 |8/telnet|d/pathna|
|00003810| 6d 65 73 2e 68 27 0a 58 | 0a 58 74 70 61 74 35 3a |mes.h'.X|.Xtpat5:|
|00003820| 20 69 67 6e 74 74 0a 58 | 09 65 63 68 6f 20 27 35 | igntt.X|.echo '5|
|00003830| 2e 20 41 64 64 20 73 6f | 63 6b 2e 6f 20 61 6e 64 |. Add so|ck.o and|
|00003840| 20 73 6f 63 6b 2e 68 20 | 73 79 6d 6c 69 6e 6b 73 | sock.h |symlinks|
|00003850| 3a 27 20 31 3e 26 32 0a | 58 09 65 63 68 6f 20 27 |:' 1>&2.|X.echo '|
|00003860| 54 68 69 73 20 69 73 20 | 73 65 6c 66 2d 65 78 70 |This is |self-exp|
|00003870| 6c 61 6e 61 74 6f 72 79 | 2e 27 20 31 3e 26 32 0a |lanatory|.' 1>&2.|
|00003880| 58 09 65 63 68 6f 20 27 | 54 6f 20 63 6f 6e 74 69 |X.echo '|To conti|
|00003890| 6e 75 65 2c 20 6a 75 73 | 74 20 6d 61 6b 65 20 74 |nue, jus|t make t|
|000038a0| 70 61 74 36 20 3e 20 2f | 64 65 76 2f 6e 75 6c 6c |pat6 > /|dev/null|
|000038b0| 2e 27 20 31 3e 26 32 0a | 58 09 2e 2f 69 67 6e 74 |.' 1>&2.|X../ignt|
|000038c0| 74 20 74 69 6f 63 73 74 | 69 20 27 6c 6e 20 2d 73 |t tiocst|i 'ln -s|
|000038d0| 20 2e 2e 2f 2e 2e 2f 2e | 2e 2f 73 6f 63 6b 2e 7b | ../../.|./sock.{|
|000038e0| 68 2c 6f 7d 20 74 65 6c | 6e 65 74 2e 39 30 2e 30 |h,o} tel|net.90.0|
|000038f0| 36 2e 32 38 2f 74 65 6c | 6e 65 74 64 27 0a 58 0a |6.28/tel|netd'.X.|
|00003900| 58 74 70 61 74 36 3a 20 | 69 67 6e 74 74 0a 58 09 |Xtpat6: |igntt.X.|
|00003910| 65 63 68 6f 20 27 36 2e | 20 50 72 65 70 61 72 69 |echo '6.| Prepari|
|00003920| 6e 67 20 66 6f 72 20 63 | 6f 6d 70 69 6c 65 3a 20 |ng for c|ompile: |
|00003930| 45 64 69 74 20 4d 61 6b | 65 66 69 6c 65 20 61 6e |Edit Mak|efile an|
|00003940| 64 20 4d 61 6b 65 66 69 | 6c 65 2e 67 65 6e 65 72 |d Makefi|le.gener|
|00003950| 69 63 2e 27 20 31 3e 26 | 32 0a 58 09 65 63 68 6f |ic.' 1>&|2.X.echo|
|00003960| 20 27 59 6f 75 20 6d 75 | 73 74 20 61 74 20 6c 65 | 'You mu|st at le|
|00003970| 61 73 74 20 61 64 64 20 | 2d 44 55 53 45 50 54 59 |ast add |-DUSEPTY|
|00003980| 20 74 6f 20 43 46 4c 41 | 47 53 20 61 6e 64 20 73 | to CFLA|GS and s|
|00003990| 6f 63 6b 2e 6f 20 74 6f | 20 4f 42 4a 53 27 20 31 |ock.o to| OBJS' 1|
|000039a0| 3e 26 32 0a 58 09 65 63 | 68 6f 20 27 69 6e 20 4d |>&2.X.ec|ho 'in M|
|000039b0| 61 6b 65 66 69 6c 65 2e | 67 65 6e 65 72 69 63 2e |akefile.|generic.|
|000039c0| 27 20 31 3e 26 32 0a 58 | 09 65 63 68 6f 20 27 74 |' 1>&2.X|.echo 't|
|000039d0| 65 6c 6e 65 74 64 20 69 | 73 6e 27 5c 27 27 74 20 |elnetd i|sn'\''t |
|000039e0| 74 6f 6f 20 68 69 67 68 | 20 6f 6e 20 74 68 65 20 |too high| on the |
|000039f0| 70 6f 72 74 61 62 69 6c | 69 74 79 20 73 63 61 6c |portabil|ity scal|
|00003a00| 65 2c 20 73 6f 20 79 6f | 75 27 20 31 3e 26 32 0a |e, so yo|u' 1>&2.|
|00003a10| 58 09 65 63 68 6f 20 27 | 6d 61 79 20 68 61 76 65 |X.echo '|may have|
|00003a20| 20 74 6f 20 6d 61 6b 65 | 20 71 75 69 74 65 20 61 | to make| quite a|
|00003a30| 20 66 65 77 20 6d 6f 72 | 65 20 63 68 61 6e 67 65 | few mor|e change|
|00003a40| 73 2e 27 20 31 3e 26 32 | 0a 58 09 65 63 68 6f 20 |s.' 1>&2|.X.echo |
|00003a50| 27 41 6e 79 77 61 79 2c | 20 6d 61 6b 65 20 74 70 |'Anyway,| make tp|
|00003a60| 61 74 37 20 3e 20 2f 64 | 65 76 2f 6e 75 6c 6c 20 |at7 > /d|ev/null |
|00003a70| 74 6f 20 63 6f 6e 74 69 | 6e 75 65 2e 27 20 31 3e |to conti|nue.' 1>|
|00003a80| 26 32 0a 58 09 2e 2f 69 | 67 6e 74 74 20 74 69 6f |&2.X../i|gntt tio|
|00003a90| 63 73 74 69 20 27 76 69 | 20 74 65 6c 6e 65 74 2e |csti 'vi| telnet.|
|00003aa0| 39 30 2e 30 36 2e 32 38 | 2f 74 65 6c 6e 65 74 64 |90.06.28|/telnetd|
|00003ab0| 2f 4d 61 6b 65 66 69 6c | 65 2e 67 65 6e 65 72 69 |/Makefil|e.generi|
|00003ac0| 63 27 0a 58 0a 58 74 70 | 61 74 37 3a 20 69 67 6e |c'.X.Xtp|at7: ign|
|00003ad0| 74 74 0a 58 09 65 63 68 | 6f 20 27 37 2e 20 43 6f |tt.X.ech|o '7. Co|
|00003ae0| 6d 70 69 6c 65 21 27 20 | 31 3e 26 32 0a 58 09 65 |mpile!' |1>&2.X.e|
|00003af0| 63 68 6f 20 27 41 73 20 | 65 78 70 6c 61 69 6e 65 |cho 'As |explaine|
|00003b00| 64 20 69 6e 20 74 68 65 | 20 74 65 6c 6e 65 74 64 |d in the| telnetd|
|00003b10| 20 73 6f 75 72 63 65 20 | 64 6f 63 75 6d 65 6e 74 | source |document|
|00003b20| 61 74 69 6f 6e 2c 20 79 | 6f 75 20 68 61 76 65 27 |ation, y|ou have'|
|00003b30| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 74 6f | 1>&2.X.|echo 'to|
|00003b40| 20 70 72 6f 76 69 64 65 | 20 74 68 65 20 6d 61 63 | provide| the mac|
|00003b50| 68 69 6e 65 20 6e 61 6d | 65 20 74 6f 20 6d 61 6b |hine nam|e to mak|
|00003b60| 65 2e 20 55 6e 64 65 72 | 20 53 75 6e 4f 53 20 34 |e. Under| SunOS 4|
|00003b70| 2e 30 2e 33 2c 27 20 31 | 3e 26 32 0a 58 09 65 63 |.0.3,' 1|>&2.X.ec|
|00003b80| 68 6f 20 27 79 6f 75 20 | 63 61 6e 20 6a 75 73 74 |ho 'you |can just|
|00003b90| 20 70 72 65 73 73 20 72 | 65 74 75 72 6e 20 68 65 | press r|eturn he|
|00003ba0| 72 65 2e 27 20 31 3e 26 | 32 0a 58 09 65 63 68 6f |re.' 1>&|2.X.echo|
|00003bb0| 20 27 57 68 65 6e 20 61 | 6e 64 20 69 66 20 74 68 | 'When a|nd if th|
|00003bc0| 69 73 20 73 75 63 63 65 | 65 64 73 2c 20 67 6f 20 |is succe|eds, go |
|00003bd0| 74 6f 20 73 74 65 70 20 | 38 20 6f 66 20 52 45 41 |to step |8 of REA|
|00003be0| 44 4d 45 2e 27 20 31 3e | 26 32 0a 58 09 2e 2f 69 |DME.' 1>|&2.X../i|
|00003bf0| 67 6e 74 74 20 74 69 6f | 63 73 74 69 20 27 28 20 |gntt tio|csti '( |
|00003c00| 63 64 20 74 65 6c 6e 65 | 74 2e 39 30 2e 30 36 2e |cd telne|t.90.06.|
|00003c10| 32 38 2f 74 65 6c 6e 65 | 74 64 3b 20 28 64 61 74 |28/telne|td; (dat|
|00003c20| 65 3b 6d 61 6b 65 20 73 | 75 6e 34 2e 30 29 20 3e |e;make s|un4.0) >|
|00003c30| 3e 26 4d 61 6b 65 6c 6f | 67 20 29 20 26 27 0a 58 |>&Makelo|g ) &'.X|
|00003c40| 0a 58 69 67 6e 74 74 3a | 20 69 67 6e 74 74 2e 63 |.Xigntt:| igntt.c|
|00003c50| 0a 58 09 63 63 20 2d 6f | 20 69 67 6e 74 74 20 69 |.X.cc -o| igntt i|
|00003c60| 67 6e 74 74 2e 63 0a 45 | 4e 44 5f 4f 46 5f 46 49 |gntt.c.E|ND_OF_FI|
|00003c70| 4c 45 0a 20 20 69 66 20 | 74 65 73 74 20 32 38 31 |LE. if |test 281|
|00003c80| 33 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 70 |3 -ne `w|c -c <'p|
|00003c90| 61 74 63 68 2f 4d 61 6b | 65 66 69 6c 65 27 60 3b |atch/Mak|efile'`;|
|00003ca0| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|00003cb0| 68 61 72 3a 20 5c 22 27 | 70 61 74 63 68 2f 4d 61 |har: \"'|patch/Ma|
|00003cc0| 6b 65 66 69 6c 65 27 5c | 22 20 75 6e 70 61 63 6b |kefile'\|" unpack|
|00003cd0| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00003ce0| 7a 65 21 0a 20 20 66 69 | 0a 20 20 23 20 65 6e 64 |ze!. fi|. # end|
|00003cf0| 20 6f 66 20 27 70 61 74 | 63 68 2f 4d 61 6b 65 66 | of 'pat|ch/Makef|
|00003d00| 69 6c 65 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |ile'.fi.|if test |
|00003d10| 2d 66 20 27 70 61 74 63 | 68 2f 52 45 41 44 4d 45 |-f 'patc|h/README|
|00003d20| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00003d30| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00003d40| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00003d50| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00003d60| 6e 67 20 66 69 6c 65 20 | 5c 22 27 70 61 74 63 68 |ng file |\"'patch|
|00003d70| 2f 52 45 41 44 4d 45 27 | 5c 22 0a 65 6c 73 65 0a |/README'|\".else.|
|00003d80| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 | echo s|har: Ext|
|00003d90| 72 61 63 74 69 6e 67 20 | 5c 22 27 70 61 74 63 68 |racting |\"'patch|
|00003da0| 2f 52 45 41 44 4d 45 27 | 5c 22 20 5c 28 34 37 37 |/README'|\" \(477|
|00003db0| 37 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 20 |7 charac|ters\). |
|00003dc0| 20 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 | sed "s/|^X//" >'|
|00003dd0| 70 61 74 63 68 2f 52 45 | 41 44 4d 45 27 20 3c 3c |patch/RE|ADME' <<|
|00003de0| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 41 |'END_OF_|FILE'.XA|
|00003df0| 74 20 74 68 65 20 6d 6f | 6d 65 6e 74 2c 20 74 68 |t the mo|ment, th|
|00003e00| 65 20 6f 6e 6c 79 20 74 | 68 69 6e 67 20 68 65 72 |e only t|hing her|
|00003e10| 65 20 69 73 20 74 65 6c | 6e 65 74 64 2e 39 30 2e |e is tel|netd.90.|
|00003e20| 30 36 2e 32 38 2e 70 61 | 74 63 68 2e 20 49 74 27 |06.28.pa|tch. It'|
|00003e30| 73 0a 58 70 75 62 6c 69 | 63 20 64 6f 6d 61 69 6e |s.Xpubli|c domain|
|00003e40| 2e 0a 58 0a 58 74 65 6c | 6e 65 74 64 2e 39 30 2e |..X.Xtel|netd.90.|
|00003e50| 30 36 2e 32 38 2e 70 61 | 74 63 68 20 69 73 20 61 |06.28.pa|tch is a|
|00003e60| 20 73 61 66 65 20 70 61 | 74 63 68 20 74 6f 20 74 | safe pa|tch to t|
|00003e70| 68 65 20 74 65 6c 6e 65 | 74 64 20 73 6f 75 72 63 |he telne|td sourc|
|00003e80| 65 20 69 6e 0a 58 74 65 | 6c 6e 65 74 2e 39 30 2e |e in.Xte|lnet.90.|
|00003e90| 30 36 2e 32 38 20 6f 6e | 20 75 63 62 61 72 70 61 |06.28 on| ucbarpa|
|00003ea0| 2e 62 65 72 6b 65 6c 65 | 79 2e 65 64 75 20 28 31 |.berkele|y.edu (1|
|00003eb0| 32 38 2e 33 32 2e 31 33 | 30 2e 31 31 29 2e 20 60 |28.32.13|0.11). `|
|00003ec0| 60 53 61 66 65 27 27 20 | 6d 65 61 6e 73 0a 58 74 |`Safe'' |means.Xt|
|00003ed0| 68 61 74 20 65 76 65 72 | 79 20 66 69 6c 65 20 63 |hat ever|y file c|
|00003ee0| 6f 6d 70 69 6c 65 73 20 | 65 78 61 63 74 6c 79 20 |ompiles |exactly |
|00003ef0| 74 68 65 20 73 61 6d 65 | 20 69 66 20 55 53 45 50 |the same| if USEP|
|00003f00| 54 59 20 69 73 20 6e 6f | 74 20 64 65 66 69 6e 65 |TY is no|t define|
|00003f10| 64 3b 0a 58 79 6f 75 20 | 63 61 6e 20 61 70 70 6c |d;.Xyou |can appl|
|00003f20| 79 20 74 68 65 20 70 61 | 74 63 68 20 77 69 74 68 |y the pa|tch with|
|00003f30| 6f 75 74 20 61 6e 79 20 | 77 6f 72 72 79 20 6f 66 |out any |worry of|
|00003f40| 20 6d 65 73 73 69 6e 67 | 20 75 70 20 79 6f 75 72 | messing| up your|
|00003f50| 20 73 6f 75 72 63 65 2e | 0a 58 0a 58 57 68 61 74 | source.|.X.XWhat|
|00003f60| 20 66 6f 6c 6c 6f 77 73 | 20 69 73 20 61 6e 20 6f | follows| is an o|
|00003f70| 75 74 6c 69 6e 65 20 6f | 66 20 68 6f 77 20 74 6f |utline o|f how to|
|00003f80| 20 61 70 70 6c 79 20 74 | 68 65 20 70 61 74 63 68 | apply t|he patch|
|00003f90| 20 61 6e 64 20 65 6e 61 | 62 6c 65 20 69 74 2e 20 | and ena|ble it. |
|00003fa0| 41 0a 58 70 61 74 63 68 | 65 64 20 74 65 6c 6e 65 |A.Xpatch|ed telne|
|00003fb0| 74 64 20 75 73 65 73 20 | 70 74 79 20 74 6f 20 6d |td uses |pty to m|
|00003fc0| 61 6e 61 67 65 20 73 65 | 73 73 69 6f 6e 73 2c 20 |anage se|ssions, |
|00003fd0| 73 6f 20 74 68 61 74 20 | 75 73 65 72 73 20 63 61 |so that |users ca|
|00003fe0| 6e 20 65 61 73 69 6c 79 | 0a 58 64 69 73 63 6f 6e |n easily|.Xdiscon|
|00003ff0| 6e 65 63 74 20 61 6e 64 | 20 72 65 63 6f 6e 6e 65 |nect and| reconne|
|00004000| 63 74 20 6c 6f 67 69 6e | 20 73 65 73 73 69 6f 6e |ct login| session|
|00004010| 73 2e 20 59 6f 75 20 2a | 6d 75 73 74 2a 20 68 61 |s. You *|must* ha|
|00004020| 76 65 20 63 6f 6d 70 69 | 6c 65 64 20 66 69 6c 65 |ve compi|led file|
|00004030| 0a 58 64 65 73 63 72 69 | 70 74 6f 72 20 70 61 73 |.Xdescri|ptor pas|
|00004040| 73 69 6e 67 20 69 6e 74 | 6f 20 70 74 79 20 66 6f |sing int|o pty fo|
|00004050| 72 20 74 68 69 73 20 74 | 6f 20 77 6f 72 6b 3b 20 |r this t|o work; |
|00004060| 74 65 6c 6e 65 74 64 20 | 6e 65 65 64 73 20 74 6f |telnetd |needs to|
|00004070| 20 67 65 74 20 74 68 65 | 0a 58 70 73 65 75 64 6f | get the|.Xpseudo|
|00004080| 2d 74 65 72 6d 69 6e 61 | 6c 20 64 65 73 63 72 69 |-termina|l descri|
|00004090| 70 74 6f 72 73 20 66 72 | 6f 6d 20 70 74 79 2e 20 |ptors fr|om pty. |
|000040a0| 47 69 76 65 6e 20 66 64 | 20 70 61 73 73 69 6e 67 |Given fd| passing|
|000040b0| 2c 20 74 68 6f 75 67 68 | 2c 20 74 68 65 0a 58 70 |, though|, the.Xp|
|000040c0| 61 74 63 68 65 64 20 74 | 65 6c 6e 65 74 64 20 67 |atched t|elnetd g|
|000040d0| 69 76 65 73 20 79 6f 75 | 20 74 68 65 20 2a 66 75 |ives you| the *fu|
|000040e0| 6c 6c 2a 20 65 66 66 69 | 63 69 65 6e 63 79 20 6f |ll* effi|ciency o|
|000040f0| 66 20 74 68 65 20 75 6e | 70 61 74 63 68 65 64 0a |f the un|patched.|
|00004100| 58 76 65 72 73 69 6f 6e | 2c 20 65 76 65 6e 20 66 |Xversion|, even f|
|00004110| 6f 72 20 72 65 63 6f 6e | 6e 65 63 74 65 64 20 73 |or recon|nected s|
|00004120| 65 73 73 69 6f 6e 73 21 | 0a 58 0a 58 0a 58 48 65 |essions!|.X.X.XHe|
|00004130| 72 65 27 73 20 77 68 61 | 74 20 74 6f 20 64 6f 2e |re's wha|t to do.|
|00004140| 20 49 66 20 79 6f 75 20 | 68 61 76 65 20 74 68 65 | If you |have the|
|00004150| 20 74 69 6f 63 73 74 69 | 20 75 74 69 6c 69 74 79 | tiocsti| utility|
|00004160| 20 69 6e 73 74 61 6c 6c | 65 64 2c 20 74 72 79 0a | install|ed, try.|
|00004170| 58 60 60 6d 61 6b 65 20 | 3e 20 2f 64 65 76 2f 6e |X``make |> /dev/n|
|00004180| 75 6c 6c 27 27 20 69 6e | 20 74 68 69 73 20 64 69 |ull'' in| this di|
|00004190| 72 65 63 74 6f 72 79 3b | 20 6f 72 20 6a 75 73 74 |rectory;| or just|
|000041a0| 20 72 65 61 64 20 74 68 | 72 6f 75 67 68 20 74 68 | read th|rough th|
|000041b0| 65 73 65 0a 58 69 6e 73 | 74 72 75 63 74 69 6f 6e |ese.Xins|truction|
|000041c0| 73 2e 20 54 68 65 20 75 | 73 75 61 6c 20 77 61 72 |s. The u|sual war|
|000041d0| 6e 69 6e 67 3a 20 4c 69 | 6b 65 20 61 6c 6c 20 73 |ning: Li|ke all s|
|000041e0| 6f 66 74 77 61 72 65 2c | 20 74 68 69 73 20 63 6f |oftware,| this co|
|000041f0| 6d 65 73 20 77 69 74 68 | 0a 58 61 6c 6c 20 77 61 |mes with|.Xall wa|
|00004200| 72 72 61 6e 74 69 65 73 | 20 64 69 73 63 6c 61 69 |rranties| disclai|
|00004210| 6d 65 64 2c 20 74 6f 20 | 74 68 65 20 65 78 74 65 |med, to |the exte|
|00004220| 6e 74 20 70 65 72 6d 69 | 74 74 65 64 20 62 79 20 |nt permi|tted by |
|00004230| 61 70 70 6c 69 63 61 62 | 6c 65 20 6c 61 77 2e 0a |applicab|le law..|
|00004240| 58 0a 58 0a 58 31 2e 20 | 47 65 74 20 74 68 65 20 |X.X.X1. |Get the |
|00004250| 6e 65 77 20 74 65 6c 6e | 65 74 64 3a 0a 58 0a 58 |new teln|etd:.X.X|
|00004260| 20 20 25 20 66 74 70 20 | 2d 6e 20 31 32 38 2e 33 | % ftp |-n 128.3|
|00004270| 32 2e 31 33 30 2e 31 31 | 20 3c 20 54 45 4c 4e 45 |2.130.11| < TELNE|
|00004280| 54 2e 46 54 50 0a 58 0a | 58 32 2e 20 55 6e 70 61 |T.FTP.X.|X2. Unpa|
|00004290| 63 6b 20 69 74 3a 0a 58 | 0a 58 20 20 25 20 75 6e |ck it:.X|.X % un|
|000042a0| 63 6f 6d 70 72 65 73 73 | 20 3c 20 74 65 6c 6e 65 |compress| < telne|
|000042b0| 74 2e 39 30 2e 30 36 2e | 32 38 2e 74 61 72 2e 5a |t.90.06.|28.tar.Z|
|000042c0| 20 7c 20 74 61 72 20 78 | 66 20 2d 0a 58 0a 58 33 | | tar x|f -.X.X3|
|000042d0| 2e 20 41 70 70 6c 79 20 | 74 68 65 73 65 20 70 61 |. Apply |these pa|
|000042e0| 74 63 68 65 73 2c 20 61 | 6e 64 20 63 68 65 63 6b |tches, a|nd check|
|000042f0| 20 74 68 61 74 20 74 68 | 65 79 27 72 65 20 73 61 | that th|ey're sa|
|00004300| 66 65 3a 0a 58 0a 58 20 | 20 25 20 63 64 20 74 65 |fe:.X.X | % cd te|
|00004310| 6c 6e 65 74 2e 39 30 2e | 30 36 2e 32 38 2f 74 65 |lnet.90.|06.28/te|
|00004320| 6c 6e 65 74 64 0a 58 20 | 20 25 20 70 61 74 63 68 |lnetd.X | % patch|
|00004330| 20 3c 20 2e 2e 2f 2e 2e | 2f 74 65 6c 6e 65 74 64 | < ../..|/telnetd|
|00004340| 2e 39 30 2e 30 36 2e 32 | 38 2e 70 61 74 63 68 0a |.90.06.2|8.patch.|
|00004350| 58 20 20 25 20 75 6e 69 | 66 64 65 66 20 2d 55 55 |X % uni|fdef -UU|
|00004360| 53 45 50 54 59 20 73 79 | 73 5f 74 65 72 6d 2e 63 |SEPTY sy|s_term.c|
|00004370| 20 7c 20 63 6d 70 20 2d | 20 73 79 73 5f 74 65 72 | | cmp -| sys_ter|
|00004380| 6d 2e 63 2e 6f 72 69 67 | 0a 58 20 20 25 20 75 6e |m.c.orig|.X % un|
|00004390| 69 66 64 65 66 20 2d 55 | 55 53 45 50 54 59 20 74 |ifdef -U|USEPTY t|
|000043a0| 65 6c 6e 65 74 64 2e 63 | 20 7c 20 63 6d 70 20 2d |elnetd.c| | cmp -|
|000043b0| 20 74 65 6c 6e 65 74 64 | 2e 63 2e 6f 72 69 67 0a | telnetd|.c.orig.|
|000043c0| 58 20 20 25 20 75 6e 69 | 66 64 65 66 20 2d 55 55 |X % uni|fdef -UU|
|000043d0| 53 45 50 54 59 20 70 61 | 74 68 6e 61 6d 65 73 2e |SEPTY pa|thnames.|
|000043e0| 68 20 7c 20 63 6d 70 20 | 2d 20 70 61 74 68 6e 61 |h | cmp |- pathna|
|000043f0| 6d 65 73 2e 68 2e 6f 72 | 69 67 0a 58 20 20 25 20 |mes.h.or|ig.X % |
|00004400| 63 64 20 2e 2e 2f 2e 2e | 0a 58 0a 58 34 2e 20 43 |cd ../..|.X.X4. C|
|00004410| 68 65 63 6b 20 74 68 65 | 20 70 74 79 20 70 61 74 |heck the| pty pat|
|00004420| 68 6e 61 6d 65 20 61 6e | 64 20 66 69 78 20 69 74 |hname an|d fix it|
|00004430| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 3a 0a 58 | if nece|ssary:.X|
|00004440| 0a 58 20 20 25 20 67 72 | 65 70 20 50 41 54 48 5f |.X % gr|ep PATH_|
|00004450| 50 54 59 20 74 65 6c 6e | 65 74 2e 39 30 2e 30 36 |PTY teln|et.90.06|
|00004460| 2e 32 38 2f 74 65 6c 6e | 65 74 64 2f 70 61 74 68 |.28/teln|etd/path|
|00004470| 6e 61 6d 65 73 2e 68 0a | 58 0a 58 35 2e 20 41 64 |names.h.|X.X5. Ad|
|00004480| 64 20 73 6f 63 6b 2e 6f | 20 61 6e 64 20 73 6f 63 |d sock.o| and soc|
|00004490| 6b 2e 68 20 73 79 6d 6c | 69 6e 6b 73 3a 0a 58 0a |k.h syml|inks:.X.|
|000044a0| 58 20 20 25 20 28 20 63 | 64 20 74 65 6c 6e 65 74 |X % ( c|d telnet|
|000044b0| 2e 39 30 2e 30 36 2e 32 | 38 2f 74 65 6c 6e 65 74 |.90.06.2|8/telnet|
|000044c0| 64 3b 20 6c 6e 20 2d 73 | 20 2e 2e 2f 2e 2e 2f 2e |d; ln -s| ../../.|
|000044d0| 2e 2f 73 6f 63 6b 2e 7b | 6f 2c 68 7d 20 2e 20 29 |./sock.{|o,h} . )|
|000044e0| 0a 58 0a 58 36 2e 20 57 | 68 65 6e 20 79 6f 75 20 |.X.X6. W|hen you |
|000044f0| 77 61 6e 74 20 74 6f 20 | 63 6f 6d 70 69 6c 65 20 |want to |compile |
|00004500| 74 68 65 20 70 61 74 63 | 68 65 64 20 76 65 72 73 |the patc|hed vers|
|00004510| 69 6f 6e 3a 20 41 64 64 | 20 73 6f 63 6b 2e 6f 20 |ion: Add| sock.o |
|00004520| 74 6f 20 4f 42 4a 53 0a | 58 20 20 20 61 6e 64 20 |to OBJS.|X and |
|00004530| 2d 44 55 53 45 50 54 59 | 20 74 6f 20 43 43 4f 50 |-DUSEPTY| to CCOP|
|00004540| 54 53 20 69 6e 20 4d 61 | 6b 65 66 69 6c 65 2e 67 |TS in Ma|kefile.g|
|00004550| 65 6e 65 72 69 63 2e 20 | 43 68 61 6e 67 65 20 77 |eneric. |Change w|
|00004560| 68 61 74 65 76 65 72 20 | 65 6c 73 65 0a 58 20 20 |hatever |else.X |
|00004570| 20 6e 65 63 65 73 73 61 | 72 79 20 74 6f 20 67 65 | necessa|ry to ge|
|00004580| 74 20 74 65 6c 6e 65 74 | 64 20 74 6f 20 63 6f 6d |t telnet|d to com|
|00004590| 70 69 6c 65 2e 0a 58 0a | 58 37 2e 20 43 6f 6d 70 |pile..X.|X7. Comp|
|000045a0| 69 6c 65 21 20 4f 6e 20 | 61 20 53 75 6e 20 34 20 |ile! On |a Sun 4 |
|000045b0| 75 6e 64 65 72 20 53 75 | 6e 4f 53 20 34 2e 30 2e |under Su|nOS 4.0.|
|000045c0| 33 2c 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |3, for e|xample, |
|000045d0| 79 6f 75 20 6a 75 73 74 | 0a 58 20 20 20 60 60 6d |you just|.X ``m|
|000045e0| 61 6b 65 20 73 75 6e 34 | 2e 30 27 27 20 69 6e 20 |ake sun4|.0'' in |
|000045f0| 74 68 65 20 74 65 6c 6e | 65 74 64 20 64 69 72 65 |the teln|etd dire|
|00004600| 63 74 6f 72 79 2e 0a 58 | 0a 58 38 2e 20 49 66 20 |ctory..X|.X8. If |
|00004610| 79 6f 75 20 61 63 74 75 | 61 6c 6c 79 20 73 75 72 |you actu|ally sur|
|00004620| 76 69 76 65 20 74 65 6c | 6e 65 74 64 27 73 20 69 |vive tel|netd's i|
|00004630| 6e 63 6f 6d 70 61 74 69 | 62 69 6c 69 74 69 65 73 |ncompati|bilities|
|00004640| 20 61 6e 64 20 67 65 74 | 20 69 74 20 74 6f 0a 58 | and get| it to.X|
|00004650| 20 20 20 63 6f 6d 70 69 | 6c 65 2c 20 6b 65 65 70 | compi|le, keep|
|00004660| 20 72 65 61 64 69 6e 67 | 2e 0a 58 0a 58 0a 58 54 | reading|..X.X.XT|
|00004670| 68 65 20 72 65 61 73 6f | 6e 20 74 68 69 73 20 74 |he reaso|n this t|
|00004680| 65 6c 6e 65 74 64 20 69 | 73 20 73 6f 20 62 69 67 |elnetd i|s so big|
|00004690| 20 69 73 20 74 68 61 74 | 20 69 74 20 73 75 70 70 | is that| it supp|
|000046a0| 6f 72 74 73 20 4c 69 6e | 65 6d 6f 64 65 2c 20 61 |orts Lin|emode, a|
|000046b0| 20 62 6f 6c 64 0a 58 61 | 74 74 65 6d 70 74 20 74 | bold.Xa|ttempt t|
|000046c0| 6f 20 63 75 74 20 74 68 | 65 20 49 6e 74 65 72 6e |o cut th|e Intern|
|000046d0| 65 74 20 6c 6f 61 64 20 | 66 72 6f 6d 20 61 6c 6c |et load |from all|
|000046e0| 20 74 68 65 20 66 61 73 | 74 20 74 79 70 69 73 74 | the fas|t typist|
|000046f0| 73 20 69 6e 20 74 68 65 | 20 77 6f 72 6c 64 0a 58 |s in the| world.X|
|00004700| 62 79 20 61 20 74 68 69 | 72 64 20 6f 72 20 65 76 |by a thi|rd or ev|
|00004710| 65 6e 20 61 20 68 61 6c | 66 2e 0a 58 0a 58 49 66 |en a hal|f..X.XIf|
|00004720| 20 79 6f 75 27 72 65 20 | 62 6f 72 65 64 2c 20 63 | you're |bored, c|
|00004730| 6f 6d 70 69 6c 65 20 74 | 68 65 20 74 65 6c 6e 65 |ompile t|he telne|
|00004740| 74 20 63 6c 69 65 6e 74 | 20 61 73 20 77 65 6c 6c |t client| as well|
|00004750| 2e 0a 58 0a 58 0a 58 41 | 6e 79 77 61 79 2c 20 74 |..X.X.XA|nyway, t|
|00004760| 68 65 20 74 65 6c 6e 65 | 74 64 20 79 6f 75 20 6a |he telne|td you j|
|00004770| 75 73 74 20 63 6f 6d 70 | 69 6c 65 64 20 73 75 70 |ust comp|iled sup|
|00004780| 70 6f 72 74 73 20 70 74 | 79 2e 20 59 6f 75 20 70 |ports pt|y. You p|
|00004790| 72 6f 62 61 62 6c 79 20 | 64 6f 6e 27 74 0a 58 77 |robably |don't.Xw|
|000047a0| 61 6e 74 20 74 6f 20 72 | 65 70 6c 61 63 65 20 79 |ant to r|eplace y|
|000047b0| 6f 75 72 20 6f 72 69 67 | 69 6e 61 6c 20 74 65 6c |our orig|inal tel|
|000047c0| 6e 65 74 64 2c 20 62 65 | 63 61 75 73 65 20 69 66 |netd, be|cause if|
|000047d0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 67 6f 65 73 20 | somethi|ng goes |
|000047e0| 77 72 6f 6e 67 0a 58 74 | 68 65 6e 20 79 6f 75 20 |wrong.Xt|hen you |
|000047f0| 6e 65 65 64 20 74 6f 20 | 6c 6f 67 20 69 6e 20 61 |need to |log in a|
|00004800| 67 61 69 6e 2e 20 41 6c | 73 6f 2c 20 79 6f 75 72 |gain. Al|so, your|
|00004810| 20 74 65 6c 6e 65 74 64 | 20 6d 61 79 20 68 61 76 | telnetd| may hav|
|00004820| 65 20 73 70 65 63 69 61 | 6c 0a 58 66 65 61 74 75 |e specia|l.Xfeatu|
|00004830| 72 65 73 20 66 6f 72 20 | 79 6f 75 72 20 6d 61 63 |res for |your mac|
|00004840| 68 69 6e 65 2e 20 49 6e | 73 74 65 61 64 2c 20 74 |hine. In|stead, t|
|00004850| 61 6b 65 20 74 68 65 20 | 67 72 61 64 75 61 6c 20 |ake the |gradual |
|00004860| 75 70 67 72 61 64 65 20 | 70 61 74 68 3a 20 50 75 |upgrade |path: Pu|
|00004870| 74 0a 58 74 65 6c 6e 65 | 74 64 20 69 6e 74 6f 20 |t.Xtelne|td into |
|00004880| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 74 65 6c 6e 65 |/usr/loc|al/telne|
|00004890| 74 64 2e 70 74 79 2c 20 | 61 64 64 20 61 20 6e 65 |td.pty, |add a ne|
|000048a0| 77 20 60 60 74 70 74 27 | 27 20 70 6f 72 74 20 74 |w ``tpt'|' port t|
|000048b0| 6f 0a 58 2f 65 74 63 2f | 73 65 72 76 69 63 65 73 |o.X/etc/|services|
|000048c0| 2c 20 61 6e 64 20 61 64 | 64 20 74 68 69 73 20 6c |, and ad|d this l|
|000048d0| 69 6e 65 20 74 6f 20 2f | 65 74 63 2f 69 6e 65 74 |ine to /|etc/inet|
|000048e0| 64 2e 63 6f 6e 66 3a 0a | 58 0a 58 74 70 74 09 73 |d.conf:.|X.Xtpt.s|
|000048f0| 74 72 65 61 6d 09 74 63 | 70 09 6e 6f 77 61 69 74 |tream.tc|p.nowait|
|00004900| 09 72 6f 6f 74 09 2f 75 | 73 72 2f 6c 6f 63 61 6c |.root./u|sr/local|
|00004910| 2f 74 65 6c 6e 65 74 64 | 2e 70 74 79 09 74 65 6c |/telnetd|.pty.tel|
|00004920| 6e 65 74 64 0a 58 0a 58 | 28 4f 6e 20 6f 6c 64 65 |netd.X.X|(On olde|
|00004930| 72 20 6d 61 63 68 69 6e | 65 73 2c 20 60 60 72 6f |r machin|es, ``ro|
|00004940| 6f 74 27 27 20 77 6f 75 | 6c 64 6e 27 74 20 62 65 |ot'' wou|ldn't be|
|00004950| 20 74 68 65 72 65 3b 20 | 69 6d 69 74 61 74 65 20 | there; |imitate |
|00004960| 74 68 65 20 74 65 6c 6e | 65 74 20 6c 69 6e 65 0a |the teln|et line.|
|00004970| 58 74 6f 20 66 69 67 75 | 72 65 20 6f 75 74 20 74 |Xto figu|re out t|
|00004980| 68 65 20 72 69 67 68 74 | 20 66 6f 72 6d 61 74 2e |he right| format.|
|00004990| 20 49 66 20 79 6f 75 20 | 68 61 76 65 20 74 68 65 | If you |have the|
|000049a0| 20 62 65 74 74 65 72 20 | 69 6e 74 65 72 66 61 63 | better |interfac|
|000049b0| 65 20 6f 66 0a 58 61 74 | 74 61 63 68 70 6f 72 74 |e of.Xat|tachport|
|000049c0| 2c 20 75 73 65 20 69 74 | 20 69 6e 73 74 65 61 64 |, use it| instead|
|000049d0| 2e 29 20 6b 69 6c 6c 20 | 2d 48 55 50 20 74 68 65 |.) kill |-HUP the|
|000049e0| 20 69 6e 65 74 64 20 70 | 72 6f 63 65 73 73 20 73 | inetd p|rocess s|
|000049f0| 6f 20 74 68 61 74 20 69 | 74 20 77 69 6c 6c 0a 58 |o that i|t will.X|
|00004a00| 72 65 72 65 61 64 20 69 | 6e 65 74 64 2e 63 6f 6e |reread i|netd.con|
|00004a10| 66 2e 0a 58 0a 58 0a 58 | 4e 6f 77 20 74 72 79 20 |f..X.X.X|Now try |
|00004a20| 63 6f 6e 6e 65 63 74 69 | 6e 67 20 74 6f 20 74 68 |connecti|ng to th|
|00004a30| 65 20 74 70 74 20 70 6f | 72 74 20 72 61 74 68 65 |e tpt po|rt rathe|
|00004a40| 72 20 74 68 61 6e 20 32 | 33 20 28 69 6e 73 74 65 |r than 2|3 (inste|
|00004a50| 61 64 20 6f 66 20 74 65 | 6c 6e 65 74 20 58 2c 0a |ad of te|lnet X,.|
|00004a60| 58 64 6f 20 74 65 6c 6e | 65 74 20 58 20 74 70 74 |Xdo teln|et X tpt|
|00004a70| 29 2e 20 59 6f 75 20 73 | 68 6f 75 6c 64 20 65 6e |). You s|hould en|
|00004a80| 64 20 75 70 20 74 61 6c | 6b 69 6e 67 20 74 6f 20 |d up tal|king to |
|00004a90| 74 68 65 20 6e 65 77 20 | 74 65 6c 6e 65 74 64 2c |the new |telnetd,|
|00004aa0| 20 61 20 63 6c 65 61 6e | 0a 58 6c 6f 67 69 6e 2c | a clean|.Xlogin,|
|00004ab0| 20 61 6e 64 20 28 62 65 | 73 74 20 6f 66 20 61 6c | and (be|st of al|
|00004ac0| 6c 29 20 61 20 70 74 79 | 20 73 65 73 73 69 6f 6e |l) a pty| session|
|00004ad0| 2e 20 28 54 68 65 20 6d | 6f 73 74 20 63 6f 6d 6d |. (The m|ost comm|
|00004ae0| 6f 6e 20 70 72 6f 62 6c | 65 6d 3a 20 4c 69 6e 65 |on probl|em: Line|
|00004af0| 73 0a 58 64 6f 6e 27 74 | 20 61 70 70 65 61 72 20 |s.Xdon't| appear |
|00004b00| 75 6e 74 69 6c 20 61 66 | 74 65 72 20 79 6f 75 20 |until af|ter you |
|00004b10| 70 72 65 73 73 20 72 65 | 74 75 72 6e 2e 20 54 68 |press re|turn. Th|
|00004b20| 69 73 20 6d 65 61 6e 73 | 20 74 68 61 74 20 79 6f |is means| that yo|
|00004b30| 75 72 20 6f 6c 64 0a 58 | 74 65 6c 6e 65 74 20 64 |ur old.X|telnet d|
|00004b40| 6f 65 73 6e 27 74 20 73 | 75 70 70 6f 72 74 20 4c |oesn't s|upport L|
|00004b50| 69 6e 65 6d 6f 64 65 3b | 20 74 79 70 65 20 60 60 |inemode;| type ``|
|00004b60| 5e 5d 6d 6f 20 63 68 27 | 27 20 74 6f 20 66 69 78 |^]mo ch'|' to fix|
|00004b70| 20 69 74 2e 20 41 6c 73 | 6f 20 73 65 6e 64 0a 58 | it. Als|o send.X|
|00004b80| 63 6f 6d 70 6c 61 69 6e | 74 73 20 61 62 6f 75 74 |complain|ts about|
|00004b90| 20 74 68 65 20 69 6e 63 | 6f 6d 70 61 74 69 62 69 | the inc|ompatibi|
|00004ba0| 6c 69 74 69 65 73 20 74 | 6f 20 64 61 62 40 63 72 |lities t|o dab@cr|
|00004bb0| 61 79 2e 63 6f 6d 2e 29 | 20 49 66 20 74 68 65 0a |ay.com.)| If the.|
|00004bc0| 58 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 68 61 6e 67 |Xconnect|ion hang|
|00004bd0| 73 20 66 6f 72 20 6d 6f | 72 65 20 74 68 61 6e 20 |s for mo|re than |
|00004be0| 61 20 73 65 63 6f 6e 64 | 20 6f 72 20 70 72 6f 64 |a second| or prod|
|00004bf0| 75 63 65 73 20 77 65 69 | 72 64 20 72 65 73 75 6c |uces wei|rd resul|
|00004c00| 74 73 2c 0a 58 79 6f 75 | 27 72 65 20 70 72 6f 62 |ts,.Xyou|'re prob|
|00004c10| 61 62 6c 79 20 6f 75 74 | 20 6f 66 20 6c 75 63 6b |ably out| of luck|
|00004c20| 3b 20 70 74 79 27 73 20 | 61 75 74 68 6f 72 20 77 |; pty's |author w|
|00004c30| 6f 75 6c 64 20 61 70 70 | 72 65 63 69 61 74 65 20 |ould app|reciate |
|00004c40| 68 65 61 72 69 6e 67 20 | 61 62 6f 75 74 0a 58 79 |hearing |about.Xy|
|00004c50| 6f 75 72 20 65 78 70 65 | 72 69 65 6e 63 65 73 2e |our expe|riences.|
|00004c60| 0a 58 0a 58 49 66 20 61 | 6c 6c 20 67 6f 65 73 20 |.X.XIf a|ll goes |
|00004c70| 77 65 6c 6c 20 28 77 68 | 65 77 21 29 20 79 6f 75 |well (wh|ew!) you|
|00004c80| 20 63 61 6e 20 6c 6f 67 | 20 69 6e 20 6e 6f 72 6d | can log| in norm|
|00004c90| 61 6c 6c 79 2c 20 6a 75 | 73 74 20 61 73 20 69 66 |ally, ju|st as if|
|00004ca0| 20 79 6f 75 27 72 65 0a | 58 63 6f 6e 6e 65 63 74 | you're.|Xconnect|
|00004cb0| 65 64 20 74 6f 20 74 68 | 65 20 6f 6c 64 20 74 65 |ed to th|e old te|
|00004cc0| 6c 6e 65 74 64 2e 20 4f | 6e 63 65 20 79 6f 75 27 |lnetd. O|nce you'|
|00004cd0| 72 65 20 69 6e 20 61 20 | 73 68 65 6c 6c 2c 20 74 |re in a |shell, t|
|00004ce0| 72 79 20 75 73 69 6e 67 | 20 74 68 65 20 70 74 79 |ry using| the pty|
|00004cf0| 0a 58 75 74 69 6c 69 74 | 69 65 73 2c 20 61 73 20 |.Xutilit|ies, as |
|00004d00| 69 66 20 79 6f 75 20 77 | 65 72 65 20 75 6e 64 65 |if you w|ere unde|
|00004d10| 72 20 73 65 73 73 2e 20 | 59 6f 75 20 73 68 6f 75 |r sess. |You shou|
|00004d20| 6c 64 20 66 69 6e 64 20 | 74 68 61 74 20 74 68 65 |ld find |that the|
|00004d30| 20 63 6f 6d 6d 61 6e 64 | 73 0a 58 66 61 69 6c 20 | command|s.Xfail |
|00004d40| 75 6e 6c 65 73 73 20 79 | 6f 75 27 72 65 20 72 6f |unless y|ou're ro|
|00004d50| 6f 74 2c 20 62 65 63 61 | 75 73 65 20 74 68 61 74 |ot, beca|use that|
|00004d60| 20 73 65 73 73 69 6f 6e | 20 77 61 73 20 73 74 61 | session| was sta|
|00004d70| 72 74 65 64 20 62 79 20 | 72 6f 6f 74 20 72 61 74 |rted by |root rat|
|00004d80| 68 65 72 0a 58 74 68 61 | 6e 20 79 6f 75 2e 20 28 |her.Xtha|n you. (|
|00004d90| 54 68 69 73 20 70 6f 69 | 6e 74 73 20 6f 75 74 20 |This poi|nts out |
|00004da0| 61 20 66 61 69 6c 75 72 | 65 20 69 6e 20 74 68 65 |a failur|e in the|
|00004db0| 20 74 65 6c 6e 65 74 64 | 2d 6c 6f 67 69 6e 2d 75 | telnetd|-login-u|
|00004dc0| 74 6d 70 20 6d 6f 64 65 | 6c 2e 29 0a 58 54 6f 20 |tmp mode|l.).XTo |
|00004dd0| 67 61 69 6e 20 63 6f 6e | 74 72 6f 6c 20 6f 66 20 |gain con|trol of |
|00004de0| 74 68 65 20 73 65 73 73 | 69 6f 6e 2c 20 74 79 70 |the sess|ion, typ|
|00004df0| 65 20 60 60 73 65 73 73 | 75 73 65 72 27 27 20 61 |e ``sess|user'' a|
|00004e00| 6e 64 20 70 72 61 79 2e | 20 49 66 20 6e 6f 74 68 |nd pray.| If noth|
|00004e10| 69 6e 67 0a 58 67 6f 65 | 73 20 77 72 6f 6e 67 2c |ing.Xgoe|s wrong,|
|00004e20| 20 79 6f 75 20 63 61 6e | 20 74 68 65 6e 20 64 69 | you can| then di|
|00004e30| 73 63 6f 6e 6e 65 63 74 | 20 74 68 65 20 73 65 73 |sconnect| the ses|
|00004e40| 73 69 6f 6e 2c 20 73 65 | 74 20 75 70 20 61 20 72 |sion, se|t up a r|
|00004e50| 65 63 6f 6e 6e 65 63 74 | 20 74 6f 0a 58 61 6e 6f |econnect| to.Xano|
|00004e60| 74 68 65 72 20 6f 6e 65 | 2c 20 75 73 65 20 73 65 |ther one|, use se|
|00004e70| 73 73 6e 61 6d 65 20 61 | 6e 64 20 73 65 73 73 6c |ssname a|nd sessl|
|00004e80| 69 73 74 2c 20 65 74 63 | 2e 20 59 61 68 6f 6f 21 |ist, etc|. Yahoo!|
|00004e90| 20 54 65 6c 6c 20 79 6f | 75 72 20 75 73 65 72 73 | Tell yo|ur users|
|00004ea0| 21 0a 58 52 65 70 6c 61 | 63 65 20 79 6f 75 72 20 |!.XRepla|ce your |
|00004eb0| 6f 6c 64 20 74 65 6c 6e | 65 74 64 20 77 69 74 68 |old teln|etd with|
|00004ec0| 20 74 68 65 20 6e 65 77 | 20 6f 6e 65 21 20 41 64 | the new| one! Ad|
|00004ed0| 64 20 73 65 73 73 75 73 | 65 72 20 74 6f 20 74 68 |d sessus|er to th|
|00004ee0| 65 20 64 65 66 61 75 6c | 74 0a 58 2e 63 73 68 72 |e defaul|t.X.cshr|
|00004ef0| 63 21 20 41 6e 64 20 70 | 6c 65 61 73 65 20 73 65 |c! And p|lease se|
|00004f00| 6e 64 20 61 20 6e 6f 74 | 65 20 74 6f 20 62 72 6e |nd a not|e to brn|
|00004f10| 73 74 6e 64 40 6e 79 75 | 2e 65 64 75 20 61 62 6f |stnd@nyu|.edu abo|
|00004f20| 75 74 20 79 6f 75 72 20 | 73 75 63 63 65 73 73 2e |ut your |success.|
|00004f30| 0a 58 0a 58 0a 58 4e 6f | 74 65 20 74 68 61 74 20 |.X.X.XNo|te that |
|00004f40| 6d 61 6e 79 20 70 6f 70 | 75 6c 61 72 20 76 65 72 |many pop|ular ver|
|00004f50| 73 69 6f 6e 73 20 6f 66 | 20 6c 6f 67 69 6e 20 75 |sions of| login u|
|00004f60| 73 65 20 61 6e 20 61 6e | 6e 6f 79 69 6e 67 20 68 |se an an|noying h|
|00004f70| 65 75 72 69 73 74 69 63 | 20 74 6f 0a 58 73 61 76 |euristic| to.Xsav|
|00004f80| 65 20 61 20 66 65 77 20 | 6d 69 63 72 6f 73 65 63 |e a few |microsec|
|00004f90| 6f 6e 64 73 20 69 6e 20 | 75 70 64 61 74 69 6e 67 |onds in |updating|
|00004fa0| 20 2f 65 74 63 2f 75 74 | 6d 70 2e 20 54 68 65 20 | /etc/ut|mp. The |
|00004fb0| 72 65 73 75 6c 74 20 69 | 73 2c 20 66 69 72 73 74 |result i|s, first|
|00004fc0| 2c 0a 58 74 68 61 74 20 | 74 68 65 72 65 27 73 20 |,.Xthat |there's |
|00004fd0| 61 20 72 61 63 65 20 63 | 6f 6e 64 69 74 69 6f 6e |a race c|ondition|
|00004fe0| 20 74 68 61 74 20 63 61 | 6e 20 62 72 65 61 6b 20 | that ca|n break |
|00004ff0| 64 6f 77 6e 20 2f 65 74 | 63 2f 75 74 6d 70 20 6f |down /et|c/utmp o|
|00005000| 6e 20 68 65 61 76 69 6c | 79 0a 58 6c 6f 61 64 65 |n heavil|y.Xloade|
|00005010| 64 20 6d 61 63 68 69 6e | 65 73 3b 20 61 6e 64 20 |d machin|es; and |
|00005020| 73 65 63 6f 6e 64 2c 20 | 74 68 61 74 20 6c 6f 67 |second, |that log|
|00005030| 69 6e 20 61 6e 64 20 70 | 74 79 20 68 61 76 65 20 |in and p|ty have |
|00005040| 64 69 66 66 65 72 65 6e | 74 20 76 69 65 77 73 20 |differen|t views |
|00005050| 6f 66 0a 58 2f 65 74 63 | 2f 75 74 6d 70 2e 20 46 |of.X/etc|/utmp. F|
|00005060| 6f 72 20 74 68 69 73 20 | 72 65 61 73 6f 6e 2c 20 |or this |reason, |
|00005070| 70 74 79 20 69 73 20 69 | 6e 76 6f 6b 65 64 20 77 |pty is i|nvoked w|
|00005080| 69 74 68 20 2d 78 52 20 | 74 6f 20 73 65 61 72 63 |ith -xR |to searc|
|00005090| 68 20 66 6f 72 20 70 74 | 79 73 0a 58 69 6e 20 6f |h for pt|ys.Xin o|
|000050a0| 72 64 65 72 2e 20 59 6f | 75 20 6d 61 79 20 65 76 |rder. Yo|u may ev|
|000050b0| 65 6e 20 77 61 6e 74 20 | 74 6f 20 6d 61 6b 65 20 |en want |to make |
|000050c0| 2d 78 52 20 64 65 66 61 | 75 6c 74 20 28 62 79 20 |-xR defa|ult (by |
|000050d0| 73 65 74 74 69 6e 67 20 | 66 6c 61 67 78 72 61 6e |setting |flagxran|
|000050e0| 64 6f 6d 0a 58 74 6f 20 | 30 20 69 6e 20 70 74 79 |dom.Xto |0 in pty|
|000050f0| 27 73 20 67 6c 6f 62 61 | 6c 73 2e 63 29 2e 20 53 |'s globa|ls.c). S|
|00005100| 69 67 68 2e 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |igh..END|_OF_FILE|
|00005110| 0a 20 20 69 66 20 74 65 | 73 74 20 34 37 37 37 20 |. if te|st 4777 |
|00005120| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 70 61 74 |-ne `wc |-c <'pat|
|00005130| 63 68 2f 52 45 41 44 4d | 45 27 60 3b 20 74 68 65 |ch/READM|E'`; the|
|00005140| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00005150| 20 5c 22 27 70 61 74 63 | 68 2f 52 45 41 44 4d 45 | \"'patc|h/README|
|00005160| 27 5c 22 20 75 6e 70 61 | 63 6b 65 64 20 77 69 74 |'\" unpa|cked wit|
|00005170| 68 20 77 72 6f 6e 67 20 | 73 69 7a 65 21 0a 20 20 |h wrong |size!. |
|00005180| 66 69 0a 20 20 23 20 65 | 6e 64 20 6f 66 20 27 70 |fi. # e|nd of 'p|
|00005190| 61 74 63 68 2f 52 45 41 | 44 4d 45 27 0a 66 69 0a |atch/REA|DME'.fi.|
|000051a0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 73 69 67 2e |if test |-f 'sig.|
|000051b0| 63 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |c' -a "$|{1}" != |
|000051c0| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|000051d0| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|000051e0| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|000051f0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 73 69 67 2e |ing file| \"'sig.|
|00005200| 63 27 5c 22 0a 65 6c 73 | 65 0a 20 20 65 63 68 6f |c'\".els|e. echo|
|00005210| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00005220| 67 20 5c 22 27 73 69 67 | 2e 63 27 5c 22 20 5c 28 |g \"'sig|.c'\" \(|
|00005230| 34 35 34 39 20 63 68 61 | 72 61 63 74 65 72 73 5c |4549 cha|racters\|
|00005240| 29 0a 20 20 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |). sed |"s/^X//"|
|00005250| 20 3e 27 73 69 67 2e 63 | 27 20 3c 3c 27 45 4e 44 | >'sig.c|' <<'END|
|00005260| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2f 2a 20 43 6f |_OF_FILE|'.X/* Co|
|00005270| 70 79 72 69 67 68 74 20 | 31 39 39 30 2c 20 44 61 |pyright |1990, Da|
|00005280| 6e 69 65 6c 20 4a 2e 20 | 42 65 72 6e 73 74 65 69 |niel J. |Bernstei|
|00005290| 6e 2e 20 41 6c 6c 20 72 | 69 67 68 74 73 20 72 65 |n. All r|ights re|
|000052a0| 73 65 72 76 65 64 2e 20 | 2a 2f 0a 58 0a 58 23 69 |served. |*/.X.X#i|
|000052b0| 6e 63 6c 75 64 65 20 22 | 63 6f 6e 66 69 67 2e 68 |nclude "|config.h|
|000052c0| 22 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |".X#incl|ude <sys|
|000052d0| 2f 74 69 6d 65 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |/time.h>|.X#inclu|
|000052e0| 64 65 20 22 73 69 67 2e | 68 22 0a 58 0a 58 2f 2a |de "sig.|h".X.X/*|
|000052f0| 20 54 68 69 73 20 69 73 | 20 61 20 73 74 72 69 70 | This is| a strip|
|00005300| 70 65 64 2d 64 6f 77 6e | 20 73 69 67 6e 61 6c 20 |ped-down| signal |
|00005310| 6c 69 62 72 61 72 79 2c | 20 77 69 74 68 20 61 75 |library,| with au|
|00005320| 74 6f 6d 61 74 69 63 20 | 63 72 69 74 69 63 61 6c |tomatic |critical|
|00005330| 20 2a 2f 0a 58 2f 2a 20 | 73 65 63 74 69 6f 6e 73 | */.X/* |sections|
|00005340| 20 61 72 6f 75 6e 64 20 | 65 76 65 72 79 20 73 69 | around |every si|
|00005350| 67 6e 61 6c 20 68 61 6e | 64 6c 65 72 2e 20 41 73 |gnal han|dler. As|
|00005360| 20 6c 6f 6e 67 20 61 73 | 20 6e 6f 20 73 69 67 6e | long as| no sign|
|00005370| 61 6c 20 68 61 6e 64 6c | 65 72 20 2a 2f 0a 58 2f |al handl|er */.X/|
|00005380| 2a 20 68 61 73 20 74 6f | 20 70 61 75 73 65 20 77 |* has to| pause w|
|00005390| 61 69 74 69 6e 67 20 66 | 6f 72 20 61 6e 6f 74 68 |aiting f|or anoth|
|000053a0| 65 72 20 73 69 67 6e 61 | 6c 2c 20 74 68 69 73 20 |er signa|l, this |
|000053b0| 77 6f 72 6b 73 20 62 65 | 61 75 74 69 66 75 6c 6c |works be|autifull|
|000053c0| 79 20 2a 2f 0a 58 2f 2a | 20 61 6e 64 20 70 72 65 |y */.X/*| and pre|
|000053d0| 76 65 6e 74 73 20 61 6c | 6c 20 72 61 63 65 73 2e |vents al|l races.|
|000053e0| 20 2a 2f 0a 58 0a 58 73 | 74 61 74 69 63 20 69 6e | */.X.Xs|tatic in|
|000053f0| 74 20 71 75 65 75 65 64 | 5b 53 49 47 4e 55 4d 5d |t queued|[SIGNUM]|
|00005400| 3b 0a 58 73 74 61 74 69 | 63 20 69 6e 74 20 71 75 |;.Xstati|c int qu|
|00005410| 6f 5b 53 49 47 4e 55 4d | 5d 3b 0a 58 73 74 61 74 |o[SIGNUM|];.Xstat|
|00005420| 69 63 20 73 69 67 5f 73 | 79 73 68 61 6e 64 6c 65 |ic sig_s|yshandle|
|00005430| 72 20 6f 72 69 67 5b 53 | 49 47 4e 55 4d 5d 3b 0a |r orig[S|IGNUM];.|
|00005440| 58 73 74 61 74 69 63 20 | 73 69 67 5f 68 61 6e 64 |Xstatic |sig_hand|
|00005450| 6c 65 72 20 68 61 6e 64 | 6c 65 72 5b 53 49 47 4e |ler hand|ler[SIGN|
|00005460| 55 4d 5d 3b 0a 58 0a 58 | 73 74 61 74 69 63 20 73 |UM];.X.X|static s|
|00005470| 69 67 5f 73 79 73 68 61 | 6e 64 6c 65 72 20 73 69 |ig_sysha|ndler si|
|00005480| 67 6e 61 6c 76 28 73 2c | 68 29 0a 58 72 65 67 69 |gnalv(s,|h).Xregi|
|00005490| 73 74 65 72 20 73 69 67 | 5f 6e 75 6d 20 73 3b 0a |ster sig|_num s;.|
|000054a0| 58 72 65 67 69 73 74 65 | 72 20 73 69 67 5f 73 79 |Xregiste|r sig_sy|
|000054b0| 73 68 61 6e 64 6c 65 72 | 20 68 3b 0a 58 7b 0a 58 |shandler| h;.X{.X|
|000054c0| 20 72 65 74 75 72 6e 20 | 73 69 67 6e 61 6c 28 73 | return |signal(s|
|000054d0| 2c 68 29 3b 0a 58 7d 0a | 58 0a 58 73 74 61 74 69 |,h);.X}.|X.Xstati|
|000054e0| 63 20 69 6e 74 20 63 72 | 69 74 20 3d 20 30 3b 0a |c int cr|it = 0;.|
|000054f0| 58 0a 58 73 74 61 74 69 | 63 20 76 6f 69 64 20 68 |X.Xstati|c void h|
|00005500| 61 6e 64 6c 65 28 69 29 | 0a 58 72 65 67 69 73 74 |andle(i)|.Xregist|
|00005510| 65 72 20 73 69 67 5f 6e | 75 6d 20 69 3b 0a 58 7b |er sig_n|um i;.X{|
|00005520| 0a 58 20 69 66 20 28 63 | 72 69 74 29 0a 58 20 20 |.X if (c|rit).X |
|00005530| 20 71 75 65 75 65 64 5b | 69 5d 20 3d 20 31 3b 0a | queued[|i] = 1;.|
|00005540| 58 20 65 6c 73 65 0a 58 | 20 20 7b 0a 58 20 20 20 |X else.X| {.X |
|00005550| 72 65 67 69 73 74 65 72 | 20 69 6e 74 20 71 3b 0a |register| int q;.|
|00005560| 58 20 20 20 72 65 67 69 | 73 74 65 72 20 73 69 67 |X regi|ster sig|
|00005570| 5f 6e 75 6d 20 6a 3b 0a | 58 0a 58 20 20 20 63 72 |_num j;.|X.X cr|
|00005580| 69 74 20 3d 20 31 3b 20 | 28 76 6f 69 64 29 20 68 |it = 1; |(void) h|
|00005590| 61 6e 64 6c 65 72 5b 69 | 5d 28 69 29 3b 20 71 75 |andler[i|](i); qu|
|000055a0| 65 75 65 64 5b 69 5d 20 | 3d 20 30 3b 20 63 72 69 |eued[i] |= 0; cri|
|000055b0| 74 20 3d 20 30 3b 0a 58 | 20 20 20 64 6f 20 66 6f |t = 0;.X| do fo|
|000055c0| 72 20 28 6a 20 3d 20 71 | 20 3d 20 30 3b 6a 20 3c |r (j = q| = 0;j <|
|000055d0| 20 53 49 47 4e 55 4d 3b | 6a 2b 2b 29 20 69 66 20 | SIGNUM;|j++) if |
|000055e0| 28 71 75 65 75 65 64 5b | 6a 5d 29 0a 58 09 7b 0a |(queued[|j]).X.{.|
|000055f0| 58 09 20 63 72 69 74 20 | 3d 20 71 20 3d 20 31 3b |X. crit |= q = 1;|
|00005600| 0a 58 09 20 69 66 20 28 | 6a 20 21 3d 20 69 29 20 |.X. if (|j != i) |
|00005610| 28 76 6f 69 64 29 20 68 | 61 6e 64 6c 65 72 5b 6a |(void) h|andler[j|
|00005620| 5d 28 6a 29 3b 0a 58 09 | 20 71 75 65 75 65 64 5b |](j);.X.| queued[|
|00005630| 6a 5d 20 3d 20 30 3b 20 | 63 72 69 74 20 3d 20 30 |j] = 0; |crit = 0|
|00005640| 3b 0a 58 09 7d 0a 58 20 | 20 20 77 68 69 6c 65 20 |;.X.}.X | while |
|00005650| 28 71 29 3b 0a 58 20 20 | 7d 0a 58 7d 0a 58 0a 58 |(q);.X |}.X}.X.X|
|00005660| 2f 2a 20 54 6f 20 73 65 | 65 20 77 68 79 20 68 61 |/* To se|e why ha|
|00005670| 6e 64 6c 65 28 29 20 77 | 6f 72 6b 73 3a 20 46 69 |ndle() w|orks: Fi|
|00005680| 72 73 74 2c 20 63 72 69 | 74 20 63 61 6e 20 62 65 |rst, cri|t can be|
|00005690| 20 63 6f 6e 73 69 64 65 | 72 65 64 20 61 20 6c 6f | conside|red a lo|
|000056a0| 63 61 6c 0a 58 76 61 72 | 69 61 62 6c 65 2c 20 62 |cal.Xvar|iable, b|
|000056b0| 65 63 61 75 73 65 20 68 | 61 6e 64 6c 65 28 29 20 |ecause h|andle() |
|000056c0| 69 73 20 74 68 65 20 6f | 6e 6c 79 20 72 6f 75 74 |is the o|nly rout|
|000056d0| 69 6e 65 20 74 68 61 74 | 20 6d 6f 64 69 66 69 65 |ine that| modifie|
|000056e0| 73 20 69 74 2c 20 61 6e | 64 0a 58 68 61 6e 64 6c |s it, an|d.Xhandl|
|000056f0| 65 28 29 20 61 6c 77 61 | 79 73 20 6c 65 61 76 65 |e() alwa|ys leave|
|00005700| 73 20 63 72 69 74 20 74 | 68 65 20 73 61 6d 65 2e |s crit t|he same.|
|00005710| 20 53 65 63 6f 6e 64 2c | 20 63 72 69 74 20 69 73 | Second,| crit is|
|00005720| 20 31 20 77 68 69 6c 65 | 20 61 6e 79 0a 58 68 61 | 1 while| any.Xha|
|00005730| 6e 64 6c 65 72 20 69 73 | 20 63 61 6c 6c 65 64 2c |ndler is| called,|
|00005740| 20 61 6e 64 20 74 68 65 | 6e 20 61 6e 79 20 73 69 | and the|n any si|
|00005750| 6d 75 6c 74 61 6e 65 6f | 75 73 20 68 61 6e 64 6c |multaneo|us handl|
|00005760| 65 28 29 73 20 77 69 6c | 6c 20 73 69 6d 70 6c 79 |e()s wil|l simply|
|00005770| 0a 58 71 75 65 75 65 2e | 20 48 65 6e 63 65 20 68 |.Xqueue.| Hence h|
|00005780| 61 6e 64 6c 65 72 73 20 | 61 72 65 20 6d 75 74 75 |andlers |are mutu|
|00005790| 61 6c 6c 79 20 65 78 63 | 6c 75 73 69 76 65 2e 20 |ally exc|lusive. |
|000057a0| 54 68 69 72 64 2c 20 77 | 68 65 6e 20 68 61 6e 64 |Third, w|hen hand|
|000057b0| 6c 65 28 29 20 69 73 0a | 58 63 61 6c 6c 65 64 20 |le() is.|Xcalled |
|000057c0| 77 69 74 68 20 63 72 69 | 74 20 3d 3d 20 30 2c 20 |with cri|t == 0, |
|000057d0| 69 74 20 63 61 6e 20 6f | 6e 6c 79 20 65 78 69 74 |it can o|nly exit|
|000057e0| 20 61 66 74 65 72 20 67 | 6f 69 6e 67 20 74 68 72 | after g|oing thr|
|000057f0| 6f 75 67 68 20 61 6e 20 | 65 6e 74 69 72 65 20 6a |ough an |entire j|
|00005800| 0a 58 6c 6f 6f 70 20 77 | 69 74 68 20 6e 6f 20 71 |.Xloop w|ith no q|
|00005810| 75 65 75 65 64 5b 5d 73 | 20 74 72 75 65 2e 20 46 |ueued[]s| true. F|
|00005820| 6f 75 72 74 68 2c 20 69 | 66 20 61 6c 6c 20 71 75 |ourth, i|f all qu|
|00005830| 65 75 65 64 5b 5d 73 20 | 61 72 65 20 66 61 6c 73 |eued[]s |are fals|
|00005840| 65 20 74 68 72 6f 75 67 | 68 0a 58 74 68 61 74 20 |e throug|h.Xthat |
|00005850| 6a 20 6c 6f 6f 70 2c 20 | 74 68 65 6e 20 63 72 69 |j loop, |then cri|
|00005860| 74 20 69 73 20 6e 6f 74 | 20 73 65 74 20 62 79 20 |t is not| set by |
|00005870| 68 61 6e 64 6c 65 28 29 | 20 64 75 72 69 6e 67 20 |handle()| during |
|00005880| 74 68 61 74 20 6c 6f 6f | 70 2e 20 46 69 6e 61 6c |that loo|p. Final|
|00005890| 6c 79 2c 0a 58 69 66 20 | 63 72 69 74 20 69 73 20 |ly,.Xif |crit is |
|000058a0| 30 2c 20 68 61 6e 64 6c | 65 28 29 20 77 69 6c 6c |0, handl|e() will|
|000058b0| 20 65 78 69 74 20 77 69 | 74 68 20 6e 6f 20 71 75 | exit wi|th no qu|
|000058c0| 65 75 65 64 20 73 69 67 | 6e 61 6c 73 3a 20 74 68 |eued sig|nals: th|
|000058d0| 69 73 20 69 73 20 74 72 | 75 65 20 62 79 0a 58 69 |is is tr|ue by.Xi|
|000058e0| 6e 64 75 63 74 69 6f 6e | 20 66 72 6f 6d 20 74 68 |nduction| from th|
|000058f0| 65 20 70 72 65 76 69 6f | 75 73 20 6f 62 73 65 72 |e previo|us obser|
|00005900| 76 61 74 69 6f 6e 73 2e | 20 2a 2f 0a 58 0a 58 0a |vations.| */.X.X.|
|00005910| 58 2f 2a 20 54 68 65 72 | 65 20 69 73 20 75 6e 66 |X/* Ther|e is unf|
|00005920| 6f 72 74 75 6e 61 74 65 | 6c 79 20 6e 6f 20 67 75 |ortunate|ly no gu|
|00005930| 61 72 61 6e 74 65 65 20 | 74 68 61 74 20 61 20 73 |arantee |that a s|
|00005940| 69 67 6e 61 6c 20 68 61 | 6e 64 6c 65 72 20 61 73 |ignal ha|ndler as|
|00005950| 20 2a 2f 0a 58 2f 2a 20 | 70 61 73 73 65 64 20 74 | */.X/* |passed t|
|00005960| 6f 20 73 69 67 6e 61 6c | 28 29 20 77 69 6c 6c 20 |o signal|() will |
|00005970| 72 65 63 65 69 76 65 20 | 69 74 73 20 73 69 67 6e |receive |its sign|
|00005980| 61 6c 20 6e 75 6d 62 65 | 72 20 61 73 20 69 74 73 |al numbe|r as its|
|00005990| 20 66 69 72 73 74 20 2a | 2f 0a 58 2f 2a 20 61 72 | first *|/.X/* ar|
|000059a0| 67 75 6d 65 6e 74 2e 20 | 57 65 20 64 6f 20 6d 61 |gument. |We do ma|
|000059b0| 6b 65 20 74 68 61 74 20 | 67 75 61 72 61 6e 74 65 |ke that |guarante|
|000059c0| 65 2e 20 2a 2f 0a 58 0a | 58 23 64 65 66 69 6e 65 |e. */.X.|X#define|
|000059d0| 20 48 41 4e 28 73 2c 68 | 29 20 53 49 47 52 45 54 | HAN(s,h|) SIGRET|
|000059e0| 5f 54 59 50 45 20 68 28 | 29 20 7b 20 68 61 6e 64 |_TYPE h(|) { hand|
|000059f0| 6c 65 28 73 29 3b 20 7d | 0a 58 0a 58 48 41 4e 28 |le(s); }|.X.XHAN(|
|00005a00| 30 2c 68 61 6e 30 29 3b | 20 20 20 48 41 4e 28 31 |0,han0);| HAN(1|
|00005a10| 2c 68 61 6e 31 29 3b 20 | 20 20 48 41 4e 28 32 2c |,han1); | HAN(2,|
|00005a20| 68 61 6e 32 29 3b 20 20 | 20 48 41 4e 28 33 2c 68 |han2); | HAN(3,h|
|00005a30| 61 6e 33 29 3b 0a 58 48 | 41 4e 28 34 2c 68 61 6e |an3);.XH|AN(4,han|
|00005a40| 34 29 3b 20 20 20 48 41 | 4e 28 35 2c 68 61 6e 35 |4); HA|N(5,han5|
|00005a50| 29 3b 20 20 20 48 41 4e | 28 36 2c 68 61 6e 36 29 |); HAN|(6,han6)|
|00005a60| 3b 20 20 20 48 41 4e 28 | 37 2c 68 61 6e 37 29 3b |; HAN(|7,han7);|
|00005a70| 0a 58 48 41 4e 28 38 2c | 68 61 6e 38 29 3b 20 20 |.XHAN(8,|han8); |
|00005a80| 20 48 41 4e 28 39 2c 68 | 61 6e 39 29 3b 20 20 20 | HAN(9,h|an9); |
|00005a90| 48 41 4e 28 31 30 2c 68 | 61 6e 31 30 29 3b 20 48 |HAN(10,h|an10); H|
|00005aa0| 41 4e 28 31 31 2c 68 61 | 6e 31 31 29 3b 0a 58 48 |AN(11,ha|n11);.XH|
|00005ab0| 41 4e 28 31 32 2c 68 61 | 6e 31 32 29 3b 20 48 41 |AN(12,ha|n12); HA|
|00005ac0| 4e 28 31 33 2c 68 61 6e | 31 33 29 3b 20 48 41 4e |N(13,han|13); HAN|
|00005ad0| 28 31 34 2c 68 61 6e 31 | 34 29 3b 20 48 41 4e 28 |(14,han1|4); HAN(|
|00005ae0| 31 35 2c 68 61 6e 31 35 | 29 3b 0a 58 48 41 4e 28 |15,han15|);.XHAN(|
|00005af0| 31 36 2c 68 61 6e 31 36 | 29 3b 20 48 41 4e 28 31 |16,han16|); HAN(1|
|00005b00| 37 2c 68 61 6e 31 37 29 | 3b 20 48 41 4e 28 31 38 |7,han17)|; HAN(18|
|00005b10| 2c 68 61 6e 31 38 29 3b | 20 48 41 4e 28 31 39 2c |,han18);| HAN(19,|
|00005b20| 68 61 6e 31 39 29 3b 0a | 58 48 41 4e 28 32 30 2c |han19);.|XHAN(20,|
|00005b30| 68 61 6e 32 30 29 3b 20 | 48 41 4e 28 32 31 2c 68 |han20); |HAN(21,h|
|00005b40| 61 6e 32 31 29 3b 20 48 | 41 4e 28 32 32 2c 68 61 |an21); H|AN(22,ha|
|00005b50| 6e 32 32 29 3b 20 48 41 | 4e 28 32 33 2c 68 61 6e |n22); HA|N(23,han|
|00005b60| 32 33 29 3b 0a 58 48 41 | 4e 28 32 34 2c 68 61 6e |23);.XHA|N(24,han|
|00005b70| 32 34 29 3b 20 48 41 4e | 28 32 35 2c 68 61 6e 32 |24); HAN|(25,han2|
|00005b80| 35 29 3b 20 48 41 4e 28 | 32 36 2c 68 61 6e 32 36 |5); HAN(|26,han26|
|00005b90| 29 3b 20 48 41 4e 28 32 | 37 2c 68 61 6e 32 37 29 |); HAN(2|7,han27)|
|00005ba0| 3b 0a 58 48 41 4e 28 32 | 38 2c 68 61 6e 32 38 29 |;.XHAN(2|8,han28)|
|00005bb0| 3b 20 48 41 4e 28 32 39 | 2c 68 61 6e 32 39 29 3b |; HAN(29|,han29);|
|00005bc0| 20 48 41 4e 28 33 30 2c | 68 61 6e 33 30 29 3b 20 | HAN(30,|han30); |
|00005bd0| 48 41 4e 28 33 31 2c 68 | 61 6e 33 31 29 3b 0a 58 |HAN(31,h|an31);.X|
|00005be0| 0a 58 73 74 61 74 69 63 | 20 73 69 67 5f 73 79 73 |.Xstatic| sig_sys|
|00005bf0| 68 61 6e 64 6c 65 72 20 | 68 61 6e 5b 33 32 5d 20 |handler |han[32] |
|00005c00| 3d 0a 58 20 20 7b 20 68 | 61 6e 30 20 2c 68 61 6e |=.X { h|an0 ,han|
|00005c10| 31 20 2c 68 61 6e 32 20 | 2c 68 61 6e 33 20 2c 68 |1 ,han2 |,han3 ,h|
|00005c20| 61 6e 34 20 2c 68 61 6e | 35 20 2c 68 61 6e 36 20 |an4 ,han|5 ,han6 |
|00005c30| 2c 68 61 6e 37 20 2c 0a | 58 20 20 20 20 68 61 6e |,han7 ,.|X han|
|00005c40| 38 20 2c 68 61 6e 39 20 | 2c 68 61 6e 31 30 2c 68 |8 ,han9 |,han10,h|
|00005c50| 61 6e 31 31 2c 68 61 6e | 31 32 2c 68 61 6e 31 33 |an11,han|12,han13|
|00005c60| 2c 68 61 6e 31 34 2c 68 | 61 6e 31 35 2c 0a 58 20 |,han14,h|an15,.X |
|00005c70| 20 20 20 68 61 6e 31 36 | 2c 68 61 6e 31 37 2c 68 | han16|,han17,h|
|00005c80| 61 6e 31 38 2c 68 61 6e | 31 39 2c 68 61 6e 32 30 |an18,han|19,han20|
|00005c90| 2c 68 61 6e 32 31 2c 68 | 61 6e 32 32 2c 68 61 6e |,han21,h|an22,han|
|00005ca0| 32 33 2c 0a 58 20 20 20 | 20 68 61 6e 32 34 2c 68 |23,.X | han24,h|
|00005cb0| 61 6e 32 35 2c 68 61 6e | 32 36 2c 68 61 6e 32 37 |an25,han|26,han27|
|00005cc0| 2c 68 61 6e 32 38 2c 68 | 61 6e 32 39 2c 68 61 6e |,han28,h|an29,han|
|00005cd0| 33 30 2c 68 61 6e 33 31 | 0a 58 20 20 7d 20 3b 0a |30,han31|.X } ;.|
|00005ce0| 58 0a 58 23 64 65 66 69 | 6e 65 20 51 55 45 28 73 |X.X#defi|ne QUE(s|
|00005cf0| 2c 68 29 20 53 49 47 52 | 45 54 5f 54 59 50 45 20 |,h) SIGR|ET_TYPE |
|00005d00| 68 28 29 20 7b 20 71 75 | 6f 5b 73 5d 20 3d 20 31 |h() { qu|o[s] = 1|
|00005d10| 3b 20 7d 0a 58 0a 58 51 | 55 45 28 30 2c 71 75 65 |; }.X.XQ|UE(0,que|
|00005d20| 30 29 3b 20 20 20 51 55 | 45 28 31 2c 71 75 65 31 |0); QU|E(1,que1|
|00005d30| 29 3b 20 20 20 51 55 45 | 28 32 2c 71 75 65 32 29 |); QUE|(2,que2)|
|00005d40| 3b 20 20 20 51 55 45 28 | 33 2c 71 75 65 33 29 3b |; QUE(|3,que3);|
|00005d50| 0a 58 51 55 45 28 34 2c | 71 75 65 34 29 3b 20 20 |.XQUE(4,|que4); |
|00005d60| 20 51 55 45 28 35 2c 71 | 75 65 35 29 3b 20 20 20 | QUE(5,q|ue5); |
|00005d70| 51 55 45 28 36 2c 71 75 | 65 36 29 3b 20 20 20 51 |QUE(6,qu|e6); Q|
|00005d80| 55 45 28 37 2c 71 75 65 | 37 29 3b 0a 58 51 55 45 |UE(7,que|7);.XQUE|
|00005d90| 28 38 2c 71 75 65 38 29 | 3b 20 20 20 51 55 45 28 |(8,que8)|; QUE(|
|00005da0| 39 2c 71 75 65 39 29 3b | 20 20 20 51 55 45 28 31 |9,que9);| QUE(1|
|00005db0| 30 2c 71 75 65 31 30 29 | 3b 20 51 55 45 28 31 31 |0,que10)|; QUE(11|
|00005dc0| 2c 71 75 65 31 31 29 3b | 0a 58 51 55 45 28 31 32 |,que11);|.XQUE(12|
|00005dd0| 2c 71 75 65 31 32 29 3b | 20 51 55 45 28 31 33 2c |,que12);| QUE(13,|
|00005de0| 71 75 65 31 33 29 3b 20 | 51 55 45 28 31 34 2c 71 |que13); |QUE(14,q|
|00005df0| 75 65 31 34 29 3b 20 51 | 55 45 28 31 35 2c 71 75 |ue14); Q|UE(15,qu|
|00005e00| 65 31 35 29 3b 0a 58 51 | 55 45 28 31 36 2c 71 75 |e15);.XQ|UE(16,qu|
|00005e10| 65 31 36 29 3b 20 51 55 | 45 28 31 37 2c 71 75 65 |e16); QU|E(17,que|
|00005e20| 31 37 29 3b 20 51 55 45 | 28 31 38 2c 71 75 65 31 |17); QUE|(18,que1|
|00005e30| 38 29 3b 20 51 55 45 28 | 31 39 2c 71 75 65 31 39 |8); QUE(|19,que19|
|00005e40| 29 3b 0a 58 51 55 45 28 | 32 30 2c 71 75 65 32 30 |);.XQUE(|20,que20|
|00005e50| 29 3b 20 51 55 45 28 32 | 31 2c 71 75 65 32 31 29 |); QUE(2|1,que21)|
|00005e60| 3b 20 51 55 45 28 32 32 | 2c 71 75 65 32 32 29 3b |; QUE(22|,que22);|
|00005e70| 20 51 55 45 28 32 33 2c | 71 75 65 32 33 29 3b 0a | QUE(23,|que23);.|
|00005e80| 58 51 55 45 28 32 34 2c | 71 75 65 32 34 29 3b 20 |XQUE(24,|que24); |
|00005e90| 51 55 45 28 32 35 2c 71 | 75 65 32 35 29 3b 20 51 |QUE(25,q|ue25); Q|
|00005ea0| 55 45 28 32 36 2c 71 75 | 65 32 36 29 3b 20 51 55 |UE(26,qu|e26); QU|
|00005eb0| 45 28 32 37 2c 71 75 65 | 32 37 29 3b 0a 58 51 55 |E(27,que|27);.XQU|
|00005ec0| 45 28 32 38 2c 71 75 65 | 32 38 29 3b 20 51 55 45 |E(28,que|28); QUE|
|00005ed0| 28 32 39 2c 71 75 65 32 | 39 29 3b 20 51 55 45 28 |(29,que2|9); QUE(|
|00005ee0| 33 30 2c 71 75 65 33 30 | 29 3b 20 51 55 45 28 33 |30,que30|); QUE(3|
|00005ef0| 31 2c 71 75 65 33 31 29 | 3b 0a 58 0a 58 73 74 61 |1,que31)|;.X.Xsta|
|00005f00| 74 69 63 20 73 69 67 5f | 73 79 73 68 61 6e 64 6c |tic sig_|syshandl|
|00005f10| 65 72 20 71 75 65 5b 33 | 32 5d 20 3d 0a 58 20 20 |er que[3|2] =.X |
|00005f20| 7b 20 71 75 65 30 20 2c | 71 75 65 31 20 2c 71 75 |{ que0 ,|que1 ,qu|
|00005f30| 65 32 20 2c 71 75 65 33 | 20 2c 71 75 65 34 20 2c |e2 ,que3| ,que4 ,|
|00005f40| 71 75 65 35 20 2c 71 75 | 65 36 20 2c 71 75 65 37 |que5 ,qu|e6 ,que7|
|00005f50| 20 2c 0a 58 20 20 20 20 | 71 75 65 38 20 2c 71 75 | ,.X |que8 ,qu|
|00005f60| 65 39 20 2c 71 75 65 31 | 30 2c 71 75 65 31 31 2c |e9 ,que1|0,que11,|
|00005f70| 71 75 65 31 32 2c 71 75 | 65 31 33 2c 71 75 65 31 |que12,qu|e13,que1|
|00005f80| 34 2c 71 75 65 31 35 2c | 0a 58 20 20 20 20 71 75 |4,que15,|.X qu|
|00005f90| 65 31 36 2c 71 75 65 31 | 37 2c 71 75 65 31 38 2c |e16,que1|7,que18,|
|00005fa0| 71 75 65 31 39 2c 71 75 | 65 32 30 2c 71 75 65 32 |que19,qu|e20,que2|
|00005fb0| 31 2c 71 75 65 32 32 2c | 71 75 65 32 33 2c 0a 58 |1,que22,|que23,.X|
|00005fc0| 20 20 20 20 71 75 65 32 | 34 2c 71 75 65 32 35 2c | que2|4,que25,|
|00005fd0| 71 75 65 32 36 2c 71 75 | 65 32 37 2c 71 75 65 32 |que26,qu|e27,que2|
|00005fe0| 38 2c 71 75 65 32 39 2c | 71 75 65 33 30 2c 71 75 |8,que29,|que30,qu|
|00005ff0| 65 33 31 0a 58 20 20 7d | 20 3b 0a 58 0a 58 0a 58 |e31.X }| ;.X.X.X|
|00006000| 76 6f 69 64 20 73 69 67 | 5f 69 6e 69 74 28 29 0a |void sig|_init().|
|00006010| 58 7b 0a 58 20 73 69 67 | 5f 6e 75 6d 20 69 3b 0a |X{.X sig|_num i;.|
|00006020| 58 0a 58 20 66 6f 72 20 | 28 69 20 3d 20 30 3b 69 |X.X for |(i = 0;i|
|00006030| 20 3c 20 53 49 47 4e 55 | 4d 3b 69 2b 2b 29 0a 58 | < SIGNU|M;i++).X|
|00006040| 20 20 20 71 75 6f 5b 69 | 5d 20 3d 20 30 3b 0a 58 | quo[i|] = 0;.X|
|00006050| 20 66 6f 72 20 28 69 20 | 3d 20 30 3b 69 20 3c 20 | for (i |= 0;i < |
|00006060| 53 49 47 4e 55 4d 3b 69 | 2b 2b 29 0a 58 20 20 20 |SIGNUM;i|++).X |
|00006070| 6f 72 69 67 5b 69 5d 20 | 3d 20 73 69 67 6e 61 6c |orig[i] |= signal|
|00006080| 76 28 69 2c 71 75 65 5b | 69 5d 29 3b 0a 58 7d 0a |v(i,que[|i]);.X}.|
|00006090| 58 0a 58 76 6f 69 64 20 | 73 69 67 5f 72 65 73 74 |X.Xvoid |sig_rest|
|000060a0| 6f 72 65 28 29 0a 58 7b | 0a 58 20 73 69 67 5f 6e |ore().X{|.X sig_n|
|000060b0| 75 6d 20 69 3b 0a 58 0a | 58 20 66 6f 72 20 28 69 |um i;.X.|X for (i|
|000060c0| 20 3d 20 30 3b 69 20 3c | 20 53 49 47 4e 55 4d 3b | = 0;i <| SIGNUM;|
|000060d0| 69 2b 2b 29 0a 58 20 20 | 20 28 76 6f 69 64 29 20 |i++).X | (void) |
|000060e0| 73 69 67 6e 61 6c 76 28 | 69 2c 6f 72 69 67 5b 69 |signalv(|i,orig[i|
|000060f0| 5d 29 3b 0a 58 7d 0a 58 | 0a 58 76 6f 69 64 20 73 |]);.X}.X|.Xvoid s|
|00006100| 69 67 5f 68 61 6e 64 6c | 65 28 73 29 0a 58 73 69 |ig_handl|e(s).Xsi|
|00006110| 67 5f 6e 75 6d 20 73 3b | 0a 58 7b 0a 58 20 69 66 |g_num s;|.X{.X if|
|00006120| 20 28 71 75 6f 5b 73 5d | 29 0a 58 20 20 20 68 61 | (quo[s]|).X ha|
|00006130| 6e 5b 73 5d 28 29 3b 0a | 58 20 28 76 6f 69 64 29 |n[s]();.|X (void)|
|00006140| 20 73 69 67 6e 61 6c 76 | 28 73 2c 68 61 6e 5b 73 | signalv|(s,han[s|
|00006150| 5d 29 3b 0a 58 20 71 75 | 6f 5b 73 5d 20 3d 20 30 |]);.X qu|o[s] = 0|
|00006160| 3b 0a 58 7d 0a 58 0a 58 | 76 6f 69 64 20 73 69 67 |;.X}.X.X|void sig|
|00006170| 5f 69 67 6e 6f 72 65 28 | 73 29 0a 58 73 69 67 5f |_ignore(|s).Xsig_|
|00006180| 6e 75 6d 20 73 3b 0a 58 | 7b 0a 58 20 28 76 6f 69 |num s;.X|{.X (voi|
|00006190| 64 29 20 73 69 67 6e 61 | 6c 76 28 73 2c 53 49 47 |d) signa|lv(s,SIG|
|000061a0| 5f 49 47 4e 29 3b 0a 58 | 7d 0a 58 0a 58 76 6f 69 |_IGN);.X|}.X.Xvoi|
|000061b0| 64 20 73 69 67 5f 64 65 | 66 61 75 6c 74 28 73 29 |d sig_de|fault(s)|
|000061c0| 0a 58 73 69 67 5f 6e 75 | 6d 20 73 3b 0a 58 7b 0a |.Xsig_nu|m s;.X{.|
|000061d0| 58 20 28 76 6f 69 64 29 | 20 73 69 67 6e 61 6c 76 |X (void)| signalv|
|000061e0| 28 73 2c 53 49 47 5f 44 | 46 4c 29 3b 0a 58 7d 0a |(s,SIG_D|FL);.X}.|
|000061f0| 58 0a 58 76 6f 69 64 20 | 73 69 67 5f 73 65 74 68 |X.Xvoid |sig_seth|
|00006200| 61 6e 64 6c 65 72 28 73 | 2c 68 29 0a 58 73 69 67 |andler(s|,h).Xsig|
|00006210| 5f 6e 75 6d 20 73 3b 0a | 58 73 69 67 5f 68 61 6e |_num s;.|Xsig_han|
|00006220| 64 6c 65 72 20 68 3b 0a | 58 7b 0a 58 20 68 61 6e |dler h;.|X{.X han|
|00006230| 64 6c 65 72 5b 73 5d 20 | 3d 20 68 3b 0a 58 7d 0a |dler[s] |= h;.X}.|
|00006240| 58 0a 58 23 69 66 64 65 | 66 20 53 49 47 49 4e 54 |X.X#ifde|f SIGINT|
|00006250| 45 52 52 55 50 54 0a 58 | 76 6f 69 64 20 73 69 67 |ERRUPT.X|void sig|
|00006260| 5f 69 6e 74 65 72 72 75 | 70 74 28 29 0a 58 7b 0a |_interru|pt().X{.|
|00006270| 58 20 72 65 67 69 73 74 | 65 72 20 73 69 67 5f 6e |X regist|er sig_n|
|00006280| 75 6d 20 73 3b 0a 58 0a | 58 20 66 6f 72 20 28 73 |um s;.X.|X for (s|
|00006290| 20 3d 20 30 3b 73 20 3c | 20 53 49 47 4e 55 4d 3b | = 0;s <| SIGNUM;|
|000062a0| 73 2b 2b 29 0a 58 20 20 | 20 28 76 6f 69 64 29 20 |s++).X | (void) |
|000062b0| 73 69 67 69 6e 74 65 72 | 72 75 70 74 28 73 2c 31 |siginter|rupt(s,1|
|000062c0| 29 3b 0a 58 7d 0a 58 23 | 65 6e 64 69 66 0a 58 0a |);.X}.X#|endif.X.|
|000062d0| 58 76 6f 69 64 20 73 69 | 67 5f 73 74 61 72 74 72 |Xvoid si|g_startr|
|000062e0| 69 6e 67 28 29 0a 58 7b | 0a 58 20 73 74 72 75 63 |ing().X{|.X struc|
|000062f0| 74 20 69 74 69 6d 65 72 | 76 61 6c 20 69 74 3b 0a |t itimer|val it;.|
|00006300| 58 0a 58 20 69 74 2e 69 | 74 5f 76 61 6c 75 65 2e |X.X it.i|t_value.|
|00006310| 74 76 5f 73 65 63 20 3d | 20 69 74 2e 69 74 5f 69 |tv_sec =| it.it_i|
|00006320| 6e 74 65 72 76 61 6c 2e | 74 76 5f 73 65 63 20 3d |nterval.|tv_sec =|
|00006330| 20 30 3b 0a 58 20 69 74 | 2e 69 74 5f 76 61 6c 75 | 0;.X it|.it_valu|
|00006340| 65 2e 74 76 5f 75 73 65 | 63 20 3d 20 69 74 2e 69 |e.tv_use|c = it.i|
|00006350| 74 5f 69 6e 74 65 72 76 | 61 6c 2e 74 76 5f 75 73 |t_interv|al.tv_us|
|00006360| 65 63 20 3d 20 31 30 30 | 30 30 3b 0a 58 20 28 76 |ec = 100|00;.X (v|
|00006370| 6f 69 64 29 20 73 65 74 | 69 74 69 6d 65 72 28 49 |oid) set|itimer(I|
|00006380| 54 49 4d 45 52 5f 52 45 | 41 4c 2c 26 69 74 2c 28 |TIMER_RE|AL,&it,(|
|00006390| 73 74 72 75 63 74 20 69 | 74 69 6d 65 72 76 61 6c |struct i|timerval|
|000063a0| 20 2a 29 20 30 29 3b 0a | 58 7d 0a 58 0a 58 76 6f | *) 0);.|X}.X.Xvo|
|000063b0| 69 64 20 73 69 67 5f 73 | 74 6f 70 72 69 6e 67 28 |id sig_s|topring(|
|000063c0| 29 0a 58 7b 0a 58 20 73 | 74 72 75 63 74 20 69 74 |).X{.X s|truct it|
|000063d0| 69 6d 65 72 76 61 6c 20 | 69 74 3b 0a 58 0a 58 20 |imerval |it;.X.X |
|000063e0| 69 74 2e 69 74 5f 76 61 | 6c 75 65 2e 74 76 5f 73 |it.it_va|lue.tv_s|
|000063f0| 65 63 20 3d 20 69 74 2e | 69 74 5f 69 6e 74 65 72 |ec = it.|it_inter|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.