home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume23 / pty / part04 < prev    next >
SHell self-extracting ARchive  |  1991-01-08  |  54.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6a 2e | 63 63 2e 70 75 72 64 75 |Path: j.|cc.purdu|
|00000010| 65 2e 65 64 75 21 6d 65 | 6e 74 6f 72 2e 63 63 2e |e.edu!me|ntor.cc.|
|00000020| 70 75 72 64 75 65 2e 65 | 64 75 21 6e 6f 6f 73 65 |purdue.e|du!noose|
|00000030| 2e 65 63 6e 2e 70 75 72 | 64 75 65 2e 65 64 75 21 |.ecn.pur|due.edu!|
|00000040| 73 61 6d 73 75 6e 67 21 | 75 75 6e 65 74 21 70 61 |samsung!|uunet!pa|
|00000050| 70 61 79 61 2e 62 62 6e | 2e 63 6f 6d 21 72 73 61 |paya.bbn|.com!rsa|
|00000060| 6c 7a 0a 46 72 6f 6d 3a | 20 72 73 61 6c 7a 40 62 |lz.From:| rsalz@b|
|00000070| 62 6e 2e 63 6f 6d 20 28 | 52 69 63 68 20 53 61 6c |bn.com (|Rich Sal|
|00000080| 7a 29 0a 4e 65 77 73 67 | 72 6f 75 70 73 3a 20 63 |z).Newsg|roups: c|
|00000090| 6f 6d 70 2e 73 6f 75 72 | 63 65 73 2e 75 6e 69 78 |omp.sour|ces.unix|
|000000a0| 0a 53 75 62 6a 65 63 74 | 3a 20 76 32 33 69 30 33 |.Subject|: v23i03|
|000000b0| 34 3a 20 20 52 75 6e 20 | 61 20 70 72 6f 67 72 61 |4: Run |a progra|
|000000c0| 6d 20 75 6e 64 65 72 20 | 61 20 70 74 79 20 73 65 |m under |a pty se|
|000000d0| 73 73 69 6f 6e 2c 20 50 | 61 72 74 30 34 2f 30 36 |ssion, P|art04/06|
|000000e0| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 32 38 |.Message|-ID: <28|
|000000f0| 38 34 40 6c 69 74 63 68 | 69 2e 62 62 6e 2e 63 6f |84@litch|i.bbn.co|
|00000100| 6d 3e 0a 44 61 74 65 3a | 20 31 30 20 4f 63 74 20 |m>.Date:| 10 Oct |
|00000110| 39 30 20 31 34 3a 31 36 | 3a 35 34 20 47 4d 54 0a |90 14:16|:54 GMT.|
|00000120| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 42 42 |Organiza|tion: BB|
|00000130| 4e 20 53 79 73 74 65 6d | 73 20 61 6e 64 20 54 65 |N System|s and Te|
|00000140| 63 68 6e 6f 6c 6f 67 69 | 65 73 2c 20 43 61 6d 62 |chnologi|es, Camb|
|00000150| 72 69 64 67 65 20 4d 41 | 0a 4c 69 6e 65 73 3a 20 |ridge MA|.Lines: |
|00000160| 31 38 36 38 0a 41 70 70 | 72 6f 76 65 64 3a 20 72 |1868.App|roved: r|
|00000170| 73 61 6c 7a 40 75 75 6e | 65 74 2e 55 55 2e 4e 45 |salz@uun|et.UU.NE|
|00000180| 54 0a 58 2d 43 68 65 63 | 6b 73 75 6d 2d 53 6e 65 |T.X-Chec|ksum-Sne|
|00000190| 66 72 75 3a 20 63 63 65 | 65 64 61 35 62 20 65 32 |fru: cce|eda5b e2|
|000001a0| 31 33 64 66 62 32 20 64 | 39 64 62 32 31 34 63 20 |13dfb2 d|9db214c |
|000001b0| 31 62 38 34 36 62 61 62 | 0a 0a 53 75 62 6d 69 74 |1b846bab|..Submit|
|000001c0| 74 65 64 2d 62 79 3a 20 | 44 61 6e 20 42 65 72 6e |ted-by: |Dan Bern|
|000001d0| 73 74 65 69 6e 20 3c 62 | 72 6e 73 74 6e 64 40 6b |stein <b|rnstnd@k|
|000001e0| 72 61 6d 64 65 6e 2e 61 | 63 66 2e 6e 79 75 2e 65 |ramden.a|cf.nyu.e|
|000001f0| 64 75 3e 0a 50 6f 73 74 | 69 6e 67 2d 6e 75 6d 62 |du>.Post|ing-numb|
|00000200| 65 72 3a 20 56 6f 6c 75 | 6d 65 20 32 33 2c 20 49 |er: Volu|me 23, I|
|00000210| 73 73 75 65 20 33 34 0a | 41 72 63 68 69 76 65 2d |ssue 34.|Archive-|
|00000220| 6e 61 6d 65 3a 20 70 74 | 79 2f 70 61 72 74 30 34 |name: pt|y/part04|
|00000230| 0a 0a 23 21 20 2f 62 69 | 6e 2f 73 68 0a 23 20 54 |..#! /bi|n/sh.# T|
|00000240| 68 69 73 20 69 73 20 61 | 20 73 68 65 6c 6c 20 61 |his is a| shell a|
|00000250| 72 63 68 69 76 65 2e 20 | 20 52 65 6d 6f 76 65 20 |rchive. | Remove |
|00000260| 61 6e 79 74 68 69 6e 67 | 20 62 65 66 6f 72 65 20 |anything| before |
|00000270| 74 68 69 73 20 6c 69 6e | 65 2c 20 74 68 65 6e 20 |this lin|e, then |
|00000280| 66 65 65 64 20 69 74 0a | 23 20 69 6e 74 6f 20 61 |feed it.|# into a|
|00000290| 20 73 68 65 6c 6c 20 76 | 69 61 20 22 73 68 20 66 | shell v|ia "sh f|
|000002a0| 69 6c 65 22 20 6f 72 20 | 73 69 6d 69 6c 61 72 2e |ile" or |similar.|
|000002b0| 20 20 54 6f 20 6f 76 65 | 72 77 72 69 74 65 20 65 | To ove|rwrite e|
|000002c0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 73 2c 0a 23 |xisting |files,.#|
|000002d0| 20 74 79 70 65 20 22 73 | 68 20 66 69 6c 65 20 2d | type "s|h file -|
|000002e0| 63 22 2e 0a 23 20 54 68 | 65 20 74 6f 6f 6c 20 74 |c"..# Th|e tool t|
|000002f0| 68 61 74 20 67 65 6e 65 | 72 61 74 65 64 20 74 68 |hat gene|rated th|
|00000300| 69 73 20 61 70 70 65 61 | 72 65 64 20 69 6e 20 74 |is appea|red in t|
|00000310| 68 65 20 63 6f 6d 70 2e | 73 6f 75 72 63 65 73 2e |he comp.|sources.|
|00000320| 75 6e 69 78 20 6e 65 77 | 73 67 72 6f 75 70 3b 0a |unix new|sgroup;.|
|00000330| 23 20 73 65 6e 64 20 6d | 61 69 6c 20 74 6f 20 63 |# send m|ail to c|
|00000340| 6f 6d 70 2d 73 6f 75 72 | 63 65 73 2d 75 6e 69 78 |omp-sour|ces-unix|
|00000350| 40 75 75 6e 65 74 2e 75 | 75 2e 6e 65 74 20 69 66 |@uunet.u|u.net if|
|00000360| 20 79 6f 75 20 77 61 6e | 74 20 74 68 61 74 20 74 | you wan|t that t|
|00000370| 6f 6f 6c 2e 0a 23 20 43 | 6f 6e 74 65 6e 74 73 3a |ool..# C|ontents:|
|00000380| 20 20 43 4f 50 59 52 49 | 47 48 54 20 51 55 45 53 | COPYRI|GHT QUES|
|00000390| 54 49 4f 4e 53 20 54 45 | 53 54 53 20 70 61 74 63 |TIONS TE|STS patc|
|000003a0| 68 2f 4d 61 6b 65 66 69 | 6c 65 20 70 61 74 63 68 |h/Makefi|le patch|
|000003b0| 2f 52 45 41 44 4d 45 0a | 23 20 20 20 73 69 67 2e |/README.|# sig.|
|000003c0| 63 20 73 6c 61 76 65 2e | 63 20 74 65 78 74 73 2e |c slave.|c texts.|
|000003d0| 63 20 75 74 69 6c 2f 62 | 69 66 66 2e 63 20 75 74 |c util/b|iff.c ut|
|000003e0| 69 6c 2f 73 65 73 73 6c | 69 73 74 2e 63 20 75 74 |il/sessl|ist.c ut|
|000003f0| 69 6c 2f 73 65 73 73 75 | 73 65 72 2e 31 0a 23 20 |il/sessu|ser.1.# |
|00000400| 20 20 75 74 69 6c 2f 73 | 65 73 73 75 73 65 72 2e | util/s|essuser.|
|00000410| 63 20 75 74 69 6c 2f 73 | 65 73 73 75 74 69 6c 2e |c util/s|essutil.|
|00000420| 63 20 75 74 69 6c 2f 77 | 72 69 74 65 2e 63 20 75 |c util/w|rite.c u|
|00000430| 74 69 6c 2f 78 73 65 73 | 73 75 74 69 6c 2e 63 0a |til/xses|sutil.c.|
|00000440| 23 20 57 72 61 70 70 65 | 64 20 62 79 20 72 73 61 |# Wrappe|d by rsa|
|00000450| 6c 7a 40 6c 69 74 63 68 | 69 2e 62 62 6e 2e 63 6f |lz@litch|i.bbn.co|
|00000460| 6d 20 6f 6e 20 57 65 64 | 20 4f 63 74 20 31 30 20 |m on Wed| Oct 10 |
|00000470| 31 30 3a 31 31 3a 33 39 | 20 31 39 39 30 0a 50 41 |10:11:39| 1990.PA|
|00000480| 54 48 3d 2f 62 69 6e 3a | 2f 75 73 72 2f 62 69 6e |TH=/bin:|/usr/bin|
|00000490| 3a 2f 75 73 72 2f 75 63 | 62 20 3b 20 65 78 70 6f |:/usr/uc|b ; expo|
|000004a0| 72 74 20 50 41 54 48 0a | 65 63 68 6f 20 49 66 20 |rt PATH.|echo If |
|000004b0| 74 68 69 73 20 61 72 63 | 68 69 76 65 20 69 73 20 |this arc|hive is |
|000004c0| 63 6f 6d 70 6c 65 74 65 | 2c 20 79 6f 75 20 77 69 |complete|, you wi|
|000004d0| 6c 6c 20 73 65 65 20 74 | 68 65 20 66 6f 6c 6c 6f |ll see t|he follo|
|000004e0| 77 69 6e 67 20 6d 65 73 | 73 61 67 65 3a 0a 65 63 |wing mes|sage:.ec|
|000004f0| 68 6f 20 27 20 20 20 20 | 20 20 20 20 20 20 22 73 |ho ' | "s|
|00000500| 68 61 72 3a 20 45 6e 64 | 20 6f 66 20 61 72 63 68 |har: End| of arch|
|00000510| 69 76 65 20 34 20 28 6f | 66 20 36 29 2e 22 27 0a |ive 4 (o|f 6)."'.|
|00000520| 69 66 20 74 65 73 74 20 | 2d 66 20 27 43 4f 50 59 |if test |-f 'COPY|
|00000530| 52 49 47 48 54 27 20 2d | 61 20 22 24 7b 31 7d 22 |RIGHT' -|a "${1}"|
|00000540| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00000550| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00000560| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00000570| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|00000580| 43 4f 50 59 52 49 47 48 | 54 27 5c 22 0a 65 6c 73 |COPYRIGH|T'\".els|
|00000590| 65 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 45 |e. echo| shar: E|
|000005a0| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 43 4f 50 |xtractin|g \"'COP|
|000005b0| 59 52 49 47 48 54 27 5c | 22 20 5c 28 32 31 32 39 |YRIGHT'\|" \(2129|
|000005c0| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 20 20 | charact|ers\). |
|000005d0| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 43 |sed "s/^|X//" >'C|
|000005e0| 4f 50 59 52 49 47 48 54 | 27 20 3c 3c 27 45 4e 44 |OPYRIGHT|' <<'END|
|000005f0| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 70 74 79 20 76 |_OF_FILE|'.Xpty v|
|00000600| 65 72 73 69 6f 6e 20 33 | 2e 30 30 31 2c 20 41 75 |ersion 3|.001, Au|
|00000610| 67 75 73 74 20 32 31 2c | 20 31 39 39 30 2e 0a 58 |gust 21,| 1990..X|
|00000620| 43 6f 70 79 72 69 67 68 | 74 20 28 63 29 20 31 39 |Copyrigh|t (c) 19|
|00000630| 39 30 2c 20 44 61 6e 69 | 65 6c 20 4a 2e 20 42 65 |90, Dani|el J. Be|
|00000640| 72 6e 73 74 65 69 6e 2e | 0a 58 41 6c 6c 20 72 69 |rnstein.|.XAll ri|
|00000650| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 0a 58 |ghts res|erved..X|
|00000660| 0a 58 49 20 77 61 6e 74 | 20 74 68 69 73 20 70 72 |.XI want| this pr|
|00000670| 6f 67 72 61 6d 20 74 6f | 20 62 65 20 64 69 73 74 |ogram to| be dist|
|00000680| 72 69 62 75 74 65 64 20 | 66 72 65 65 6c 79 20 69 |ributed |freely i|
|00000690| 6e 20 6f 72 69 67 69 6e | 61 6c 20 66 6f 72 6d 2e |n origin|al form.|
|000006a0| 0a 58 0a 58 4f 6e 63 65 | 20 79 6f 75 27 76 65 20 |.X.XOnce| you've |
|000006b0| 72 65 63 65 69 76 65 64 | 20 61 20 6c 65 67 61 6c |received| a legal|
|000006c0| 20 63 6f 70 79 20 6f 66 | 20 74 68 69 73 20 70 72 | copy of| this pr|
|000006d0| 6f 67 72 61 6d 2c 20 79 | 6f 75 20 63 61 6e 20 75 |ogram, y|ou can u|
|000006e0| 73 65 20 69 74 2e 0a 58 | 46 6f 72 65 76 65 72 2e |se it..X|Forever.|
|000006f0| 20 4e 6f 62 6f 64 79 20 | 63 61 6e 20 74 61 6b 65 | Nobody |can take|
|00000700| 20 74 68 61 74 20 72 69 | 67 68 74 20 61 77 61 79 | that ri|ght away|
|00000710| 20 66 72 6f 6d 20 79 6f | 75 2e 20 59 6f 75 20 63 | from yo|u. You c|
|00000720| 61 6e 20 6d 61 6b 65 20 | 63 68 61 6e 67 65 73 0a |an make |changes.|
|00000730| 58 61 6e 64 20 62 61 63 | 6b 75 70 20 63 6f 70 69 |Xand bac|kup copi|
|00000740| 65 73 20 66 6f 72 20 79 | 6f 75 72 20 75 73 65 20 |es for y|our use |
|00000750| 28 6f 72 2c 20 69 66 20 | 79 6f 75 27 72 65 20 61 |(or, if |you're a|
|00000760| 6e 20 6f 72 67 61 6e 69 | 7a 61 74 69 6f 6e 2c 20 |n organi|zation, |
|00000770| 66 6f 72 20 74 68 65 0a | 58 75 73 65 20 6f 66 20 |for the.|Xuse of |
|00000780| 65 76 65 72 79 6f 6e 65 | 20 69 6e 20 74 68 65 20 |everyone| in the |
|00000790| 6f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 29 2e 20 59 |organiza|tion). Y|
|000007a0| 6f 75 20 63 61 6e 20 64 | 69 73 74 72 69 62 75 74 |ou can d|istribut|
|000007b0| 65 20 70 61 74 63 68 65 | 73 20 28 74 68 6f 75 67 |e patche|s (thoug|
|000007c0| 68 0a 58 6e 6f 74 20 70 | 61 74 63 68 65 64 20 76 |h.Xnot p|atched v|
|000007d0| 65 72 73 69 6f 6e 73 29 | 2e 20 59 6f 75 27 64 20 |ersions)|. You'd |
|000007e0| 68 61 76 65 20 61 6c 6c | 20 74 68 65 73 65 20 72 |have all| these r|
|000007f0| 69 67 68 74 73 20 65 76 | 65 6e 20 69 66 20 49 20 |ights ev|en if I |
|00000800| 64 69 64 6e 27 74 20 74 | 65 6c 6c 0a 58 79 6f 75 |didn't t|ell.Xyou|
|00000810| 20 61 62 6f 75 74 20 74 | 68 65 6d 2e 0a 58 0a 58 | about t|hem..X.X|
|00000820| 43 6f 70 79 72 69 67 68 | 74 20 6c 61 77 20 67 69 |Copyrigh|t law gi|
|00000830| 76 65 73 20 61 6e 20 61 | 75 74 68 6f 72 20 74 68 |ves an a|uthor th|
|00000840| 65 20 65 78 63 6c 75 73 | 69 76 65 20 72 69 67 68 |e exclus|ive righ|
|00000850| 74 20 74 6f 20 63 6f 70 | 79 20 61 6e 64 20 64 69 |t to cop|y and di|
|00000860| 73 74 72 69 62 75 74 65 | 20 68 69 73 0a 58 77 6f |stribute| his.Xwo|
|00000870| 72 6b 73 2e 20 53 6f 20 | 74 68 61 74 20 79 6f 75 |rks. So |that you|
|00000880| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 74 6f 20 77 | don't h|ave to w|
|00000890| 6f 72 72 79 20 61 62 6f | 75 74 20 74 68 65 73 65 |orry abo|ut these|
|000008a0| 20 6c 65 67 61 6c 69 74 | 69 65 73 2c 20 49 20 67 | legalit|ies, I g|
|000008b0| 72 61 6e 74 20 79 6f 75 | 20 74 68 65 0a 58 72 69 |rant you| the.Xri|
|000008c0| 67 68 74 20 74 6f 20 6d | 61 6b 65 20 61 6e 64 20 |ght to m|ake and |
|000008d0| 64 69 73 74 72 69 62 75 | 74 65 20 65 78 61 63 74 |distribu|te exact|
|000008e0| 20 61 6e 64 20 63 6f 6d | 70 6c 65 74 65 20 63 6f | and com|plete co|
|000008f0| 70 69 65 73 20 6f 66 20 | 74 68 69 73 20 70 72 6f |pies of |this pro|
|00000900| 67 72 61 6d 2e 0a 58 0a | 58 4f 6e 20 74 68 65 20 |gram..X.|XOn the |
|00000910| 6f 74 68 65 72 20 68 61 | 6e 64 2c 20 49 20 64 6f |other ha|nd, I do|
|00000920| 6e 27 74 20 77 61 6e 74 | 20 74 68 69 73 20 70 72 |n't want| this pr|
|00000930| 6f 67 72 61 6d 20 73 6f | 6c 64 20 77 69 74 68 6f |ogram so|ld witho|
|00000940| 75 74 20 6d 79 20 70 65 | 72 6d 69 73 73 69 6f 6e |ut my pe|rmission|
|00000950| 2e 0a 58 55 6e 6c 65 73 | 73 20 49 20 67 69 76 65 |..XUnles|s I give|
|00000960| 20 79 6f 75 20 70 65 72 | 6d 69 73 73 69 6f 6e 2c | you per|mission,|
|00000970| 20 79 6f 75 20 6d 61 79 | 20 6e 6f 74 20 63 68 61 | you may| not cha|
|00000980| 72 67 65 20 66 6f 72 20 | 63 6f 70 69 65 73 2e 20 |rge for |copies. |
|00000990| 59 6f 75 20 6d 61 79 20 | 63 68 61 72 67 65 20 66 |You may |charge f|
|000009a0| 6f 72 0a 58 64 69 73 74 | 72 69 62 75 74 69 6f 6e |or.Xdist|ribution|
|000009b0| 2d 2d 2d 62 75 74 20 6f | 6e 6c 79 20 69 66 20 79 |---but o|nly if y|
|000009c0| 6f 75 20 66 69 72 73 74 | 20 77 61 72 6e 20 74 68 |ou first| warn th|
|000009d0| 65 20 72 65 63 69 70 69 | 65 6e 74 20 74 68 61 74 |e recipi|ent that|
|000009e0| 20 74 68 65 20 63 6f 64 | 65 20 69 73 20 66 72 65 | the cod|e is fre|
|000009f0| 65 2c 0a 58 61 6e 64 20 | 74 65 6c 6c 20 68 69 6d |e,.Xand |tell him|
|00000a00| 20 77 68 65 72 65 20 79 | 6f 75 20 67 6f 74 20 69 | where y|ou got i|
|00000a10| 74 20 66 72 6f 6d 2e 0a | 58 0a 58 49 20 64 6f 6e |t from..|X.XI don|
|00000a20| 27 74 20 77 61 6e 74 20 | 74 68 69 73 20 70 72 6f |'t want |this pro|
|00000a30| 67 72 61 6d 20 64 69 73 | 74 72 69 62 75 74 65 64 |gram dis|tributed|
|00000a40| 20 77 69 74 68 6f 75 74 | 20 6d 79 20 6e 61 6d 65 | without| my name|
|00000a50| 20 6f 6e 20 69 74 2e 20 | 49 20 61 6c 73 6f 20 64 | on it. |I also d|
|00000a60| 6f 6e 27 74 0a 58 77 61 | 6e 74 20 6c 6f 74 73 20 |on't.Xwa|nt lots |
|00000a70| 6f 66 20 64 69 66 66 65 | 72 65 6e 74 20 76 65 72 |of diffe|rent ver|
|00000a80| 73 69 6f 6e 73 20 72 75 | 6e 6e 69 6e 67 20 61 72 |sions ru|nning ar|
|00000a90| 6f 75 6e 64 2c 20 73 6f | 20 75 6e 6c 65 73 73 20 |ound, so| unless |
|00000aa0| 49 20 67 69 76 65 20 79 | 6f 75 20 70 65 72 6d 69 |I give y|ou permi|
|00000ab0| 73 73 69 6f 6e 0a 58 79 | 6f 75 20 63 61 6e 27 74 |ssion.Xy|ou can't|
|00000ac0| 20 73 65 6e 64 20 6f 75 | 74 20 61 20 6d 6f 64 69 | send ou|t a modi|
|00000ad0| 66 69 65 64 20 76 65 72 | 73 69 6f 6e 2e 20 49 74 |fied ver|sion. It|
|00000ae0| 27 73 20 70 65 72 66 65 | 63 74 6c 79 20 61 6c 6c |'s perfe|ctly all|
|00000af0| 20 72 69 67 68 74 20 74 | 6f 20 73 65 6e 64 20 6f | right t|o send o|
|00000b00| 74 68 65 72 0a 58 70 65 | 6f 70 6c 65 20 61 20 64 |ther.Xpe|ople a d|
|00000b10| 65 73 63 72 69 70 74 69 | 6f 6e 20 6f 66 20 68 6f |escripti|on of ho|
|00000b20| 77 20 74 6f 20 6d 61 6b | 65 20 79 6f 75 72 20 63 |w to mak|e your c|
|00000b30| 68 61 6e 67 65 73 20 28 | 69 2e 65 2e 2c 20 61 20 |hanges (|i.e., a |
|00000b40| 70 61 74 63 68 29 2c 20 | 62 65 63 61 75 73 65 20 |patch), |because |
|00000b50| 74 68 65 6e 0a 58 65 61 | 63 68 20 72 65 63 69 70 |then.Xea|ch recip|
|00000b60| 69 65 6e 74 20 6b 6e 6f | 77 73 20 66 69 72 73 74 |ient kno|ws first|
|00000b70| 68 61 6e 64 20 77 68 61 | 74 20 70 61 74 63 68 65 |hand wha|t patche|
|00000b80| 73 20 68 65 27 73 20 69 | 6e 73 74 61 6c 6c 65 64 |s he's i|nstalled|
|00000b90| 2c 20 61 6e 64 20 49 20 | 77 6f 6e 27 74 20 67 6f |, and I |won't go|
|00000ba0| 0a 58 63 68 61 73 69 6e | 67 20 67 68 6f 73 74 73 |.Xchasin|g ghosts|
|00000bb0| 2e 20 28 41 6e 20 61 75 | 74 68 6f 72 20 68 61 73 |. (An au|thor has|
|00000bc0| 20 6e 6f 20 72 69 67 68 | 74 20 74 6f 20 63 6f 6e | no righ|t to con|
|00000bd0| 74 72 6f 6c 20 70 61 74 | 63 68 65 73 20 69 6e 20 |trol pat|ches in |
|00000be0| 61 6e 79 20 63 61 73 65 | 2e 29 0a 58 0a 58 49 66 |any case|.).X.XIf|
|00000bf0| 20 79 6f 75 20 72 75 6e | 20 61 6e 20 61 72 63 68 | you run| an arch|
|00000c00| 69 76 65 20 73 69 74 65 | 3a 20 57 68 65 6e 20 79 |ive site|: When y|
|00000c10| 6f 75 20 72 65 63 65 69 | 76 65 20 61 20 70 61 74 |ou recei|ve a pat|
|00000c20| 63 68 20 73 75 70 70 6f | 73 65 64 6c 79 20 66 72 |ch suppo|sedly fr|
|00000c30| 6f 6d 20 6d 65 2c 20 64 | 6f 20 79 6f 75 0a 58 61 |om me, d|o you.Xa|
|00000c40| 70 70 6c 79 20 69 74 20 | 74 6f 20 74 68 65 20 6f |pply it |to the o|
|00000c50| 72 69 67 69 6e 61 6c 20 | 70 61 63 6b 61 67 65 20 |riginal |package |
|00000c60| 61 6e 64 20 72 65 70 61 | 63 6b 61 67 65 20 69 74 |and repa|ckage it|
|00000c70| 3f 20 49 20 65 6e 63 6f | 75 72 61 67 65 20 79 6f |? I enco|urage yo|
|00000c80| 75 20 74 6f 20 63 68 61 | 6e 67 65 0a 58 79 6f 75 |u to cha|nge.Xyou|
|00000c90| 72 20 70 6f 6c 69 63 79 | 2c 20 69 66 20 66 6f 72 |r policy|, if for|
|00000ca0| 20 6e 6f 20 6f 74 68 65 | 72 20 72 65 61 73 6f 6e | no othe|r reason|
|00000cb0| 20 74 68 61 6e 20 74 6f | 20 67 69 76 65 20 72 65 | than to| give re|
|00000cc0| 63 69 70 69 65 6e 74 73 | 20 61 20 66 61 6c 6c 62 |cipients| a fallb|
|00000cd0| 61 63 6b 20 69 6e 20 63 | 61 73 65 0a 58 6f 66 20 |ack in c|ase.Xof |
|00000ce0| 62 75 67 67 79 20 70 61 | 74 63 68 65 73 2e 20 49 |buggy pa|tches. I|
|00000cf0| 66 20 79 6f 75 27 72 65 | 20 72 65 61 6c 6c 79 20 |f you're| really |
|00000d00| 73 65 74 20 6f 6e 20 74 | 68 69 73 2c 20 68 6f 77 |set on t|his, how|
|00000d10| 20 61 62 6f 75 74 20 69 | 6e 63 6c 75 64 69 6e 67 | about i|ncluding|
|00000d20| 20 74 68 65 20 70 61 74 | 63 68 65 73 0a 58 61 73 | the pat|ches.Xas|
|00000d30| 20 73 65 70 61 72 61 74 | 65 2c 20 75 6e 61 70 70 | separat|e, unapp|
|00000d40| 6c 69 65 64 20 50 41 54 | 43 48 6e 6e 20 66 69 6c |lied PAT|CHnn fil|
|00000d50| 65 73 20 69 6e 73 69 64 | 65 20 74 68 65 20 70 61 |es insid|e the pa|
|00000d60| 63 6b 61 67 65 3f 20 54 | 68 61 74 27 73 20 66 69 |ckage? T|hat's fi|
|00000d70| 6e 65 20 62 79 20 6d 65 | 2e 0a 58 0a 58 49 66 20 |ne by me|..X.XIf |
|00000d80| 79 6f 75 20 68 61 76 65 | 20 71 75 65 73 74 69 6f |you have| questio|
|00000d90| 6e 73 20 61 62 6f 75 74 | 20 74 68 69 73 20 70 72 |ns about| this pr|
|00000da0| 6f 67 72 61 6d 20 6f 72 | 20 61 62 6f 75 74 20 74 |ogram or| about t|
|00000db0| 68 69 73 20 6e 6f 74 69 | 63 65 2c 20 6f 72 20 69 |his noti|ce, or i|
|00000dc0| 66 20 79 6f 75 0a 58 77 | 6f 75 6c 64 20 6c 69 6b |f you.Xw|ould lik|
|00000dd0| 65 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 72 69 67 |e additi|onal rig|
|00000de0| 68 74 73 20 62 65 79 6f | 6e 64 20 74 68 6f 73 65 |hts beyo|nd those|
|00000df0| 20 67 72 61 6e 74 65 64 | 20 61 62 6f 76 65 2c 20 | granted| above, |
|00000e00| 6f 72 20 69 66 20 79 6f | 75 20 68 61 76 65 0a 58 |or if yo|u have.X|
|00000e10| 61 20 70 61 74 63 68 20 | 74 68 61 74 20 79 6f 75 |a patch |that you|
|00000e20| 20 64 6f 6e 27 74 20 6d | 69 6e 64 20 73 68 61 72 | don't m|ind shar|
|00000e30| 69 6e 67 2c 20 70 6c 65 | 61 73 65 20 63 6f 6e 74 |ing, ple|ase cont|
|00000e40| 61 63 74 20 6d 65 20 6f | 6e 20 74 68 65 20 49 6e |act me o|n the In|
|00000e50| 74 65 72 6e 65 74 0a 58 | 61 74 20 62 72 6e 73 74 |ternet.X|at brnst|
|00000e60| 6e 64 40 61 63 66 31 30 | 2e 6e 79 75 2e 65 64 75 |nd@acf10|.nyu.edu|
|00000e70| 2e 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 20 20 |..END_OF|_FILE. |
|00000e80| 69 66 20 74 65 73 74 20 | 32 31 32 39 20 2d 6e 65 |if test |2129 -ne|
|00000e90| 20 60 77 63 20 2d 63 20 | 3c 27 43 4f 50 59 52 49 | `wc -c |<'COPYRI|
|00000ea0| 47 48 54 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |GHT'`; t|hen. |
|00000eb0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 43 4f |echo sha|r: \"'CO|
|00000ec0| 50 59 52 49 47 48 54 27 | 5c 22 20 75 6e 70 61 63 |PYRIGHT'|\" unpac|
|00000ed0| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00000ee0| 69 7a 65 21 0a 20 20 66 | 69 0a 20 20 23 20 65 6e |ize!. f|i. # en|
|00000ef0| 64 20 6f 66 20 27 43 4f | 50 59 52 49 47 48 54 27 |d of 'CO|PYRIGHT'|
|00000f00| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00000f10| 51 55 45 53 54 49 4f 4e | 53 27 20 2d 61 20 22 24 |QUESTION|S' -a "$|
|00000f20| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00000f30| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00000f40| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00000f50| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00000f60| 20 5c 22 27 51 55 45 53 | 54 49 4f 4e 53 27 5c 22 | \"'QUES|TIONS'\"|
|00000f70| 0a 65 6c 73 65 0a 20 20 | 65 63 68 6f 20 73 68 61 |.else. |echo sha|
|00000f80| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00000f90| 27 51 55 45 53 54 49 4f | 4e 53 27 5c 22 20 5c 28 |'QUESTIO|NS'\" \(|
|00000fa0| 34 32 30 32 20 63 68 61 | 72 61 63 74 65 72 73 5c |4202 cha|racters\|
|00000fb0| 29 0a 20 20 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |). sed |"s/^X//"|
|00000fc0| 20 3e 27 51 55 45 53 54 | 49 4f 4e 53 27 20 3c 3c | >'QUEST|IONS' <<|
|00000fd0| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 49 |'END_OF_|FILE'.XI|
|00000fe0| 20 73 65 6c 65 63 74 65 | 64 20 74 68 65 20 71 75 | selecte|d the qu|
|00000ff0| 65 73 74 69 6f 6e 73 20 | 62 65 6c 6f 77 20 66 72 |estions |below fr|
|00001000| 6f 6d 20 61 72 74 69 63 | 6c 65 73 20 70 6f 73 74 |om artic|les post|
|00001010| 65 64 20 74 6f 20 74 68 | 65 20 55 53 45 4e 45 54 |ed to th|e USENET|
|00001020| 0a 58 6e 65 77 73 67 72 | 6f 75 70 20 63 6f 6d 70 |.Xnewsgr|oup comp|
|00001030| 2e 75 6e 69 78 2e 71 75 | 65 73 74 69 6f 6e 73 2e |.unix.qu|estions.|
|00001040| 20 41 6c 6c 20 74 68 65 | 20 71 75 65 73 74 69 6f | All the| questio|
|00001050| 6e 73 20 61 72 65 20 72 | 65 61 73 6f 6e 61 62 6c |ns are r|easonabl|
|00001060| 79 20 65 61 73 79 20 74 | 6f 0a 58 61 6e 73 77 65 |y easy t|o.Xanswe|
|00001070| 72 20 77 69 74 68 20 70 | 74 79 20 61 6e 64 20 6e |r with p|ty and n|
|00001080| 6f 74 20 74 6f 6f 20 65 | 61 73 79 20 74 6f 20 61 |ot too e|asy to a|
|00001090| 6e 73 77 65 72 20 77 69 | 74 68 20 6f 74 68 65 72 |nswer wi|th other|
|000010a0| 20 77 69 64 65 6c 79 20 | 61 76 61 69 6c 61 62 6c | widely |availabl|
|000010b0| 65 0a 58 74 6f 6f 6c 73 | 2e 20 53 6f 20 49 20 68 |e.Xtools|. So I h|
|000010c0| 6f 70 65 20 74 68 69 73 | 20 66 69 6c 65 20 69 73 |ope this| file is|
|000010d0| 20 75 73 65 66 75 6c 2c | 20 61 6e 64 20 49 20 68 | useful,| and I h|
|000010e0| 6f 70 65 20 6f 74 68 65 | 72 20 73 6f 66 74 77 61 |ope othe|r softwa|
|000010f0| 72 65 20 61 75 74 68 6f | 72 73 0a 58 61 64 6f 70 |re autho|rs.Xadop|
|00001100| 74 20 74 68 65 20 51 55 | 45 53 54 49 4f 4e 53 20 |t the QU|ESTIONS |
|00001110| 69 64 65 61 2e 0a 58 0a | 58 4f 72 67 61 6e 69 7a |idea..X.|XOrganiz|
|00001120| 61 74 69 6f 6e 3a 20 71 | 75 65 73 74 69 6f 6e 2c |ation: q|uestion,|
|00001130| 20 6f 6e 65 2d 73 65 6e | 74 65 6e 63 65 20 61 6e | one-sen|tence an|
|00001140| 73 77 65 72 2c 20 66 75 | 72 74 68 65 72 20 64 65 |swer, fu|rther de|
|00001150| 74 61 69 6c 73 20 6f 66 | 0a 58 61 6e 73 77 65 72 |tails of|.Xanswer|
|00001160| 2c 20 77 68 79 20 74 68 | 65 20 71 75 65 73 74 69 |, why th|e questi|
|00001170| 6f 6e 20 6e 6f 72 6d 61 | 6c 6c 79 20 70 6f 73 65 |on norma|lly pose|
|00001180| 73 20 61 20 70 72 6f 62 | 6c 65 6d 2c 20 61 6e 64 |s a prob|lem, and|
|00001190| 20 77 68 79 20 74 68 65 | 20 61 6e 73 77 65 72 0a | why the| answer.|
|000011a0| 58 67 69 76 65 6e 20 73 | 6f 6c 76 65 73 20 74 68 |Xgiven s|olves th|
|000011b0| 65 20 70 72 6f 62 6c 65 | 6d 2e 0a 58 0a 58 0a 58 |e proble|m..X.X.X|
|000011c0| 31 2e 20 48 6f 77 20 74 | 6f 20 72 65 64 69 72 65 |1. How t|o redire|
|000011d0| 63 74 20 74 65 6c 6e 65 | 74 27 73 20 69 6e 70 75 |ct telne|t's inpu|
|000011e0| 74 3f 0a 58 0a 58 52 75 | 6e 20 70 74 79 20 74 65 |t?.X.XRu|n pty te|
|000011f0| 6c 6e 65 74 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |lnet ins|tead of |
|00001200| 74 65 6c 6e 65 74 2e 20 | 43 61 76 65 61 74 3a 20 |telnet. |Caveat: |
|00001210| 74 65 6c 6e 65 74 20 73 | 74 75 70 69 64 6c 79 20 |telnet s|tupidly |
|00001220| 66 6c 75 73 68 65 73 20 | 69 74 73 0a 58 69 6e 70 |flushes |its.Xinp|
|00001230| 75 74 20 61 74 20 63 6f | 6e 6e 65 63 74 20 74 69 |ut at co|nnect ti|
|00001240| 6d 65 2c 20 73 6f 20 62 | 65 20 63 61 72 65 66 75 |me, so b|e carefu|
|00001250| 6c 20 6e 6f 74 20 74 6f | 20 66 6c 6f 6f 64 20 69 |l not to| flood i|
|00001260| 74 3b 20 69 6e 73 74 65 | 61 64 20 64 6f 0a 58 73 |t; inste|ad do.Xs|
|00001270| 6f 6d 65 74 68 69 6e 67 | 20 6c 69 6b 65 20 25 20 |omething| like % |
|00001280| 28 73 6c 65 65 70 20 35 | 3b 65 63 68 6f 20 68 65 |(sleep 5|;echo he|
|00001290| 6c 70 3b 65 63 68 6f 20 | 71 75 69 74 29 20 7c 20 |lp;echo |quit) | |
|000012a0| 70 74 79 20 74 65 6c 6e | 65 74 20 77 68 61 74 65 |pty teln|et whate|
|000012b0| 76 65 72 20 32 35 2e 0a | 58 28 54 72 79 20 69 74 |ver 25..|X(Try it|
|000012c0| 21 29 20 54 68 65 20 66 | 69 76 65 2d 73 65 63 6f |!) The f|ive-seco|
|000012d0| 6e 64 20 70 61 75 73 65 | 20 73 68 6f 75 6c 64 20 |nd pause| should |
|000012e0| 62 65 20 65 6e 6f 75 67 | 68 2e 20 46 6f 72 20 61 |be enoug|h. For a|
|000012f0| 20 6d 6f 72 65 0a 58 73 | 6f 70 68 69 73 74 69 63 | more.Xs|ophistic|
|00001300| 61 74 65 64 20 28 61 6e | 64 20 72 65 6c 69 61 62 |ated (an|d reliab|
|00001310| 6c 65 29 20 74 65 63 68 | 6e 69 71 75 65 2c 20 73 |le) tech|nique, s|
|00001320| 65 65 20 23 34 20 62 65 | 6c 6f 77 2e 0a 58 0a 58 |ee #4 be|low..X.X|
|00001330| 54 68 65 20 70 72 6f 62 | 6c 65 6d 20 68 65 72 65 |The prob|lem here|
|00001340| 20 69 73 20 74 68 61 74 | 20 74 65 6c 6e 65 74 20 | is that| telnet |
|00001350| 77 61 6e 74 73 20 74 6f | 20 74 61 6b 65 20 69 74 |wants to| take it|
|00001360| 73 20 69 6e 70 75 74 20 | 66 72 6f 6d 20 61 20 74 |s input |from a t|
|00001370| 65 72 6d 69 6e 61 6c 2e | 0a 58 4d 6f 73 74 20 6f |erminal.|.XMost o|
|00001380| 74 68 65 72 20 69 6e 74 | 65 72 61 63 74 69 76 65 |ther int|eractive|
|00001390| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 28 65 | applica|tions (e|
|000013a0| 2e 67 2e 2c 20 65 64 69 | 74 6f 72 73 29 20 66 65 |.g., edi|tors) fe|
|000013b0| 65 6c 20 74 68 65 20 73 | 61 6d 65 20 77 61 79 0a |el the s|ame way.|
|000013c0| 58 61 62 6f 75 74 20 73 | 74 64 69 6e 2c 20 73 74 |Xabout s|tdin, st|
|000013d0| 64 6f 75 74 2c 20 61 6e | 64 20 73 74 64 65 72 72 |dout, an|d stderr|
|000013e0| 2e 20 70 74 79 20 73 6f | 6c 76 65 73 20 74 68 69 |. pty so|lves thi|
|000013f0| 73 20 62 79 20 73 65 74 | 74 69 6e 67 20 69 6e 70 |s by set|ting inp|
|00001400| 75 74 2c 0a 58 6f 75 74 | 70 75 74 2c 20 61 6e 64 |ut,.Xout|put, and|
|00001410| 20 65 72 72 6f 72 20 61 | 6c 6c 20 74 6f 20 74 68 | error a|ll to th|
|00001420| 65 20 70 73 65 75 64 6f | 2d 74 65 72 6d 69 6e 61 |e pseudo|-termina|
|00001430| 6c 2e 0a 58 0a 58 0a 58 | 32 2e 20 48 6f 77 20 74 |l..X.X.X|2. How t|
|00001440| 6f 20 72 65 64 69 72 65 | 63 74 20 73 75 27 73 20 |o redire|ct su's |
|00001450| 69 6e 70 75 74 3f 0a 58 | 0a 58 70 74 79 20 73 75 |input?.X|.Xpty su|
|00001460| 20 3c 20 69 6e 70 75 74 | 2c 20 6f 66 20 63 6f 75 | < input|, of cou|
|00001470| 72 73 65 2e 20 28 49 20 | 63 65 72 74 61 69 6e 6c |rse. (I |certainl|
|00001480| 79 20 64 6f 6e 27 74 20 | 72 65 63 6f 6d 6d 65 6e |y don't |recommen|
|00001490| 64 20 70 75 74 74 69 6e | 67 20 79 6f 75 72 0a 58 |d puttin|g your.X|
|000014a0| 70 61 73 73 77 6f 72 64 | 20 69 6e 20 70 6c 61 69 |password| in plai|
|000014b0| 6e 74 65 78 74 20 74 6f | 20 62 65 20 66 65 64 20 |ntext to| be fed |
|000014c0| 74 6f 20 73 75 2c 20 62 | 75 74 20 69 74 20 63 61 |to su, b|ut it ca|
|000014d0| 6e 20 62 65 20 64 6f 6e | 65 21 29 20 4e 6f 74 65 |n be don|e!) Note|
|000014e0| 20 74 68 61 74 0a 58 73 | 6f 6d 65 20 73 75 27 73 | that.Xs|ome su's|
|000014f0| 20 66 6c 75 73 68 20 74 | 68 65 69 72 20 69 6e 70 | flush t|heir inp|
|00001500| 75 74 3b 20 73 6f 6c 76 | 65 20 74 68 69 73 20 61 |ut; solv|e this a|
|00001510| 73 20 69 6e 20 23 31 20 | 61 62 6f 76 65 20 6f 72 |s in #1 |above or|
|00001520| 20 23 34 20 62 65 6c 6f | 77 2e 0a 58 0a 58 54 68 | #4 belo|w..X.XTh|
|00001530| 65 20 70 72 6f 62 6c 65 | 6d 20 69 73 20 74 68 61 |e proble|m is tha|
|00001540| 74 20 73 75 20 6f 70 65 | 6e 73 20 2f 64 65 76 2f |t su ope|ns /dev/|
|00001550| 74 74 79 20 66 6f 72 20 | 69 74 73 20 69 6e 70 75 |tty for |its inpu|
|00001560| 74 2e 20 4d 61 6e 79 20 | 6f 74 68 65 72 20 70 72 |t. Many |other pr|
|00001570| 6f 67 72 61 6d 73 0a 58 | 75 73 65 20 2f 64 65 76 |ograms.X|use /dev|
|00001580| 2f 74 74 79 20 65 78 70 | 6c 69 63 69 74 6c 79 20 |/tty exp|licitly |
|00001590| 66 6f 72 20 69 6e 70 75 | 74 20 61 6e 64 20 6f 75 |for inpu|t and ou|
|000015a0| 74 70 75 74 3b 20 68 6f | 77 20 64 6f 20 79 6f 75 |tput; ho|w do you|
|000015b0| 20 72 65 64 69 72 65 63 | 74 20 74 68 65 6d 3f 0a | redirec|t them?.|
|000015c0| 58 70 74 79 20 73 6f 6c | 76 65 73 20 74 68 69 73 |Xpty sol|ves this|
|000015d0| 20 62 65 63 61 75 73 65 | 20 61 20 70 72 6f 67 72 | because| a progr|
|000015e0| 61 6d 20 75 6e 64 65 72 | 20 61 20 70 73 65 75 64 |am under| a pseud|
|000015f0| 6f 2d 74 65 72 6d 69 6e | 61 6c 20 72 65 66 65 72 |o-termin|al refer|
|00001600| 73 20 74 6f 20 74 68 61 | 74 0a 58 74 65 72 6d 69 |s to tha|t.Xtermi|
|00001610| 6e 61 6c 20 77 68 65 6e | 20 69 74 20 6f 70 65 6e |nal when| it open|
|00001620| 73 20 2f 64 65 76 2f 74 | 74 79 2e 0a 58 0a 58 0a |s /dev/t|ty..X.X.|
|00001630| 58 33 2e 20 48 6f 77 20 | 74 6f 20 6d 61 6b 65 20 |X3. How |to make |
|00001640| 73 65 64 20 27 73 2f 66 | 6f 6f 2f 62 61 72 2f 67 |sed 's/f|oo/bar/g|
|00001650| 27 20 7c 20 6d 6f 72 65 | 20 77 6f 72 6b 3f 0a 58 |' | more| work?.X|
|00001660| 0a 58 70 74 79 20 2d 30 | 20 73 65 64 20 27 73 2f |.Xpty -0| sed 's/|
|00001670| 66 6f 6f 2f 62 61 72 2f | 67 27 20 7c 20 6d 6f 72 |foo/bar/|g' | mor|
|00001680| 65 2e 20 59 6f 75 20 63 | 61 6e 20 61 62 62 72 65 |e. You c|an abbre|
|00001690| 76 69 61 74 65 20 70 74 | 79 20 2d 30 20 61 73 20 |viate pt|y -0 as |
|000016a0| 63 6f 6e 64 6f 6d 2e 0a | 58 0a 58 54 68 65 20 70 |condom..|X.XThe p|
|000016b0| 72 6f 62 6c 65 6d 20 69 | 73 20 74 68 61 74 20 73 |roblem i|s that s|
|000016c0| 65 64 20 75 73 65 73 20 | 73 74 64 69 6f 2e 20 73 |ed uses |stdio. s|
|000016d0| 74 64 69 6f 20 63 68 65 | 63 6b 73 20 77 68 65 74 |tdio che|cks whet|
|000016e0| 68 65 72 20 69 74 73 20 | 6f 75 74 70 75 74 20 69 |her its |output i|
|000016f0| 73 20 61 0a 58 74 65 72 | 6d 69 6e 61 6c 3b 20 69 |s a.Xter|minal; i|
|00001700| 66 20 6e 6f 74 2c 20 69 | 74 20 62 75 66 66 65 72 |f not, i|t buffer|
|00001710| 73 20 61 20 62 6c 6f 63 | 6b 20 6f 66 20 64 61 74 |s a bloc|k of dat|
|00001720| 61 20 69 6e 73 69 64 65 | 20 74 68 65 20 70 72 6f |a inside| the pro|
|00001730| 67 72 61 6d 2e 20 54 6f | 20 73 65 65 0a 58 74 68 |gram. To| see.Xth|
|00001740| 69 73 20 69 6e 20 61 63 | 74 69 6f 6e 2c 20 74 72 |is in ac|tion, tr|
|00001750| 79 20 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 25 |y the or|iginal %|
|00001760| 20 73 65 64 20 27 73 2f | 66 6f 6f 2f 62 61 72 2f | sed 's/|foo/bar/|
|00001770| 67 27 20 7c 20 6d 6f 72 | 65 3b 20 75 6e 6c 65 73 |g' | mor|e; unles|
|00001780| 73 20 79 6f 75 0a 58 74 | 79 70 65 20 61 20 6c 6f |s you.Xt|ype a lo|
|00001790| 74 20 6f 66 20 69 6e 70 | 75 74 2c 20 73 65 64 20 |t of inp|ut, sed |
|000017a0| 77 69 6c 6c 20 6b 65 65 | 70 20 62 75 66 66 65 72 |will kee|p buffer|
|000017b0| 69 6e 67 20 69 74 73 20 | 6f 75 74 70 75 74 2c 20 |ing its |output, |
|000017c0| 73 6f 20 79 6f 75 27 6c | 6c 20 6e 65 76 65 72 0a |so you'l|l never.|
|000017d0| 58 73 65 65 20 61 6e 79 | 74 68 69 6e 67 2e 0a 58 |Xsee any|thing..X|
|000017e0| 0a 58 70 74 79 20 73 6f | 6c 76 65 73 20 74 68 65 |.Xpty so|lves the|
|000017f0| 20 73 74 64 69 6f 20 62 | 75 66 66 65 72 20 70 72 | stdio b|uffer pr|
|00001800| 6f 62 6c 65 6d 20 62 65 | 63 61 75 73 65 20 61 20 |oblem be|cause a |
|00001810| 70 72 6f 67 72 61 6d 20 | 75 6e 64 65 72 20 73 74 |program |under st|
|00001820| 64 69 6f 20 64 6f 65 73 | 0a 58 68 61 76 65 20 61 |dio does|.Xhave a|
|00001830| 20 74 65 72 6d 69 6e 61 | 6c 20 28 74 68 65 20 70 | termina|l (the p|
|00001840| 73 65 75 64 6f 2d 74 65 | 72 6d 69 6e 61 6c 29 20 |seudo-te|rminal) |
|00001850| 61 73 20 6f 75 74 70 75 | 74 2e 20 53 6f 20 73 74 |as outpu|t. So st|
|00001860| 64 69 6f 20 62 75 66 66 | 65 72 73 20 6f 6e 6c 79 |dio buff|ers only|
|00001870| 20 61 0a 58 6c 69 6e 65 | 20 61 74 20 61 20 74 69 | a.Xline| at a ti|
|00001880| 6d 65 2e 0a 58 0a 58 0a | 58 34 2e 20 48 6f 77 20 |me..X.X.|X4. How |
|00001890| 74 6f 20 73 74 61 72 74 | 20 61 20 70 72 6f 67 72 |to start| a progr|
|000018a0| 61 6d 2c 20 72 65 73 70 | 6f 6e 64 20 74 6f 20 69 |am, resp|ond to i|
|000018b0| 74 73 20 70 72 6f 6d 70 | 74 73 2c 20 67 69 76 65 |ts promp|ts, give|
|000018c0| 20 74 68 65 20 63 6f 72 | 72 65 63 74 0a 58 20 20 | the cor|rect.X |
|000018d0| 20 72 65 70 6c 69 65 73 | 2c 20 61 6e 64 20 63 61 | replies|, and ca|
|000018e0| 74 63 68 20 74 68 65 20 | 6f 75 74 70 75 74 3f 0a |tch the |output?.|
|000018f0| 58 0a 58 4f 6e 20 61 20 | 6d 61 63 68 69 6e 65 20 |X.XOn a |machine |
|00001900| 77 69 74 68 20 6e 61 6d | 65 64 20 70 69 70 65 73 |with nam|ed pipes|
|00001910| 20 63 72 65 61 74 65 64 | 20 62 79 20 6d 6b 6e 6f | created| by mkno|
|00001920| 64 20 66 6f 6f 20 70 3a | 0a 58 0a 58 20 20 23 21 |d foo p:|.X.X #!|
|00001930| 2f 62 69 6e 2f 73 68 0a | 58 20 20 23 20 47 65 6e |/bin/sh.|X # Gen|
|00001940| 65 72 69 63 20 72 65 61 | 64 65 72 2d 77 72 69 74 |eric rea|der-writ|
|00001950| 65 72 2e 0a 58 20 20 28 | 75 6d 61 73 6b 20 30 37 |er..X (|umask 07|
|00001960| 37 3b 6d 6b 6e 6f 64 20 | 69 6e 70 75 74 20 70 3b |7;mknod |input p;|
|00001970| 6d 6b 6e 6f 64 20 6f 75 | 74 70 75 74 20 70 29 0a |mknod ou|tput p).|
|00001980| 58 20 20 70 74 79 20 2d | 30 20 70 72 6f 67 72 61 |X pty -|0 progra|
|00001990| 6d 20 61 72 67 73 20 3c | 20 69 6e 70 75 74 20 7c |m args <| input ||
|000019a0| 20 70 74 79 20 2d 30 20 | 74 65 65 20 72 65 63 6f | pty -0 |tee reco|
|000019b0| 72 64 20 3e 20 6f 75 74 | 70 75 74 20 26 0a 58 20 |rd > out|put &.X |
|000019c0| 20 65 78 65 63 20 34 3e | 69 6e 70 75 74 20 35 3c | exec 4>|input 5<|
|000019d0| 6f 75 74 70 75 74 0a 58 | 20 20 23 20 4e 6f 77 20 |output.X| # Now |
|000019e0| 72 65 61 64 20 70 72 6f | 6d 70 74 73 20 66 72 6f |read pro|mpts fro|
|000019f0| 6d 20 3c 26 35 20 61 6e | 64 20 77 72 69 74 65 20 |m <&5 an|d write |
|00001a00| 72 65 70 6c 69 65 73 20 | 74 6f 20 3e 26 34 2e 0a |replies |to >&4..|
|00001a10| 58 20 20 23 20 41 20 74 | 72 61 6e 73 63 72 69 70 |X # A t|ranscrip|
|00001a20| 74 20 69 73 20 6b 65 70 | 74 20 69 6e 20 72 65 63 |t is kep|t in rec|
|00001a30| 6f 72 64 2e 0a 58 0a 58 | 41 6e 6f 74 68 65 72 20 |ord..X.X|Another |
|00001a40| 73 6f 6c 75 74 69 6f 6e | 20 69 73 20 74 6f 20 63 |solution| is to c|
|00001a50| 72 65 61 74 65 20 74 77 | 6f 20 28 75 6e 6e 61 6d |reate tw|o (unnam|
|00001a60| 65 64 29 20 70 69 70 65 | 73 2c 20 74 68 65 6e 20 |ed) pipe|s, then |
|00001a70| 73 74 69 63 6b 20 70 74 | 79 0a 58 62 65 74 77 65 |stick pt|y.Xbetwe|
|00001a80| 65 6e 20 74 68 65 6d 20 | 61 73 20 61 62 6f 76 65 |en them |as above|
|00001a90| 2e 20 54 68 69 73 20 72 | 65 71 75 69 72 65 73 20 |. This r|equires |
|00001aa0| 43 20 63 6f 64 65 20 62 | 75 74 20 69 73 20 6d 6f |C code b|ut is mo|
|00001ab0| 72 65 20 70 6f 72 74 61 | 62 6c 65 2e 0a 58 0a 58 |re porta|ble..X.X|
|00001ac0| 54 68 65 20 70 72 6f 62 | 6c 65 6d 73 20 68 65 72 |The prob|lems her|
|00001ad0| 65 20 61 72 65 20 6a 75 | 73 74 20 74 68 65 20 70 |e are ju|st the p|
|00001ae0| 72 6f 62 6c 65 6d 73 20 | 69 6e 20 23 31 2d 23 33 |roblems |in #1-#3|
|00001af0| 20 61 62 6f 76 65 2e 0a | 58 0a 58 0a 58 35 2e 20 | above..|X.X.X5. |
|00001b00| 48 6f 77 20 74 6f 20 66 | 6f 6f 6c 20 72 6e 20 69 |How to f|ool rn i|
|00001b10| 6e 74 6f 20 70 72 6f 63 | 65 73 73 69 6e 67 20 4b |nto proc|essing K|
|00001b20| 49 4c 4c 20 66 69 6c 65 | 73 20 69 6e 20 74 68 65 |ILL file|s in the|
|00001b30| 20 62 61 63 6b 67 72 6f | 75 6e 64 3f 0a 58 0a 58 | backgro|und?.X.X|
|00001b40| 70 74 79 20 2d 54 20 72 | 6e 20 26 2e 20 54 68 69 |pty -T r|n &. Thi|
|00001b50| 73 20 64 6f 65 73 20 68 | 61 76 65 20 6f 6e 65 20 |s does h|ave one |
|00001b60| 64 65 66 69 63 69 65 6e | 63 79 3a 20 63 6f 6e 74 |deficien|cy: cont|
|00001b70| 72 6f 6c 20 63 68 61 72 | 61 63 74 65 72 73 20 6c |rol char|acters l|
|00001b80| 69 6b 65 20 5e 43 2c 0a | 58 5e 5a 2c 20 61 6e 64 |ike ^C,.|X^Z, and|
|00001b90| 20 73 6f 20 6f 6e 20 61 | 66 66 65 63 74 20 70 74 | so on a|ffect pt|
|00001ba0| 79 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 72 6e |y rather| than rn|
|00001bb0| 2e 20 28 54 68 61 74 27 | 73 20 77 68 61 74 20 2d |. (That'|s what -|
|00001bc0| 54 20 64 6f 65 73 2e 29 | 20 54 68 69 73 0a 58 64 |T does.)| This.Xd|
|00001bd0| 6f 65 73 6e 27 74 20 6d | 61 74 74 65 72 20 66 6f |oesn't m|atter fo|
|00001be0| 72 20 72 6e 2c 20 62 75 | 74 20 70 74 79 20 2d 54 |r rn, bu|t pty -T|
|00001bf0| 20 76 69 20 76 65 72 79 | 6c 6f 6e 67 66 69 6c 65 | vi very|longfile|
|00001c00| 20 64 65 66 69 6e 69 74 | 65 6c 79 20 64 6f 65 73 | definit|ely does|
|00001c10| 6e 27 74 0a 58 77 6f 72 | 6b 20 74 68 65 20 72 69 |n't.Xwor|k the ri|
|00001c20| 67 68 74 20 77 61 79 2e | 20 54 6f 20 70 61 73 73 |ght way.| To pass|
|00001c30| 20 63 6f 6e 74 72 6f 6c | 20 63 68 61 72 61 63 74 | control| charact|
|00001c40| 65 72 73 20 74 68 72 6f | 75 67 68 2c 20 73 74 61 |ers thro|ugh, sta|
|00001c50| 72 74 20 77 69 74 68 0a | 58 0a 58 20 20 25 20 70 |rt with.|X.X % p|
|00001c60| 74 79 20 2d 73 20 73 68 | 20 2d 63 20 27 73 65 73 |ty -s sh| -c 'ses|
|00001c70| 73 6e 61 6d 65 3b 64 69 | 73 63 6f 6e 6e 65 63 74 |sname;di|sconnect|
|00001c80| 3b 70 74 79 20 76 69 20 | 76 65 72 79 6c 6f 6e 67 |;pty vi |verylong|
|00001c90| 66 69 6c 65 27 0a 58 0a | 58 28 70 74 79 20 2d 73 |file'.X.|X(pty -s|
|00001ca0| 20 63 61 6e 20 62 65 20 | 61 62 62 72 65 76 69 61 | can be |abbrevia|
|00001cb0| 74 65 64 20 61 73 20 73 | 65 73 73 2e 29 20 54 68 |ted as s|ess.) Th|
|00001cc0| 65 6e 20 77 61 74 63 68 | 20 74 68 65 20 76 69 20 |en watch| the vi |
|00001cd0| 70 72 6f 63 65 73 73 20 | 77 69 74 68 20 70 73 0a |process |with ps.|
|00001ce0| 58 6f 72 20 62 79 20 74 | 79 70 69 6e 67 20 70 74 |Xor by t|yping pt|
|00001cf0| 79 20 2d 73 54 20 72 65 | 63 6f 6e 6e 65 63 74 20 |y -sT re|connect |
|00001d00| 78 78 2c 20 77 61 74 63 | 68 69 6e 67 2c 20 74 68 |xx, watc|hing, th|
|00001d10| 65 6e 20 70 72 65 73 73 | 69 6e 67 20 5e 43 2c 20 |en press|ing ^C, |
|00001d20| 77 68 65 72 65 20 78 78 | 0a 58 69 73 20 74 68 65 |where xx|.Xis the|
|00001d30| 20 73 65 73 73 69 6f 6e | 20 6e 61 6d 65 20 28 70 | session| name (p|
|00001d40| 74 79 20 65 78 74 65 6e | 73 69 6f 6e 29 2e 20 57 |ty exten|sion). W|
|00001d50| 68 65 6e 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |hen you |want to |
|00001d60| 72 65 63 6f 6e 6e 65 63 | 74 20 61 6e 64 20 70 61 |reconnec|t and pa|
|00001d70| 73 73 0a 58 63 6f 6e 74 | 72 6f 6c 20 63 68 61 72 |ss.Xcont|rol char|
|00001d80| 61 63 74 65 72 73 20 74 | 6f 20 76 69 2c 20 74 79 |acters t|o vi, ty|
|00001d90| 70 65 20 25 20 70 74 79 | 20 2d 73 20 72 65 63 6f |pe % pty| -s reco|
|00001da0| 6e 6e 65 63 74 20 78 78 | 2e 20 46 72 6f 6d 20 74 |nnect xx|. From t|
|00001db0| 68 61 74 20 70 6f 69 6e | 74 0a 58 69 74 27 6c 6c |hat poin|t.Xit'll|
|00001dc0| 20 66 65 65 6c 20 6a 75 | 73 74 20 6c 69 6b 65 20 | feel ju|st like |
|00001dd0| 61 20 6e 6f 72 6d 61 6c | 20 76 69 2e 0a 58 0a 58 |a normal| vi..X.X|
|00001de0| 54 68 65 20 70 72 6f 62 | 6c 65 6d 20 69 73 20 74 |The prob|lem is t|
|00001df0| 68 61 74 20 72 6e 2d 2d | 2d 6c 69 6b 65 20 61 6c |hat rn--|-like al|
|00001e00| 6c 20 63 68 61 72 61 63 | 74 65 72 2d 62 61 73 65 |l charac|ter-base|
|00001e10| 64 20 69 6e 74 65 72 61 | 63 74 69 76 65 0a 58 61 |d intera|ctive.Xa|
|00001e20| 70 70 6c 69 63 61 74 69 | 6f 6e 73 2d 2d 2d 77 61 |pplicati|ons---wa|
|00001e30| 6e 74 73 20 74 6f 20 63 | 68 61 6e 67 65 20 74 68 |nts to c|hange th|
|00001e40| 65 20 74 74 79 20 6d 6f | 64 65 20 74 6f 20 72 65 |e tty mo|de to re|
|00001e50| 61 64 20 6f 6e 65 20 63 | 68 61 72 61 63 74 65 72 |ad one c|haracter|
|00001e60| 20 61 74 20 61 0a 58 74 | 69 6d 65 20 69 6e 73 74 | at a.Xt|ime inst|
|00001e70| 65 61 64 20 6f 66 20 6f | 6e 65 20 6c 69 6e 65 20 |ead of o|ne line |
|00001e80| 61 74 20 61 20 74 69 6d | 65 2e 20 54 68 65 20 74 |at a tim|e. The t|
|00001e90| 74 79 20 64 72 69 76 65 | 72 20 64 6f 65 73 6e 27 |ty drive|r doesn'|
|00001ea0| 74 20 6c 65 74 20 69 74 | 20 64 6f 0a 58 74 68 69 |t let it| do.Xthi|
|00001eb0| 73 20 69 6e 20 74 68 65 | 20 62 61 63 6b 67 72 6f |s in the| backgro|
|00001ec0| 75 6e 64 2e 20 70 74 79 | 20 2d 54 20 72 6e 20 73 |und. pty| -T rn s|
|00001ed0| 6f 6c 76 65 73 20 74 68 | 69 73 20 62 65 63 61 75 |olves th|is becau|
|00001ee0| 73 65 20 72 6e 20 69 73 | 20 72 65 61 6c 6c 79 20 |se rn is| really |
|00001ef0| 69 6e 0a 58 74 68 65 20 | 66 6f 72 65 67 72 6f 75 |in.Xthe |foregrou|
|00001f00| 6e 64 20 75 6e 64 65 72 | 20 74 68 65 20 70 74 79 |nd under| the pty|
|00001f10| 2e 0a 58 0a 58 0a 58 36 | 2e 20 48 6f 77 20 74 6f |..X.X.X6|. How to|
|00001f20| 20 67 65 74 20 74 65 72 | 6d 69 6e 61 6c 20 73 70 | get ter|minal sp|
|00001f30| 65 65 64 20 66 72 6f 6d | 20 73 68 65 6c 6c 20 73 |eed from| shell s|
|00001f40| 63 72 69 70 74 3f 0a 58 | 0a 58 22 60 70 74 79 20 |cript?.X|.X"`pty |
|00001f50| 73 74 74 79 20 73 70 65 | 65 64 60 22 2c 20 61 73 |stty spe|ed`", as|
|00001f60| 73 75 6d 69 6e 67 20 66 | 64 20 30 20 6f 72 20 66 |suming f|d 0 or f|
|00001f70| 64 20 32 20 69 73 20 74 | 68 65 20 74 74 79 2e 0a |d 2 is t|he tty..|
|00001f80| 58 0a 58 54 68 65 20 70 | 72 6f 62 6c 65 6d 20 69 |X.XThe p|roblem i|
|00001f90| 73 20 74 68 61 74 20 61 | 20 73 74 72 61 69 67 68 |s that a| straigh|
|00001fa0| 74 20 60 73 74 74 79 20 | 73 70 65 65 64 60 20 70 |t `stty |speed` p|
|00001fb0| 69 70 65 73 20 73 74 74 | 79 27 73 20 6f 75 74 70 |ipes stt|y's outp|
|00001fc0| 75 74 20 61 77 61 79 0a | 58 66 72 6f 6d 20 79 6f |ut away.|Xfrom yo|
|00001fd0| 75 72 20 74 65 72 6d 69 | 6e 61 6c 20 61 6e 64 20 |ur termi|nal and |
|00001fe0| 62 61 63 6b 20 69 6e 74 | 6f 20 79 6f 75 72 20 73 |back int|o your s|
|00001ff0| 68 65 6c 6c 2e 20 4d 61 | 6e 79 20 76 65 72 73 69 |hell. Ma|ny versi|
|00002000| 6f 6e 73 20 6f 66 20 73 | 74 74 79 0a 58 61 73 73 |ons of s|tty.Xass|
|00002010| 75 6d 65 20 74 68 61 74 | 20 74 68 65 69 72 20 6f |ume that| their o|
|00002020| 75 74 70 75 74 20 70 6f | 69 6e 74 73 20 74 6f 20 |utput po|ints to |
|00002030| 74 68 65 20 74 65 72 6d | 69 6e 61 6c 2c 20 73 6f |the term|inal, so|
|00002040| 20 74 68 65 79 20 62 6c | 6f 77 20 75 70 2e 20 70 | they bl|ow up. p|
|00002050| 74 79 0a 58 73 6f 6c 76 | 65 73 20 74 68 69 73 20 |ty.Xsolv|es this |
|00002060| 62 65 63 61 75 73 65 20 | 69 74 20 63 6f 70 69 65 |because |it copie|
|00002070| 73 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 66 72 |s inform|ation fr|
|00002080| 6f 6d 20 74 68 65 20 72 | 65 61 6c 20 74 65 72 6d |om the r|eal term|
|00002090| 69 6e 61 6c 20 74 6f 20 | 74 68 65 0a 58 70 73 65 |inal to |the.Xpse|
|000020a0| 75 64 6f 2d 74 65 72 6d | 69 6e 61 6c 2e 0a 45 4e |udo-term|inal..EN|
|000020b0| 44 5f 4f 46 5f 46 49 4c | 45 0a 20 20 69 66 20 74 |D_OF_FIL|E. if t|
|000020c0| 65 73 74 20 34 32 30 32 | 20 2d 6e 65 20 60 77 63 |est 4202| -ne `wc|
|000020d0| 20 2d 63 20 3c 27 51 55 | 45 53 54 49 4f 4e 53 27 | -c <'QU|ESTIONS'|
|000020e0| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|000020f0| 20 73 68 61 72 3a 20 5c | 22 27 51 55 45 53 54 49 | shar: \|"'QUESTI|
|00002100| 4f 4e 53 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |ONS'\" u|npacked |
|00002110| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00002120| 0a 20 20 66 69 0a 20 20 | 23 20 65 6e 64 20 6f 66 |. fi. |# end of|
|00002130| 20 27 51 55 45 53 54 49 | 4f 4e 53 27 0a 66 69 0a | 'QUESTI|ONS'.fi.|
|00002140| 69 66 20 74 65 73 74 20 | 2d 66 20 27 54 45 53 54 |if test |-f 'TEST|
|00002150| 53 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |S' -a "$|{1}" != |
|00002160| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00002170| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00002180| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00002190| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 54 45 53 54 |ing file| \"'TEST|
|000021a0| 53 27 5c 22 0a 65 6c 73 | 65 0a 20 20 65 63 68 6f |S'\".els|e. echo|
|000021b0| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|000021c0| 67 20 5c 22 27 54 45 53 | 54 53 27 5c 22 20 5c 28 |g \"'TES|TS'\" \(|
|000021d0| 33 36 35 37 20 63 68 61 | 72 61 63 74 65 72 73 5c |3657 cha|racters\|
|000021e0| 29 0a 20 20 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |). sed |"s/^X//"|
|000021f0| 20 3e 27 54 45 53 54 53 | 27 20 3c 3c 27 45 4e 44 | >'TESTS|' <<'END|
|00002200| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 23 21 2f 62 69 |_OF_FILE|'.X#!/bi|
|00002210| 6e 2f 73 68 0a 58 23 20 | 54 68 69 73 20 69 73 20 |n/sh.X# |This is |
|00002220| 61 20 73 68 65 6c 6c 20 | 73 63 72 69 70 74 2e 20 |a shell |script. |
|00002230| 46 65 65 64 20 69 74 20 | 74 6f 20 73 68 2e 0a 58 |Feed it |to sh..X|
|00002240| 65 63 68 6f 20 27 0a 58 | 48 69 2c 20 61 6e 64 20 |echo '.X|Hi, and |
|00002250| 77 65 6c 63 6f 6d 65 20 | 74 6f 20 74 68 65 20 70 |welcome |to the p|
|00002260| 74 79 20 74 65 73 74 20 | 73 63 72 69 70 74 2e 0a |ty test |script..|
|00002270| 58 0a 58 41 73 20 69 6e | 20 69 6e 73 74 61 6c 6c |X.XAs in| install|
|00002280| 61 74 69 6f 6e 2c 20 49 | 27 5c 27 27 6d 20 6e 6f |ation, I|'\''m no|
|00002290| 74 20 61 63 74 75 61 6c | 6c 79 20 67 6f 69 6e 67 |t actual|ly going|
|000022a0| 20 74 6f 20 64 6f 20 61 | 6e 79 74 68 69 6e 67 2e | to do a|nything.|
|000022b0| 0a 58 49 27 5c 27 27 6c | 6c 20 6a 75 73 74 20 67 |.XI'\''l|l just g|
|000022c0| 75 69 64 65 20 79 6f 75 | 20 74 68 72 6f 75 67 68 |uide you| through|
|000022d0| 20 61 20 66 65 77 20 28 | 6e 6f 6e 2d 63 6f 6d 70 | a few (|non-comp|
|000022e0| 72 65 68 65 6e 73 69 76 | 65 29 20 74 65 73 74 73 |rehensiv|e) tests|
|000022f0| 2e 0a 58 0a 58 52 65 6d | 65 6d 62 65 72 3a 20 4c |..X.XRem|ember: L|
|00002300| 69 6b 65 20 61 6c 6c 20 | 73 6f 66 74 77 61 72 65 |ike all |software|
|00002310| 2c 20 70 74 79 20 63 6f | 6d 65 73 20 77 69 74 68 |, pty co|mes with|
|00002320| 6f 75 74 20 77 61 72 72 | 61 6e 74 79 2c 20 74 6f |out warr|anty, to|
|00002330| 20 74 68 65 20 65 78 74 | 65 6e 74 0a 58 70 65 72 | the ext|ent.Xper|
|00002340| 6d 69 74 74 65 64 20 62 | 79 20 61 70 70 6c 69 63 |mitted b|y applic|
|00002350| 61 62 6c 65 20 6c 61 77 | 2e 20 55 73 65 20 69 74 |able law|. Use it|
|00002360| 20 61 74 20 79 6f 75 72 | 20 6f 77 6e 20 72 69 73 | at your| own ris|
|00002370| 6b 2e 0a 58 27 0a 58 0a | 58 65 63 68 6f 20 27 2d |k..X'.X.|Xecho '-|
|00002380| 2d 2d 2d 2d 20 50 72 65 | 73 73 20 72 65 74 75 72 |---- Pre|ss retur|
|00002390| 6e 20 74 6f 20 63 6f 6e | 74 69 6e 75 65 2e 20 27 |n to con|tinue. '|
|000023a0| 20 7c 20 74 72 20 2d 64 | 20 27 5c 30 31 32 27 3b | | tr -d| '\012';|
|000023b0| 20 72 65 61 64 20 63 6f | 6e 74 6c 69 6e 65 0a 58 | read co|ntline.X|
|000023c0| 0a 58 65 63 68 6f 20 27 | 0a 58 46 69 72 73 74 2c |.Xecho '|.XFirst,|
|000023d0| 20 6a 75 73 74 20 74 72 | 79 20 25 20 70 74 79 20 | just tr|y % pty |
|000023e0| 76 69 2e 20 59 6f 75 20 | 73 68 6f 75 6c 64 6e 27 |vi. You |shouldn'|
|000023f0| 5c 27 27 74 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |\''t be |able to |
|00002400| 74 65 6c 6c 20 74 68 65 | 0a 58 64 69 66 66 65 72 |tell the|.Xdiffer|
|00002410| 65 6e 63 65 20 62 65 74 | 77 65 65 6e 20 74 68 69 |ence bet|ween thi|
|00002420| 73 20 61 6e 64 20 61 20 | 6e 6f 72 6d 61 6c 20 76 |s and a |normal v|
|00002430| 69 3b 20 73 74 6f 70 70 | 69 6e 67 20 61 6e 64 20 |i; stopp|ing and |
|00002440| 72 65 73 74 61 72 74 69 | 6e 67 20 73 68 6f 75 6c |restarti|ng shoul|
|00002450| 64 0a 58 77 6f 72 6b 20 | 70 65 72 66 65 63 74 6c |d.Xwork |perfectl|
|00002460| 79 2c 20 61 73 20 73 68 | 6f 75 6c 64 20 6e 6f 72 |y, as sh|ould nor|
|00002470| 6d 61 6c 20 74 79 70 69 | 6e 67 2e 0a 58 27 0a 58 |mal typi|ng..X'.X|
|00002480| 0a 58 65 63 68 6f 20 27 | 2d 2d 2d 2d 2d 20 50 72 |.Xecho '|----- Pr|
|00002490| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|000024a0| 6e 74 69 6e 75 65 2e 20 | 27 20 7c 20 74 72 20 2d |ntinue. |' | tr -|
|000024b0| 64 20 27 5c 30 31 32 27 | 3b 20 72 65 61 64 20 63 |d '\012'|; read c|
|000024c0| 6f 6e 74 6c 69 6e 65 0a | 58 0a 58 65 63 68 6f 20 |ontline.|X.Xecho |
|000024d0| 27 0a 58 4e 65 78 74 2c | 20 74 72 79 20 25 20 70 |'.XNext,| try % p|
|000024e0| 74 79 20 2d 30 20 74 72 | 20 5c 21 20 5c 3f 20 7c |ty -0 tr| \! \? ||
|000024f0| 20 70 74 79 20 76 69 2e | 20 54 68 69 73 20 73 68 | pty vi.| This sh|
|00002500| 6f 75 6c 64 20 77 6f 72 | 6b 20 6a 75 73 74 20 6c |ould wor|k just l|
|00002510| 69 6b 65 20 74 68 65 0a | 58 6c 61 73 74 20 76 69 |ike the.|Xlast vi|
|00002520| 2c 20 77 69 74 68 20 74 | 68 65 20 66 6f 6c 6c 6f |, with t|he follo|
|00002530| 77 69 6e 67 20 64 69 66 | 66 65 72 65 6e 63 65 73 |wing dif|ferences|
|00002540| 3a 20 31 2e 20 53 74 6f | 70 70 69 6e 67 20 77 69 |: 1. Sto|pping wi|
|00002550| 6c 6c 20 72 65 71 75 69 | 72 65 20 74 77 6f 0a 58 |ll requi|re two.X|
|00002560| 5e 5a 73 2c 20 62 65 63 | 61 75 73 65 20 63 73 68 |^Zs, bec|ause csh|
|00002570| 20 69 64 69 6f 74 69 63 | 61 6c 6c 79 20 64 6f 65 | idiotic|ally doe|
|00002580| 73 6e 27 5c 27 27 74 20 | 74 68 69 6e 6b 20 61 20 |sn'\''t |think a |
|00002590| 70 69 70 65 6c 69 6e 65 | 20 68 61 73 20 73 74 6f |pipeline| has sto|
|000025a0| 70 70 65 64 0a 58 77 68 | 65 6e 20 6a 75 73 74 20 |pped.Xwh|en just |
|000025b0| 69 74 73 20 73 65 63 6f | 6e 64 20 63 6f 6d 70 6f |its seco|nd compo|
|000025c0| 6e 65 6e 74 20 73 74 6f | 70 73 2e 20 32 2e 20 45 |nent sto|ps. 2. E|
|000025d0| 78 69 74 69 6e 67 20 77 | 69 6c 6c 20 72 65 71 75 |xiting w|ill requ|
|000025e0| 69 72 65 20 61 6e 20 65 | 78 74 72 61 0a 58 6c 69 |ire an e|xtra.Xli|
|000025f0| 6e 65 20 74 6f 20 66 65 | 65 64 20 74 68 72 6f 75 |ne to fe|ed throu|
|00002600| 67 68 20 74 72 2c 20 73 | 6f 20 74 68 61 74 20 69 |gh tr, s|o that i|
|00002610| 74 20 67 65 74 73 20 61 | 20 62 72 6f 6b 65 6e 20 |t gets a| broken |
|00002620| 70 69 70 65 3b 20 74 68 | 69 73 20 69 73 20 6d 6f |pipe; th|is is mo|
|00002630| 72 65 0a 58 73 65 6e 73 | 69 62 6c 65 20 74 68 61 |re.Xsens|ible tha|
|00002640| 6e 20 23 31 2e 20 33 2e | 20 41 6c 6c 20 65 78 63 |n #1. 3.| All exc|
|00002650| 6c 61 6d 61 74 69 6f 6e | 20 70 6f 69 6e 74 73 20 |lamation| points |
|00002660| 77 69 6c 6c 20 62 65 20 | 74 75 72 6e 65 64 20 69 |will be |turned i|
|00002670| 6e 74 6f 20 71 75 65 73 | 74 69 6f 6e 0a 58 6d 61 |nto ques|tion.Xma|
|00002680| 72 6b 73 2e 20 54 68 69 | 73 20 68 61 73 20 6f 62 |rks. Thi|s has ob|
|00002690| 76 69 6f 75 73 20 61 70 | 70 6c 69 63 61 74 69 6f |vious ap|plicatio|
|000026a0| 6e 73 2e 20 3a 77 20 2f | 64 65 76 2f 6e 75 6c 6c |ns. :w /|dev/null|
|000026b0| 20 68 65 6c 70 73 20 74 | 6f 20 65 73 63 61 70 65 | helps t|o escape|
|000026c0| 2e 0a 58 27 0a 58 0a 58 | 65 63 68 6f 20 27 2d 2d |..X'.X.X|echo '--|
|000026d0| 2d 2d 2d 20 50 72 65 73 | 73 20 72 65 74 75 72 6e |--- Pres|s return|
|000026e0| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 20 27 20 | to cont|inue. ' |
|000026f0| 7c 20 74 72 20 2d 64 20 | 27 5c 30 31 32 27 3b 20 || tr -d |'\012'; |
|00002700| 72 65 61 64 20 63 6f 6e | 74 6c 69 6e 65 0a 58 0a |read con|tline.X.|
|00002710| 58 65 63 68 6f 20 27 0a | 58 43 6f 6e 74 69 6e 75 |Xecho '.|XContinu|
|00002720| 69 6e 67 20 61 6c 6f 6e | 67 20 74 68 65 20 6c 69 |ing alon|g the li|
|00002730| 6e 65 73 20 6f 66 20 68 | 6f 77 20 74 6f 20 73 74 |nes of h|ow to st|
|00002740| 69 63 6b 20 61 6e 6e 6f | 79 69 6e 67 20 70 72 6f |ick anno|ying pro|
|00002750| 67 72 61 6d 73 20 69 6e | 74 6f 20 61 0a 58 70 69 |grams in|to a.Xpi|
|00002760| 70 65 2c 20 74 72 79 20 | 25 20 70 74 79 20 2d 30 |pe, try |% pty -0|
|00002770| 20 73 65 64 20 27 5c 27 | 27 73 2f 66 6f 6f 2f 62 | sed '\'|'s/foo/b|
|00002780| 61 72 2f 67 27 5c 27 27 | 20 7c 20 6d 6f 72 65 2e |ar/g'\''| | more.|
|00002790| 20 28 52 65 6d 65 6d 62 | 65 72 20 74 68 61 74 20 | (Rememb|er that |
|000027a0| 73 65 64 20 6f 75 74 70 | 75 74 73 0a 58 65 61 63 |sed outp|uts.Xeac|
|000027b0| 68 20 6c 69 6e 65 20 6f | 6e 6c 79 20 61 66 74 65 |h line o|nly afte|
|000027c0| 72 20 69 74 20 72 65 63 | 65 69 76 65 73 20 74 68 |r it rec|eives th|
|000027d0| 65 20 6e 65 78 74 2e 29 | 20 54 72 79 20 74 68 65 |e next.)| Try the|
|000027e0| 20 73 61 6d 65 20 74 68 | 69 6e 67 20 77 69 74 68 | same th|ing with|
|000027f0| 6f 75 74 0a 58 70 74 79 | 2e 0a 58 0a 58 4e 6f 74 |out.Xpty|..X.XNot|
|00002800| 65 20 74 68 61 74 20 70 | 74 79 20 2d 30 20 63 61 |e that p|ty -0 ca|
|00002810| 6e 20 62 65 20 61 62 62 | 72 65 76 69 61 74 65 64 |n be abb|reviated|
|00002820| 20 61 73 20 63 6f 6e 64 | 6f 6d 2e 0a 58 27 0a 58 | as cond|om..X'.X|
|00002830| 0a 58 65 63 68 6f 20 27 | 2d 2d 2d 2d 2d 20 50 72 |.Xecho '|----- Pr|
|00002840| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|00002850| 6e 74 69 6e 75 65 2e 20 | 27 20 7c 20 74 72 20 2d |ntinue. |' | tr -|
|00002860| 64 20 27 5c 30 31 32 27 | 3b 20 72 65 61 64 20 63 |d '\012'|; read c|
|00002870| 6f 6e 74 6c 69 6e 65 0a | 58 0a 58 65 63 68 6f 20 |ontline.|X.Xecho |
|00002880| 27 0a 58 4e 65 78 74 2c | 20 74 72 79 20 75 73 69 |'.XNext,| try usi|
|00002890| 6e 67 20 74 68 65 20 72 | 65 70 6c 61 63 65 6d 65 |ng the r|eplaceme|
|000028a0| 6e 74 20 73 63 72 69 70 | 74 20 70 72 6f 67 72 61 |nt scrip|t progra|
|000028b0| 6d 2e 20 25 20 73 63 72 | 69 70 74 2e 20 54 79 70 |m. % scr|ipt. Typ|
|000028c0| 65 20 76 61 72 69 6f 75 | 73 0a 58 63 6f 6d 6d 61 |e variou|s.Xcomma|
|000028d0| 6e 64 73 3b 20 74 72 79 | 20 6c 6f 67 67 69 6e 67 |nds; try| logging|
|000028e0| 20 6f 6e 20 74 6f 20 61 | 6e 6f 74 68 65 72 20 74 | on to a|nother t|
|000028f0| 65 72 6d 69 6e 61 6c 20 | 61 6e 64 20 75 73 69 6e |erminal |and usin|
|00002900| 67 20 74 61 6c 6b 3b 20 | 6f 62 73 65 72 76 65 0a |g talk; |observe.|
|00002910| 58 74 68 61 74 20 79 6f | 75 27 5c 27 27 72 65 20 |Xthat yo|u'\''re |
|00002920| 6c 69 73 74 65 64 20 69 | 6e 20 2f 65 74 63 2f 75 |listed i|n /etc/u|
|00002930| 74 6d 70 2e 20 54 72 79 | 20 74 68 65 20 63 6c 6f |tmp. Try| the clo|
|00002940| 6e 65 73 20 6f 66 20 74 | 74 79 2c 20 6d 65 73 67 |nes of t|ty, mesg|
|00002950| 2c 20 62 69 66 66 2c 0a | 58 75 2c 20 77 61 6c 6c |, biff,.|Xu, wall|
|00002960| 2c 20 77 68 6f 2c 20 6c | 6f 63 6b 2e 20 28 54 72 |, who, l|ock. (Tr|
|00002970| 79 20 74 68 65 6d 20 75 | 6e 64 65 72 20 61 20 6e |y them u|nder a n|
|00002980| 6f 6e 2d 70 74 79 20 73 | 65 73 73 69 6f 6e 20 74 |on-pty s|ession t|
|00002990| 6f 6f 2e 29 0a 58 27 0a | 58 0a 58 65 63 68 6f 20 |oo.).X'.|X.Xecho |
|000029a0| 27 2d 2d 2d 2d 2d 20 50 | 72 65 73 73 20 72 65 74 |'----- P|ress ret|
|000029b0| 75 72 6e 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 2e |urn to c|ontinue.|
|000029c0| 20 27 20 7c 20 74 72 20 | 2d 64 20 27 5c 30 31 32 | ' | tr |-d '\012|
|000029d0| 27 3b 20 72 65 61 64 20 | 63 6f 6e 74 6c 69 6e 65 |'; read |contline|
|000029e0| 0a 58 0a 58 65 63 68 6f | 20 27 0a 58 4d 75 63 68 |.X.Xecho| '.XMuch|
|000029f0| 20 6f 66 20 74 68 65 20 | 66 75 6e 20 6f 66 20 70 | of the |fun of p|
|00002a00| 74 79 20 69 73 20 69 6e | 20 64 69 73 63 6f 6e 6e |ty is in| disconn|
|00002a10| 65 63 74 69 6e 67 20 61 | 6e 64 20 72 65 63 6f 6e |ecting a|nd recon|
|00002a20| 6e 65 63 74 69 6e 67 20 | 73 65 73 73 69 6f 6e 73 |necting |sessions|
|00002a30| 2e 0a 58 49 66 20 79 6f | 75 27 5c 27 27 72 65 20 |..XIf yo|u'\''re |
|00002a40| 61 6d 62 69 74 69 6f 75 | 73 2c 20 74 72 79 20 25 |ambitiou|s, try %|
|00002a50| 20 73 65 73 73 20 73 68 | 2e 20 5e 5a 20 77 69 6c | sess sh|. ^Z wil|
|00002a60| 6c 20 67 65 74 20 79 6f | 75 20 6f 75 74 20 61 6e |l get yo|u out an|
|00002a70| 64 20 62 61 63 6b 20 69 | 6e 2e 0a 58 54 72 79 20 |d back i|n..XTry |
|00002a80| 73 65 73 73 6e 61 6d 65 | 20 77 69 74 68 6f 75 74 |sessname| without|
|00002a90| 20 61 6e 20 61 72 67 75 | 6d 65 6e 74 3b 20 74 72 | an argu|ment; tr|
|00002aa0| 79 20 69 74 20 77 69 74 | 68 20 61 6e 20 61 72 67 |y it wit|h an arg|
|00002ab0| 75 6d 65 6e 74 2e 20 54 | 72 79 20 73 65 73 73 6c |ument. T|ry sessl|
|00002ac0| 69 73 74 2e 0a 58 46 69 | 6e 61 6c 6c 79 2c 20 74 |ist..XFi|nally, t|
|00002ad0| 72 79 20 24 20 64 69 73 | 63 6f 6e 6e 65 63 74 2c |ry $ dis|connect,|
|00002ae0| 20 61 6e 64 20 67 6f 20 | 6f 6e 20 74 6f 20 74 68 | and go |on to th|
|00002af0| 65 20 6e 65 78 74 20 70 | 61 72 74 20 6f 66 20 74 |e next p|art of t|
|00002b00| 68 69 73 20 73 63 72 69 | 70 74 2e 0a 58 27 0a 58 |his scri|pt..X'.X|
|00002b10| 0a 58 65 63 68 6f 20 27 | 2d 2d 2d 2d 2d 20 50 72 |.Xecho '|----- Pr|
|00002b20| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|00002b30| 6e 74 69 6e 75 65 2e 20 | 27 20 7c 20 74 72 20 2d |ntinue. |' | tr -|
|00002b40| 64 20 27 5c 30 31 32 27 | 3b 20 72 65 61 64 20 63 |d '\012'|; read c|
|00002b50| 6f 6e 74 6c 69 6e 65 0a | 58 0a 58 65 63 68 6f 20 |ontline.|X.Xecho |
|00002b60| 27 0a 58 41 6c 74 68 6f | 75 67 68 20 69 74 20 6c |'.XAltho|ugh it l|
|00002b70| 6f 6f 6b 73 20 6c 69 6b | 65 20 79 6f 75 72 20 73 |ooks lik|e your s|
|00002b80| 68 20 73 65 73 73 69 6f | 6e 20 68 61 73 20 66 69 |h sessio|n has fi|
|00002b90| 6e 69 73 68 65 64 2c 20 | 69 74 27 5c 27 27 73 20 |nished, |it'\''s |
|00002ba0| 61 63 74 75 61 6c 6c 79 | 0a 58 73 69 74 74 69 6e |actually|.Xsittin|
|00002bb0| 67 20 69 6e 20 6c 69 6d | 62 6f 2c 20 77 61 69 74 |g in lim|bo, wait|
|00002bc0| 69 6e 67 20 66 6f 72 20 | 79 6f 75 20 74 6f 20 72 |ing for |you to r|
|00002bd0| 65 63 6f 6e 6e 65 63 74 | 2e 20 59 6f 75 20 63 61 |econnect|. You ca|
|00002be0| 6e 20 73 74 69 6c 6c 20 | 73 65 65 20 69 74 0a 58 |n still |see it.X|
|00002bf0| 75 6e 64 65 72 20 77 68 | 6f 2c 20 73 65 73 73 6c |under wh|o, sessl|
|00002c00| 69 73 74 2c 20 6f 72 20 | 70 73 2e 20 4e 6f 77 20 |ist, or |ps. Now |
|00002c10| 74 72 79 20 25 20 73 65 | 73 73 20 72 65 63 6f 6e |try % se|ss recon|
|00002c20| 6e 65 63 74 20 71 37 20 | 20 6f 72 20 77 68 61 74 |nect q7 | or what|
|00002c30| 65 76 65 72 20 74 68 65 | 0a 58 65 78 74 65 6e 73 |ever the|.Xextens|
|00002c40| 69 6f 6e 20 6f 66 20 74 | 68 65 20 64 69 73 63 6f |ion of t|he disco|
|00002c50| 6e 6e 65 63 74 65 64 20 | 73 65 73 73 69 6f 6e 20 |nnected |session |
|00002c60| 69 73 3b 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 62 |is; you |should b|
|00002c70| 65 20 72 69 67 68 74 20 | 62 61 63 6b 20 69 6e 2e |e right |back in.|
|00002c80| 0a 58 0a 58 59 6f 75 20 | 63 61 6e 20 74 72 79 20 |.X.XYou |can try |
|00002c90| 74 68 65 20 73 61 6d 65 | 20 74 68 69 6e 67 20 62 |the same| thing b|
|00002ca0| 79 20 61 63 74 75 61 6c | 6c 79 20 68 61 6e 67 69 |y actual|ly hangi|
|00002cb0| 6e 67 20 75 70 20 79 6f | 75 72 20 63 6f 6e 6e 65 |ng up yo|ur conne|
|00002cc0| 63 74 69 6f 6e 2c 20 74 | 68 65 6e 0a 58 6c 6f 67 |ction, t|hen.Xlog|
|00002cd0| 67 69 6e 67 20 69 6e 20 | 61 67 61 69 6e 20 61 6e |ging in |again an|
|00002ce0| 64 20 72 65 63 6f 6e 6e | 65 63 74 69 6e 67 2e 0a |d reconn|ecting..|
|00002cf0| 58 27 0a 58 0a 58 65 63 | 68 6f 20 27 2d 2d 2d 2d |X'.X.Xec|ho '----|
|00002d00| 2d 20 50 72 65 73 73 20 | 72 65 74 75 72 6e 20 74 |- Press |return t|
|00002d10| 6f 20 63 6f 6e 74 69 6e | 75 65 2e 20 27 20 7c 20 |o contin|ue. ' | |
|00002d20| 74 72 20 2d 64 20 27 5c | 30 31 32 27 3b 20 72 65 |tr -d '\|012'; re|
|00002d30| 61 64 20 63 6f 6e 74 6c | 69 6e 65 0a 58 0a 58 65 |ad contl|ine.X.Xe|
|00002d40| 63 68 6f 20 27 0a 58 46 | 6f 72 20 6f 6e 65 20 66 |cho '.XF|or one f|
|00002d50| 69 6e 61 6c 20 74 72 69 | 63 6b 2c 0a 58 25 20 73 |inal tri|ck,.X% s|
|00002d60| 65 73 73 20 73 68 0a 58 | 24 20 50 53 31 3d 46 4f |ess sh.X|$ PS1=FO|
|00002d70| 4f 2e 3b 20 64 69 73 63 | 6f 6e 6e 65 63 74 0a 58 |O.; disc|onnect.X|
|00002d80| 25 20 73 65 73 73 20 73 | 68 0a 58 24 20 73 65 73 |% sess s|h.X$ ses|
|00002d90| 73 6c 69 73 74 0a 58 2e | 2e 2e 0a 58 24 20 50 53 |slist.X.|...X$ PS|
|00002da0| 31 3d 42 41 52 2e 3b 20 | 72 65 63 6f 6e 6e 65 63 |1=BAR.; |reconnec|
|00002db0| 74 20 71 37 3b 20 64 69 | 73 63 6f 6e 6e 65 63 74 |t q7; di|sconnect|
|00002dc0| 0a 58 46 4f 4f 2e 72 65 | 63 6f 6e 6e 65 63 74 20 |.XFOO.re|connect |
|00002dd0| 70 34 3b 20 64 69 73 63 | 6f 6e 6e 65 63 74 0a 58 |p4; disc|onnect.X|
|00002de0| 42 41 52 2e 72 65 63 6f | 6e 6e 65 63 74 20 71 37 |BAR.reco|nnect q7|
|00002df0| 3b 20 64 69 73 63 6f 6e | 6e 65 63 74 0a 58 46 4f |; discon|nect.XFO|
|00002e00| 4f 2e 65 63 68 6f 20 4e | 65 61 74 2c 20 66 6c 69 |O.echo N|eat, fli|
|00002e10| 70 70 69 6e 67 20 72 69 | 67 68 74 20 62 61 63 6b |pping ri|ght back|
|00002e20| 20 61 6e 64 20 66 6f 72 | 74 68 21 0a 58 27 0a 58 | and for|th!.X'.X|
|00002e30| 0a 58 65 63 68 6f 20 27 | 2d 2d 2d 2d 2d 20 50 72 |.Xecho '|----- Pr|
|00002e40| 65 73 73 20 72 65 74 75 | 72 6e 20 74 6f 20 63 6f |ess retu|rn to co|
|00002e50| 6e 74 69 6e 75 65 2e 20 | 27 20 7c 20 74 72 20 2d |ntinue. |' | tr -|
|00002e60| 64 20 27 5c 30 31 32 27 | 3b 20 72 65 61 64 20 63 |d '\012'|; read c|
|00002e70| 6f 6e 74 6c 69 6e 65 0a | 58 0a 58 65 63 68 6f 20 |ontline.|X.Xecho |
|00002e80| 27 0a 58 54 68 61 74 27 | 5c 27 27 73 20 69 74 21 |'.XThat'|\''s it!|
|00002e90| 20 4d 61 6b 65 20 73 75 | 72 65 20 74 68 65 20 6d | Make su|re the m|
|00002ea0| 61 6e 75 61 6c 20 70 61 | 67 65 73 20 61 6e 64 20 |anual pa|ges and |
|00002eb0| 70 72 6f 67 72 61 6d 73 | 20 61 72 65 20 65 61 73 |programs| are eas|
|00002ec0| 69 6c 79 0a 58 61 63 63 | 65 73 73 69 62 6c 65 2e |ily.Xacc|essible.|
|00002ed0| 20 54 6f 20 72 65 70 65 | 61 74 20 61 20 6e 6f 74 | To repe|at a not|
|00002ee0| 65 20 66 72 6f 6d 20 49 | 4e 53 54 41 4c 4c 3a 0a |e from I|NSTALL:.|
|00002ef0| 58 0a 58 49 66 20 79 6f | 75 20 6d 61 6b 65 20 69 |X.XIf yo|u make i|
|00002f00| 74 20 74 68 72 6f 75 67 | 68 20 69 6e 73 74 61 6c |t throug|h instal|
|00002f10| 6c 61 74 69 6f 6e 20 61 | 6e 64 20 74 65 73 74 69 |lation a|nd testi|
|00002f20| 6e 67 20 61 6e 64 20 67 | 65 74 20 70 74 79 20 72 |ng and g|et pty r|
|00002f30| 75 6e 6e 69 6e 67 2c 0a | 58 70 6c 65 61 73 65 20 |unning,.|Xplease |
|00002f40| 73 65 6e 64 20 61 20 6e | 6f 74 65 20 74 6f 20 74 |send a n|ote to t|
|00002f50| 68 65 20 61 75 74 68 6f | 72 2c 20 44 61 6e 20 42 |he autho|r, Dan B|
|00002f60| 65 72 6e 73 74 65 69 6e | 2c 20 6f 6e 20 74 68 65 |ernstein|, on the|
|00002f70| 20 49 6e 74 65 72 6e 65 | 74 0a 58 61 74 20 62 72 | Interne|t.Xat br|
|00002f80| 6e 73 74 6e 64 40 6e 79 | 75 2e 65 64 75 2e 20 4c |nstnd@ny|u.edu. L|
|00002f90| 65 74 20 68 69 6d 20 6b | 6e 6f 77 20 79 6f 75 72 |et him k|now your|
|00002fa0| 20 63 6f 6d 70 75 74 65 | 72 20 6d 6f 64 65 6c 2c | compute|r model,|
|00002fb0| 20 4f 53 20 76 65 72 73 | 69 6f 6e 2c 20 61 6e 64 | OS vers|ion, and|
|00002fc0| 0a 58 77 68 61 74 20 63 | 68 61 6e 67 65 73 20 79 |.Xwhat c|hanges y|
|00002fd0| 6f 75 20 68 61 64 20 74 | 6f 20 6d 61 6b 65 2e 20 |ou had t|o make. |
|00002fe0| 49 66 20 79 6f 75 20 68 | 61 76 65 20 61 6e 79 20 |If you h|ave any |
|00002ff0| 74 72 6f 75 62 6c 65 2c | 20 70 6c 65 61 73 65 20 |trouble,| please |
|00003000| 61 6c 73 6f 20 67 65 74 | 0a 58 69 6e 20 74 6f 75 |also get|.Xin tou|
|00003010| 63 68 20 77 69 74 68 20 | 74 68 65 20 61 75 74 68 |ch with |the auth|
|00003020| 6f 72 2e 20 49 66 20 79 | 6f 75 20 68 61 76 65 20 |or. If y|ou have |
|00003030| 61 20 64 69 66 66 65 72 | 65 6e 74 20 6b 69 6e 64 |a differ|ent kind|
|00003040| 20 6f 66 20 73 79 73 74 | 65 6d 20 77 69 74 68 0a | of syst|em with.|
|00003050| 58 70 73 65 75 64 6f 2d | 74 65 72 6d 69 6e 61 6c |Xpseudo-|terminal|
|00003060| 20 73 75 70 70 6f 72 74 | 20 74 68 61 74 20 63 6f | support| that co|
|00003070| 75 6c 64 20 75 73 65 20 | 61 20 70 74 79 20 70 6f |uld use |a pty po|
|00003080| 72 74 2c 20 74 68 65 20 | 61 75 74 68 6f 72 20 77 |rt, the |author w|
|00003090| 6f 75 6c 64 0a 58 6c 6f | 76 65 20 74 6f 20 68 65 |ould.Xlo|ve to he|
|000030a0| 61 72 20 61 62 6f 75 74 | 20 69 74 2e 0a 58 0a 58 |ar about| it..X.X|
|000030b0| 54 68 61 6e 6b 73 21 0a | 58 27 0a 45 4e 44 5f 4f |Thanks!.|X'.END_O|
|000030c0| 46 5f 46 49 4c 45 0a 20 | 20 69 66 20 74 65 73 74 |F_FILE. | if test|
|000030d0| 20 33 36 35 37 20 2d 6e | 65 20 60 77 63 20 2d 63 | 3657 -n|e `wc -c|
|000030e0| 20 3c 27 54 45 53 54 53 | 27 60 3b 20 74 68 65 6e | <'TESTS|'`; then|
|000030f0| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00003100| 5c 22 27 54 45 53 54 53 | 27 5c 22 20 75 6e 70 61 |\"'TESTS|'\" unpa|
|00003110| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00003120| 73 69 7a 65 21 0a 20 20 | 66 69 0a 20 20 23 20 65 |size!. |fi. # e|
|00003130| 6e 64 20 6f 66 20 27 54 | 45 53 54 53 27 0a 66 69 |nd of 'T|ESTS'.fi|
|00003140| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 70 61 74 |.if test| -f 'pat|
|00003150| 63 68 2f 4d 61 6b 65 66 | 69 6c 65 27 20 2d 61 20 |ch/Makef|ile' -a |
|00003160| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00003170| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00003180| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00003190| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|000031a0| 6c 65 20 5c 22 27 70 61 | 74 63 68 2f 4d 61 6b 65 |le \"'pa|tch/Make|
|000031b0| 66 69 6c 65 27 5c 22 0a | 65 6c 73 65 0a 20 20 65 |file'\".|else. e|
|000031c0| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|000031d0| 74 69 6e 67 20 5c 22 27 | 70 61 74 63 68 2f 4d 61 |ting \"'|patch/Ma|
|000031e0| 6b 65 66 69 6c 65 27 5c | 22 20 5c 28 32 38 31 33 |kefile'\|" \(2813|
|000031f0| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 20 20 | charact|ers\). |
|00003200| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 70 |sed "s/^|X//" >'p|
|00003210| 61 74 63 68 2f 4d 61 6b | 65 66 69 6c 65 27 20 3c |atch/Mak|efile' <|
|00003220| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00003230| 74 70 61 74 3a 20 74 70 | 61 74 31 0a 58 0a 58 74 |tpat: tp|at1.X.Xt|
|00003240| 70 61 74 31 3a 20 69 67 | 6e 74 74 0a 58 09 65 63 |pat1: ig|ntt.X.ec|
|00003250| 68 6f 20 27 31 2e 20 47 | 65 74 20 74 68 65 20 6e |ho '1. G|et the n|
|00003260| 65 77 20 74 65 6c 6e 65 | 74 64 20 66 72 6f 6d 20 |ew telne|td from |
|00003270| 75 63 62 61 72 70 61 2e | 62 65 72 6b 65 6c 65 79 |ucbarpa.|berkeley|
|00003280| 2e 65 64 75 3a 27 20 31 | 3e 26 32 0a 58 09 65 63 |.edu:' 1|>&2.X.ec|
|00003290| 68 6f 20 27 54 68 69 73 | 20 63 6f 6d 6d 61 6e 64 |ho 'This| command|
|000032a0| 20 77 69 6c 6c 20 72 65 | 74 72 69 65 76 65 20 74 | will re|trieve t|
|000032b0| 65 6c 6e 65 74 2e 39 30 | 2e 30 36 2e 32 38 2e 74 |elnet.90|.06.28.t|
|000032c0| 61 72 2e 5a 2e 27 20 31 | 3e 26 32 0a 58 09 65 63 |ar.Z.' 1|>&2.X.ec|
|000032d0| 68 6f 20 27 54 6f 20 65 | 78 65 63 75 74 65 20 69 |ho 'To e|xecute i|
|000032e0| 74 2c 20 6a 75 73 74 20 | 70 72 65 73 73 20 72 65 |t, just |press re|
|000032f0| 74 75 72 6e 2e 27 20 31 | 3e 26 32 0a 58 09 65 63 |turn.' 1|>&2.X.ec|
|00003300| 68 6f 20 27 54 6f 20 63 | 6f 6e 74 69 6e 75 65 2c |ho 'To c|ontinue,|
|00003310| 20 6a 75 73 74 20 6d 61 | 6b 65 20 74 70 61 74 32 | just ma|ke tpat2|
|00003320| 20 3e 20 2f 64 65 76 2f | 6e 75 6c 6c 2e 27 20 31 | > /dev/|null.' 1|
|00003330| 3e 26 32 0a 58 09 2e 2f | 69 67 6e 74 74 20 74 69 |>&2.X../|igntt ti|
|00003340| 6f 63 73 74 69 20 27 66 | 74 70 20 2d 6e 20 31 32 |ocsti 'f|tp -n 12|
|00003350| 38 2e 33 32 2e 31 33 30 | 2e 31 31 20 3c 20 54 45 |8.32.130|.11 < TE|
|00003360| 4c 4e 45 54 2e 46 54 50 | 27 0a 58 0a 58 74 70 61 |LNET.FTP|'.X.Xtpa|
|00003370| 74 32 3a 20 69 67 6e 74 | 74 0a 58 09 65 63 68 6f |t2: ignt|t.X.echo|
|00003380| 20 27 32 2e 20 55 6e 70 | 61 63 6b 20 74 65 6c 6e | '2. Unp|ack teln|
|00003390| 65 74 64 3a 27 20 31 3e | 26 32 0a 58 09 65 63 68 |etd:' 1>|&2.X.ech|
|000033a0| 6f 20 27 54 68 69 73 20 | 69 73 20 73 65 6c 66 2d |o 'This |is self-|
|000033b0| 65 78 70 6c 61 6e 61 74 | 6f 72 79 2e 20 59 6f 75 |explanat|ory. You|
|000033c0| 20 6d 61 79 20 77 61 6e | 74 20 74 61 72 20 78 76 | may wan|t tar xv|
|000033d0| 66 20 74 6f 20 73 65 65 | 20 61 20 66 69 6c 65 20 |f to see| a file |
|000033e0| 6c 69 73 74 2e 27 20 31 | 3e 26 32 0a 58 09 65 63 |list.' 1|>&2.X.ec|
|000033f0| 68 6f 20 27 54 6f 20 63 | 6f 6e 74 69 6e 75 65 2c |ho 'To c|ontinue,|
|00003400| 20 6a 75 73 74 20 6d 61 | 6b 65 20 74 70 61 74 33 | just ma|ke tpat3|
|00003410| 20 3e 20 2f 64 65 76 2f | 6e 75 6c 6c 2e 27 20 31 | > /dev/|null.' 1|
|00003420| 3e 26 32 0a 58 09 69 66 | 20 74 65 73 74 20 2d 66 |>&2.X.if| test -f|
|00003430| 20 74 65 6c 6e 65 74 2e | 39 30 2e 30 36 2e 32 38 | telnet.|90.06.28|
|00003440| 2e 74 61 72 2e 5a 20 3b | 5c 0a 58 09 74 68 65 6e |.tar.Z ;|\.X.then|
|00003450| 20 2e 2f 69 67 6e 74 74 | 20 74 69 6f 63 73 74 69 | ./igntt| tiocsti|
|00003460| 20 27 75 6e 63 6f 6d 70 | 72 65 73 73 20 3c 20 74 | 'uncomp|ress < t|
|00003470| 65 6c 6e 65 74 2e 39 30 | 2e 30 36 2e 32 38 2e 74 |elnet.90|.06.28.t|
|00003480| 61 72 2e 5a 20 7c 20 74 | 61 72 20 78 66 20 2d 27 |ar.Z | t|ar xf -'|
|00003490| 20 3b 5c 0a 58 09 65 6c | 73 65 20 65 63 68 6f 20 | ;\.X.el|se echo |
|000034a0| 27 41 61 63 6b 21 20 74 | 65 6c 6e 65 74 2e 39 30 |'Aack! t|elnet.90|
|000034b0| 2e 30 36 2e 32 38 2e 74 | 61 72 2e 5a 20 64 6f 65 |.06.28.t|ar.Z doe|
|000034c0| 73 6e 27 5c 27 27 74 20 | 65 78 69 73 74 21 27 20 |sn'\''t |exist!' |
|000034d0| 3b 5c 0a 58 09 66 69 0a | 58 0a 58 74 70 61 74 33 |;\.X.fi.|X.Xtpat3|
|000034e0| 3a 20 69 67 6e 74 74 0a | 58 09 65 63 68 6f 20 27 |: igntt.|X.echo '|
|000034f0| 33 2e 20 41 70 70 6c 79 | 20 74 68 65 73 65 20 70 |3. Apply| these p|
|00003500| 61 74 63 68 65 73 2c 20 | 61 6e 64 20 63 68 65 63 |atches, |and chec|
|00003510| 6b 20 74 68 61 74 20 74 | 68 65 79 27 5c 27 27 72 |k that t|hey'\''r|
|00003520| 65 20 73 61 66 65 3a 27 | 20 31 3e 26 32 0a 58 09 |e safe:'| 1>&2.X.|
|00003530| 65 63 68 6f 20 27 49 66 | 20 61 6c 6c 20 67 6f 65 |echo 'If| all goe|
|00003540| 73 20 77 65 6c 6c 2c 20 | 79 6f 75 20 73 68 6f 75 |s well, |you shou|
|00003550| 6c 64 20 73 65 65 20 61 | 20 66 6c 6f 6f 64 20 6f |ld see a| flood o|
|00003560| 66 20 73 75 63 63 65 73 | 73 66 75 6c 20 70 61 74 |f succes|sful pat|
|00003570| 63 68 20 6f 75 74 70 75 | 74 2e 27 20 31 3e 26 32 |ch outpu|t.' 1>&2|
|00003580| 0a 58 09 65 63 68 6f 20 | 27 54 68 65 20 75 6e 69 |.X.echo |'The uni|
|00003590| 66 64 65 66 73 20 61 72 | 65 20 74 6f 20 63 68 65 |fdefs ar|e to che|
|000035a0| 63 6b 20 74 68 65 20 73 | 61 66 65 74 79 20 6f 66 |ck the s|afety of|
|000035b0| 20 74 68 65 20 70 61 74 | 63 68 65 73 3b 27 20 31 | the pat|ches;' 1|
|000035c0| 3e 26 32 0a 58 09 65 63 | 68 6f 20 27 61 73 20 79 |>&2.X.ec|ho 'as y|
|000035d0| 6f 75 20 77 69 6c 6c 20 | 73 65 65 2c 20 74 68 65 |ou will |see, the|
|000035e0| 20 70 61 74 63 68 65 73 | 20 64 6f 20 6e 6f 74 68 | patches| do noth|
|000035f0| 69 6e 67 20 77 69 74 68 | 20 55 53 45 50 54 59 20 |ing with| USEPTY |
|00003600| 75 6e 64 65 66 69 6e 65 | 64 2e 27 20 31 3e 26 32 |undefine|d.' 1>&2|
|00003610| 0a 58 09 65 63 68 6f 20 | 27 54 6f 20 63 6f 6e 74 |.X.echo |'To cont|
|00003620| 69 6e 75 65 2c 20 6a 75 | 73 74 20 6d 61 6b 65 20 |inue, ju|st make |
|00003630| 74 70 61 74 34 20 3e 20 | 2f 64 65 76 2f 6e 75 6c |tpat4 > |/dev/nul|
|00003640| 6c 2e 27 20 31 3e 26 32 | 0a 58 09 69 66 20 74 65 |l.' 1>&2|.X.if te|
|00003650| 73 74 20 2d 64 20 74 65 | 6c 6e 65 74 2e 39 30 2e |st -d te|lnet.90.|
|00003660| 30 36 2e 32 38 20 3b 5c | 0a 58 09 74 68 65 6e 20 |06.28 ;\|.X.then |
|00003670| 2e 2f 69 67 6e 74 74 20 | 74 69 6f 63 73 74 69 20 |./igntt |tiocsti |
|00003680| 27 63 64 20 74 65 6c 6e | 65 74 2e 39 30 2e 30 36 |'cd teln|et.90.06|
|00003690| 2e 32 38 2f 74 65 6c 6e | 65 74 64 3b 20 27 20 5c |.28/teln|etd; ' \|
|000036a0| 0a 58 09 09 09 20 20 20 | 20 20 27 70 61 74 63 68 |.X... | 'patch|
|000036b0| 20 3c 20 2e 2e 2f 2e 2e | 2f 74 65 6c 6e 65 74 64 | < ../..|/telnetd|
|000036c0| 2e 39 30 2e 30 36 2e 32 | 38 2e 70 61 74 63 68 3b |.90.06.2|8.patch;|
|000036d0| 20 27 20 5c 0a 58 09 09 | 09 20 20 20 20 20 27 75 | ' \.X..|. 'u|
|000036e0| 6e 69 66 64 65 66 20 2d | 55 55 53 45 50 54 59 20 |nifdef -|UUSEPTY |
|000036f0| 73 79 73 5f 74 65 72 6d | 2e 63 20 7c 20 63 6d 70 |sys_term|.c | cmp|
|00003700| 20 2d 20 73 79 73 5f 74 | 65 72 6d 2e 63 2e 6f 72 | - sys_t|erm.c.or|
|00003710| 69 67 3b 20 27 20 5c 0a | 58 09 09 09 20 20 20 20 |ig; ' \.|X... |
|00003720| 20 27 75 6e 69 66 64 65 | 66 20 2d 55 55 53 45 50 | 'unifde|f -UUSEP|
|00003730| 54 59 20 74 65 6c 6e 65 | 74 64 2e 63 20 7c 20 63 |TY telne|td.c | c|
|00003740| 6d 70 20 2d 20 74 65 6c | 6e 65 74 64 2e 63 2e 6f |mp - tel|netd.c.o|
|00003750| 72 69 67 3b 20 27 20 5c | 0a 58 09 09 09 20 20 20 |rig; ' \|.X... |
|00003760| 20 20 27 75 6e 69 66 64 | 65 66 20 2d 55 55 53 45 | 'unifd|ef -UUSE|
|00003770| 50 54 59 20 70 61 74 68 | 6e 61 6d 65 73 2e 68 20 |PTY path|names.h |
|00003780| 7c 20 63 6d 70 20 2d 20 | 70 61 74 68 6e 61 6d 65 || cmp - |pathname|
|00003790| 73 2e 68 2e 6f 72 69 67 | 3b 20 27 20 5c 0a 58 09 |s.h.orig|; ' \.X.|
|000037a0| 09 09 20 20 20 20 20 27 | 63 64 20 2e 2e 2f 2e 2e |.. '|cd ../..|
|000037b0| 27 20 3b 5c 0a 58 09 66 | 69 0a 58 0a 58 74 70 61 |' ;\.X.f|i.X.Xtpa|
|000037c0| 74 34 3a 20 69 67 6e 74 | 74 0a 58 09 65 63 68 6f |t4: ignt|t.X.echo|
|000037d0| 20 27 34 2e 20 43 68 65 | 63 6b 20 74 68 65 20 70 | '4. Che|ck the p|
|000037e0| 74 79 20 70 61 74 68 6e | 61 6d 65 20 61 6e 64 20 |ty pathn|ame and |
|000037f0| 66 69 78 20 69 74 20 69 | 66 20 6e 65 63 65 73 73 |fix it i|f necess|
|00003800| 61 72 79 3a 27 20 31 3e | 26 32 0a 58 09 65 63 68 |ary:' 1>|&2.X.ech|
|00003810| 6f 20 27 53 69 6e 63 65 | 20 74 68 65 72 65 20 69 |o 'Since| there i|
|00003820| 73 20 6e 6f 20 73 74 61 | 6e 64 61 72 64 20 6c 69 |s no sta|ndard li|
|00003830| 6b 65 20 2f 69 6e 73 74 | 20 66 6f 72 20 77 68 65 |ke /inst| for whe|
|00003840| 72 65 20 70 72 6f 67 72 | 61 6d 73 20 67 6f 2c 27 |re progr|ams go,'|
|00003850| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 79 6f | 1>&2.X.|echo 'yo|
|00003860| 75 20 68 61 64 20 62 65 | 74 74 65 72 20 6d 61 6b |u had be|tter mak|
|00003870| 65 20 73 75 72 65 20 74 | 65 6c 6e 65 74 64 27 73 |e sure t|elnetd's|
|00003880| 20 70 61 74 68 6e 61 6d | 65 73 2e 68 20 69 73 20 | pathnam|es.h is |
|00003890| 63 6f 72 72 65 63 74 2e | 27 20 31 3e 26 32 0a 58 |correct.|' 1>&2.X|
|000038a0| 09 65 63 68 6f 20 27 54 | 6f 20 63 6f 6e 74 69 6e |.echo 'T|o contin|
|000038b0| 75 65 2c 20 6a 75 73 74 | 20 6d 61 6b 65 20 74 70 |ue, just| make tp|
|000038c0| 61 74 35 20 3e 20 2f 64 | 65 76 2f 6e 75 6c 6c 2e |at5 > /d|ev/null.|
|000038d0| 27 20 31 3e 26 32 0a 58 | 09 2e 2f 69 67 6e 74 74 |' 1>&2.X|../igntt|
|000038e0| 20 74 69 6f 63 73 74 69 | 20 27 67 72 65 70 20 50 | tiocsti| 'grep P|
|000038f0| 41 54 48 5f 50 54 59 20 | 74 65 6c 6e 65 74 2e 39 |ATH_PTY |telnet.9|
|00003900| 30 2e 30 36 2e 32 38 2f | 74 65 6c 6e 65 74 64 2f |0.06.28/|telnetd/|
|00003910| 70 61 74 68 6e 61 6d 65 | 73 2e 68 27 0a 58 0a 58 |pathname|s.h'.X.X|
|00003920| 74 70 61 74 35 3a 20 69 | 67 6e 74 74 0a 58 09 65 |tpat5: i|gntt.X.e|
|00003930| 63 68 6f 20 27 35 2e 20 | 41 64 64 20 73 6f 63 6b |cho '5. |Add sock|
|00003940| 2e 6f 20 61 6e 64 20 73 | 6f 63 6b 2e 68 20 73 79 |.o and s|ock.h sy|
|00003950| 6d 6c 69 6e 6b 73 3a 27 | 20 31 3e 26 32 0a 58 09 |mlinks:'| 1>&2.X.|
|00003960| 65 63 68 6f 20 27 54 68 | 69 73 20 69 73 20 73 65 |echo 'Th|is is se|
|00003970| 6c 66 2d 65 78 70 6c 61 | 6e 61 74 6f 72 79 2e 27 |lf-expla|natory.'|
|00003980| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 54 6f | 1>&2.X.|echo 'To|
|00003990| 20 63 6f 6e 74 69 6e 75 | 65 2c 20 6a 75 73 74 20 | continu|e, just |
|000039a0| 6d 61 6b 65 20 74 70 61 | 74 36 20 3e 20 2f 64 65 |make tpa|t6 > /de|
|000039b0| 76 2f 6e 75 6c 6c 2e 27 | 20 31 3e 26 32 0a 58 09 |v/null.'| 1>&2.X.|
|000039c0| 2e 2f 69 67 6e 74 74 20 | 74 69 6f 63 73 74 69 20 |./igntt |tiocsti |
|000039d0| 27 6c 6e 20 2d 73 20 2e | 2e 2f 2e 2e 2f 2e 2e 2f |'ln -s .|./../../|
|000039e0| 73 6f 63 6b 2e 7b 68 2c | 6f 7d 20 74 65 6c 6e 65 |sock.{h,|o} telne|
|000039f0| 74 2e 39 30 2e 30 36 2e | 32 38 2f 74 65 6c 6e 65 |t.90.06.|28/telne|
|00003a00| 74 64 27 0a 58 0a 58 74 | 70 61 74 36 3a 20 69 67 |td'.X.Xt|pat6: ig|
|00003a10| 6e 74 74 0a 58 09 65 63 | 68 6f 20 27 36 2e 20 50 |ntt.X.ec|ho '6. P|
|00003a20| 72 65 70 61 72 69 6e 67 | 20 66 6f 72 20 63 6f 6d |reparing| for com|
|00003a30| 70 69 6c 65 3a 20 45 64 | 69 74 20 4d 61 6b 65 66 |pile: Ed|it Makef|
|00003a40| 69 6c 65 20 61 6e 64 20 | 4d 61 6b 65 66 69 6c 65 |ile and |Makefile|
|00003a50| 2e 67 65 6e 65 72 69 63 | 2e 27 20 31 3e 26 32 0a |.generic|.' 1>&2.|
|00003a60| 58 09 65 63 68 6f 20 27 | 59 6f 75 20 6d 75 73 74 |X.echo '|You must|
|00003a70| 20 61 74 20 6c 65 61 73 | 74 20 61 64 64 20 2d 44 | at leas|t add -D|
|00003a80| 55 53 45 50 54 59 20 74 | 6f 20 43 46 4c 41 47 53 |USEPTY t|o CFLAGS|
|00003a90| 20 61 6e 64 20 73 6f 63 | 6b 2e 6f 20 74 6f 20 4f | and soc|k.o to O|
|00003aa0| 42 4a 53 27 20 31 3e 26 | 32 0a 58 09 65 63 68 6f |BJS' 1>&|2.X.echo|
|00003ab0| 20 27 69 6e 20 4d 61 6b | 65 66 69 6c 65 2e 67 65 | 'in Mak|efile.ge|
|00003ac0| 6e 65 72 69 63 2e 27 20 | 31 3e 26 32 0a 58 09 65 |neric.' |1>&2.X.e|
|00003ad0| 63 68 6f 20 27 74 65 6c | 6e 65 74 64 20 69 73 6e |cho 'tel|netd isn|
|00003ae0| 27 5c 27 27 74 20 74 6f | 6f 20 68 69 67 68 20 6f |'\''t to|o high o|
|00003af0| 6e 20 74 68 65 20 70 6f | 72 74 61 62 69 6c 69 74 |n the po|rtabilit|
|00003b00| 79 20 73 63 61 6c 65 2c | 20 73 6f 20 79 6f 75 27 |y scale,| so you'|
|00003b10| 20 31 3e 26 32 0a 58 09 | 65 63 68 6f 20 27 6d 61 | 1>&2.X.|echo 'ma|
|00003b20| 79 20 68 61 76 65 20 74 | 6f 20 6d 61 6b 65 20 71 |y have t|o make q|
|00003b30| 75 69 74 65 20 61 20 66 | 65 77 20 6d 6f 72 65 20 |uite a f|ew more |
|00003b40| 63 68 61 6e 67 65 73 2e | 27 20 31 3e 26 32 0a 58 |changes.|' 1>&2.X|
|00003b50| 09 65 63 68 6f 20 27 41 | 6e 79 77 61 79 2c 20 6d |.echo 'A|nyway, m|
|00003b60| 61 6b 65 20 74 70 61 74 | 37 20 3e 20 2f 64 65 76 |ake tpat|7 > /dev|
|00003b70| 2f 6e 75 6c 6c 20 74 6f | 20 63 6f 6e 74 69 6e 75 |/null to| continu|
|00003b80| 65 2e 27 20 31 3e 26 32 | 0a 58 09 2e 2f 69 67 6e |e.' 1>&2|.X../ign|
|00003b90| 74 74 20 74 69 6f 63 73 | 74 69 20 27 76 69 20 74 |tt tiocs|ti 'vi t|
|00003ba0| 65 6c 6e 65 74 2e 39 30 | 2e 30 36 2e 32 38 2f 74 |elnet.90|.06.28/t|
|00003bb0| 65 6c 6e 65 74 64 2f 4d | 61 6b 65 66 69 6c 65 2e |elnetd/M|akefile.|
|00003bc0| 67 65 6e 65 72 69 63 27 | 0a 58 0a 58 74 70 61 74 |generic'|.X.Xtpat|
|00003bd0| 37 3a 20 69 67 6e 74 74 | 0a 58 09 65 63 68 6f 20 |7: igntt|.X.echo |
|00003be0| 27 37 2e 20 43 6f 6d 70 | 69 6c 65 21 27 20 31 3e |'7. Comp|ile!' 1>|
|00003bf0| 26 32 0a 58 09 65 63 68 | 6f 20 27 41 73 20 65 78 |&2.X.ech|o 'As ex|
|00003c00| 70 6c 61 69 6e 65 64 20 | 69 6e 20 74 68 65 20 74 |plained |in the t|
|00003c10| 65 6c 6e 65 74 64 20 73 | 6f 75 72 63 65 20 64 6f |elnetd s|ource do|
|00003c20| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 2c 20 79 6f 75 |cumentat|ion, you|
|00003c30| 20 68 61 76 65 27 20 31 | 3e 26 32 0a 58 09 65 63 | have' 1|>&2.X.ec|
|00003c40| 68 6f 20 27 74 6f 20 70 | 72 6f 76 69 64 65 20 74 |ho 'to p|rovide t|
|00003c50| 68 65 20 6d 61 63 68 69 | 6e 65 20 6e 61 6d 65 20 |he machi|ne name |
|00003c60| 74 6f 20 6d 61 6b 65 2e | 20 55 6e 64 65 72 20 53 |to make.| Under S|
|00003c70| 75 6e 4f 53 20 34 2e 30 | 2e 33 2c 27 20 31 3e 26 |unOS 4.0|.3,' 1>&|
|00003c80| 32 0a 58 09 65 63 68 6f | 20 27 79 6f 75 20 63 61 |2.X.echo| 'you ca|
|00003c90| 6e 20 6a 75 73 74 20 70 | 72 65 73 73 20 72 65 74 |n just p|ress ret|
|00003ca0| 75 72 6e 20 68 65 72 65 | 2e 27 20 31 3e 26 32 0a |urn here|.' 1>&2.|
|00003cb0| 58 09 65 63 68 6f 20 27 | 57 68 65 6e 20 61 6e 64 |X.echo '|When and|
|00003cc0| 20 69 66 20 74 68 69 73 | 20 73 75 63 63 65 65 64 | if this| succeed|
|00003cd0| 73 2c 20 67 6f 20 74 6f | 20 73 74 65 70 20 38 20 |s, go to| step 8 |
|00003ce0| 6f 66 20 52 45 41 44 4d | 45 2e 27 20 31 3e 26 32 |of READM|E.' 1>&2|
|00003cf0| 0a 58 09 2e 2f 69 67 6e | 74 74 20 74 69 6f 63 73 |.X../ign|tt tiocs|
|00003d00| 74 69 20 27 28 20 63 64 | 20 74 65 6c 6e 65 74 2e |ti '( cd| telnet.|
|00003d10| 39 30 2e 30 36 2e 32 38 | 2f 74 65 6c 6e 65 74 64 |90.06.28|/telnetd|
|00003d20| 3b 20 28 64 61 74 65 3b | 6d 61 6b 65 20 73 75 6e |; (date;|make sun|
|00003d30| 34 2e 30 29 20 3e 3e 26 | 4d 61 6b 65 6c 6f 67 20 |4.0) >>&|Makelog |
|00003d40| 29 20 26 27 0a 58 0a 58 | 69 67 6e 74 74 3a 20 69 |) &'.X.X|igntt: i|
|00003d50| 67 6e 74 74 2e 63 0a 58 | 09 63 63 20 2d 6f 20 69 |gntt.c.X|.cc -o i|
|00003d60| 67 6e 74 74 20 69 67 6e | 74 74 2e 63 0a 45 4e 44 |gntt ign|tt.c.END|
|00003d70| 5f 4f 46 5f 46 49 4c 45 | 0a 20 20 69 66 20 74 65 |_OF_FILE|. if te|
|00003d80| 73 74 20 32 38 31 33 20 | 2d 6e 65 20 60 77 63 20 |st 2813 |-ne `wc |
|00003d90| 2d 63 20 3c 27 70 61 74 | 63 68 2f 4d 61 6b 65 66 |-c <'pat|ch/Makef|
|00003da0| 69 6c 65 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |ile'`; t|hen. |
|00003db0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 70 61 |echo sha|r: \"'pa|
|00003dc0| 74 63 68 2f 4d 61 6b 65 | 66 69 6c 65 27 5c 22 20 |tch/Make|file'\" |
|00003dd0| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00003de0| 6f 6e 67 20 73 69 7a 65 | 21 0a 20 20 66 69 0a 20 |ong size|!. fi. |
|00003df0| 20 23 20 65 6e 64 20 6f | 66 20 27 70 61 74 63 68 | # end o|f 'patch|
|00003e00| 2f 4d 61 6b 65 66 69 6c | 65 27 0a 66 69 0a 69 66 |/Makefil|e'.fi.if|
|00003e10| 20 74 65 73 74 20 2d 66 | 20 27 70 61 74 63 68 2f | test -f| 'patch/|
|00003e20| 52 45 41 44 4d 45 27 20 | 2d 61 20 22 24 7b 31 7d |README' |-a "${1}|
|00003e30| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00003e40| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00003e50| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00003e60| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00003e70| 27 70 61 74 63 68 2f 52 | 45 41 44 4d 45 27 5c 22 |'patch/R|EADME'\"|
|00003e80| 0a 65 6c 73 65 0a 20 20 | 65 63 68 6f 20 73 68 61 |.else. |echo sha|
|00003e90| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00003ea0| 27 70 61 74 63 68 2f 52 | 45 41 44 4d 45 27 5c 22 |'patch/R|EADME'\"|
|00003eb0| 20 5c 28 34 37 37 37 20 | 63 68 61 72 61 63 74 65 | \(4777 |characte|
|00003ec0| 72 73 5c 29 0a 20 20 73 | 65 64 20 22 73 2f 5e 58 |rs\). s|ed "s/^X|
|00003ed0| 2f 2f 22 20 3e 27 70 61 | 74 63 68 2f 52 45 41 44 |//" >'pa|tch/READ|
|00003ee0| 4d 45 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |ME' <<'E|ND_OF_FI|
|00003ef0| 4c 45 27 0a 58 41 74 20 | 74 68 65 20 6d 6f 6d 65 |LE'.XAt |the mome|
|00003f00| 6e 74 2c 20 74 68 65 20 | 6f 6e 6c 79 20 74 68 69 |nt, the |only thi|
|00003f10| 6e 67 20 68 65 72 65 20 | 69 73 20 74 65 6c 6e 65 |ng here |is telne|
|00003f20| 74 64 2e 39 30 2e 30 36 | 2e 32 38 2e 70 61 74 63 |td.90.06|.28.patc|
|00003f30| 68 2e 20 49 74 27 73 0a | 58 70 75 62 6c 69 63 20 |h. It's.|Xpublic |
|00003f40| 64 6f 6d 61 69 6e 2e 0a | 58 0a 58 74 65 6c 6e 65 |domain..|X.Xtelne|
|00003f50| 74 64 2e 39 30 2e 30 36 | 2e 32 38 2e 70 61 74 63 |td.90.06|.28.patc|
|00003f60| 68 20 69 73 20 61 20 73 | 61 66 65 20 70 61 74 63 |h is a s|afe patc|
|00003f70| 68 20 74 6f 20 74 68 65 | 20 74 65 6c 6e 65 74 64 |h to the| telnetd|
|00003f80| 20 73 6f 75 72 63 65 20 | 69 6e 0a 58 74 65 6c 6e | source |in.Xteln|
|00003f90| 65 74 2e 39 30 2e 30 36 | 2e 32 38 20 6f 6e 20 75 |et.90.06|.28 on u|
|00003fa0| 63 62 61 72 70 61 2e 62 | 65 72 6b 65 6c 65 79 2e |cbarpa.b|erkeley.|
|00003fb0| 65 64 75 20 28 31 32 38 | 2e 33 32 2e 31 33 30 2e |edu (128|.32.130.|
|00003fc0| 31 31 29 2e 20 60 60 53 | 61 66 65 27 27 20 6d 65 |11). ``S|afe'' me|
|00003fd0| 61 6e 73 0a 58 74 68 61 | 74 20 65 76 65 72 79 20 |ans.Xtha|t every |
|00003fe0| 66 69 6c 65 20 63 6f 6d | 70 69 6c 65 73 20 65 78 |file com|piles ex|
|00003ff0| 61 63 74 6c 79 20 74 68 | 65 20 73 61 6d 65 20 69 |actly th|e same i|
|00004000| 66 20 55 53 45 50 54 59 | 20 69 73 20 6e 6f 74 20 |f USEPTY| is not |
|00004010| 64 65 66 69 6e 65 64 3b | 0a 58 79 6f 75 20 63 61 |defined;|.Xyou ca|
|00004020| 6e 20 61 70 70 6c 79 20 | 74 68 65 20 70 61 74 63 |n apply |the patc|
|00004030| 68 20 77 69 74 68 6f 75 | 74 20 61 6e 79 20 77 6f |h withou|t any wo|
|00004040| 72 72 79 20 6f 66 20 6d | 65 73 73 69 6e 67 20 75 |rry of m|essing u|
|00004050| 70 20 79 6f 75 72 20 73 | 6f 75 72 63 65 2e 0a 58 |p your s|ource..X|
|00004060| 0a 58 57 68 61 74 20 66 | 6f 6c 6c 6f 77 73 20 69 |.XWhat f|ollows i|
|00004070| 73 20 61 6e 20 6f 75 74 | 6c 69 6e 65 20 6f 66 20 |s an out|line of |
|00004080| 68 6f 77 20 74 6f 20 61 | 70 70 6c 79 20 74 68 65 |how to a|pply the|
|00004090| 20 70 61 74 63 68 20 61 | 6e 64 20 65 6e 61 62 6c | patch a|nd enabl|
|000040a0| 65 20 69 74 2e 20 41 0a | 58 70 61 74 63 68 65 64 |e it. A.|Xpatched|
|000040b0| 20 74 65 6c 6e 65 74 64 | 20 75 73 65 73 20 70 74 | telnetd| uses pt|
|000040c0| 79 20 74 6f 20 6d 61 6e | 61 67 65 20 73 65 73 73 |y to man|age sess|
|000040d0| 69 6f 6e 73 2c 20 73 6f | 20 74 68 61 74 20 75 73 |ions, so| that us|
|000040e0| 65 72 73 20 63 61 6e 20 | 65 61 73 69 6c 79 0a 58 |ers can |easily.X|
|000040f0| 64 69 73 63 6f 6e 6e 65 | 63 74 20 61 6e 64 20 72 |disconne|ct and r|
|00004100| 65 63 6f 6e 6e 65 63 74 | 20 6c 6f 67 69 6e 20 73 |econnect| login s|
|00004110| 65 73 73 69 6f 6e 73 2e | 20 59 6f 75 20 2a 6d 75 |essions.| You *mu|
|00004120| 73 74 2a 20 68 61 76 65 | 20 63 6f 6d 70 69 6c 65 |st* have| compile|
|00004130| 64 20 66 69 6c 65 0a 58 | 64 65 73 63 72 69 70 74 |d file.X|descript|
|00004140| 6f 72 20 70 61 73 73 69 | 6e 67 20 69 6e 74 6f 20 |or passi|ng into |
|00004150| 70 74 79 20 66 6f 72 20 | 74 68 69 73 20 74 6f 20 |pty for |this to |
|00004160| 77 6f 72 6b 3b 20 74 65 | 6c 6e 65 74 64 20 6e 65 |work; te|lnetd ne|
|00004170| 65 64 73 20 74 6f 20 67 | 65 74 20 74 68 65 0a 58 |eds to g|et the.X|
|00004180| 70 73 65 75 64 6f 2d 74 | 65 72 6d 69 6e 61 6c 20 |pseudo-t|erminal |
|00004190| 64 65 73 63 72 69 70 74 | 6f 72 73 20 66 72 6f 6d |descript|ors from|
|000041a0| 20 70 74 79 2e 20 47 69 | 76 65 6e 20 66 64 20 70 | pty. Gi|ven fd p|
|000041b0| 61 73 73 69 6e 67 2c 20 | 74 68 6f 75 67 68 2c 20 |assing, |though, |
|000041c0| 74 68 65 0a 58 70 61 74 | 63 68 65 64 20 74 65 6c |the.Xpat|ched tel|
|000041d0| 6e 65 74 64 20 67 69 76 | 65 73 20 79 6f 75 20 74 |netd giv|es you t|
|000041e0| 68 65 20 2a 66 75 6c 6c | 2a 20 65 66 66 69 63 69 |he *full|* effici|
|000041f0| 65 6e 63 79 20 6f 66 20 | 74 68 65 20 75 6e 70 61 |ency of |the unpa|
|00004200| 74 63 68 65 64 0a 58 76 | 65 72 73 69 6f 6e 2c 20 |tched.Xv|ersion, |
|00004210| 65 76 65 6e 20 66 6f 72 | 20 72 65 63 6f 6e 6e 65 |even for| reconne|
|00004220| 63 74 65 64 20 73 65 73 | 73 69 6f 6e 73 21 0a 58 |cted ses|sions!.X|
|00004230| 0a 58 0a 58 48 65 72 65 | 27 73 20 77 68 61 74 20 |.X.XHere|'s what |
|00004240| 74 6f 20 64 6f 2e 20 49 | 66 20 79 6f 75 20 68 61 |to do. I|f you ha|
|00004250| 76 65 20 74 68 65 20 74 | 69 6f 63 73 74 69 20 75 |ve the t|iocsti u|
|00004260| 74 69 6c 69 74 79 20 69 | 6e 73 74 61 6c 6c 65 64 |tility i|nstalled|
|00004270| 2c 20 74 72 79 0a 58 60 | 60 6d 61 6b 65 20 3e 20 |, try.X`|`make > |
|00004280| 2f 64 65 76 2f 6e 75 6c | 6c 27 27 20 69 6e 20 74 |/dev/nul|l'' in t|
|00004290| 68 69 73 20 64 69 72 65 | 63 74 6f 72 79 3b 20 6f |his dire|ctory; o|
|000042a0| 72 20 6a 75 73 74 20 72 | 65 61 64 20 74 68 72 6f |r just r|ead thro|
|000042b0| 75 67 68 20 74 68 65 73 | 65 0a 58 69 6e 73 74 72 |ugh thes|e.Xinstr|
|000042c0| 75 63 74 69 6f 6e 73 2e | 20 54 68 65 20 75 73 75 |uctions.| The usu|
|000042d0| 61 6c 20 77 61 72 6e 69 | 6e 67 3a 20 4c 69 6b 65 |al warni|ng: Like|
|000042e0| 20 61 6c 6c 20 73 6f 66 | 74 77 61 72 65 2c 20 74 | all sof|tware, t|
|000042f0| 68 69 73 20 63 6f 6d 65 | 73 20 77 69 74 68 0a 58 |his come|s with.X|
|00004300| 61 6c 6c 20 77 61 72 72 | 61 6e 74 69 65 73 20 64 |all warr|anties d|
|00004310| 69 73 63 6c 61 69 6d 65 | 64 2c 20 74 6f 20 74 68 |isclaime|d, to th|
|00004320| 65 20 65 78 74 65 6e 74 | 20 70 65 72 6d 69 74 74 |e extent| permitt|
|00004330| 65 64 20 62 79 20 61 70 | 70 6c 69 63 61 62 6c 65 |ed by ap|plicable|
|00004340| 20 6c 61 77 2e 0a 58 0a | 58 0a 58 31 2e 20 47 65 | law..X.|X.X1. Ge|
|00004350| 74 20 74 68 65 20 6e 65 | 77 20 74 65 6c 6e 65 74 |t the ne|w telnet|
|00004360| 64 3a 0a 58 0a 58 20 20 | 25 20 66 74 70 20 2d 6e |d:.X.X |% ftp -n|
|00004370| 20 31 32 38 2e 33 32 2e | 31 33 30 2e 31 31 20 3c | 128.32.|130.11 <|
|00004380| 20 54 45 4c 4e 45 54 2e | 46 54 50 0a 58 0a 58 32 | TELNET.|FTP.X.X2|
|00004390| 2e 20 55 6e 70 61 63 6b | 20 69 74 3a 0a 58 0a 58 |. Unpack| it:.X.X|
|000043a0| 20 20 25 20 75 6e 63 6f | 6d 70 72 65 73 73 20 3c | % unco|mpress <|
|000043b0| 20 74 65 6c 6e 65 74 2e | 39 30 2e 30 36 2e 32 38 | telnet.|90.06.28|
|000043c0| 2e 74 61 72 2e 5a 20 7c | 20 74 61 72 20 78 66 20 |.tar.Z || tar xf |
|000043d0| 2d 0a 58 0a 58 33 2e 20 | 41 70 70 6c 79 20 74 68 |-.X.X3. |Apply th|
|000043e0| 65 73 65 20 70 61 74 63 | 68 65 73 2c 20 61 6e 64 |ese patc|hes, and|
|000043f0| 20 63 68 65 63 6b 20 74 | 68 61 74 20 74 68 65 79 | check t|hat they|
|00004400| 27 72 65 20 73 61 66 65 | 3a 0a 58 0a 58 20 20 25 |'re safe|:.X.X %|
|00004410| 20 63 64 20 74 65 6c 6e | 65 74 2e 39 30 2e 30 36 | cd teln|et.90.06|
|00004420| 2e 32 38 2f 74 65 6c 6e | 65 74 64 0a 58 20 20 25 |.28/teln|etd.X %|
|00004430| 20 70 61 74 63 68 20 3c | 20 2e 2e 2f 2e 2e 2f 74 | patch <| ../../t|
|00004440| 65 6c 6e 65 74 64 2e 39 | 30 2e 30 36 2e 32 38 2e |elnetd.9|0.06.28.|
|00004450| 70 61 74 63 68 0a 58 20 | 20 25 20 75 6e 69 66 64 |patch.X | % unifd|
|00004460| 65 66 20 2d 55 55 53 45 | 50 54 59 20 73 79 73 5f |ef -UUSE|PTY sys_|
|00004470| 74 65 72 6d 2e 63 20 7c | 20 63 6d 70 20 2d 20 73 |term.c || cmp - s|
|00004480| 79 73 5f 74 65 72 6d 2e | 63 2e 6f 72 69 67 0a 58 |ys_term.|c.orig.X|
|00004490| 20 20 25 20 75 6e 69 66 | 64 65 66 20 2d 55 55 53 | % unif|def -UUS|
|000044a0| 45 50 54 59 20 74 65 6c | 6e 65 74 64 2e 63 20 7c |EPTY tel|netd.c ||
|000044b0| 20 63 6d 70 20 2d 20 74 | 65 6c 6e 65 74 64 2e 63 | cmp - t|elnetd.c|
|000044c0| 2e 6f 72 69 67 0a 58 20 | 20 25 20 75 6e 69 66 64 |.orig.X | % unifd|
|000044d0| 65 66 20 2d 55 55 53 45 | 50 54 59 20 70 61 74 68 |ef -UUSE|PTY path|
|000044e0| 6e 61 6d 65 73 2e 68 20 | 7c 20 63 6d 70 20 2d 20 |names.h || cmp - |
|000044f0| 70 61 74 68 6e 61 6d 65 | 73 2e 68 2e 6f 72 69 67 |pathname|s.h.orig|
|00004500| 0a 58 20 20 25 20 63 64 | 20 2e 2e 2f 2e 2e 0a 58 |.X % cd| ../...X|
|00004510| 0a 58 34 2e 20 43 68 65 | 63 6b 20 74 68 65 20 70 |.X4. Che|ck the p|
|00004520| 74 79 20 70 61 74 68 6e | 61 6d 65 20 61 6e 64 20 |ty pathn|ame and |
|00004530| 66 69 78 20 69 74 20 69 | 66 20 6e 65 63 65 73 73 |fix it i|f necess|
|00004540| 61 72 79 3a 0a 58 0a 58 | 20 20 25 20 67 72 65 70 |ary:.X.X| % grep|
|00004550| 20 50 41 54 48 5f 50 54 | 59 20 74 65 6c 6e 65 74 | PATH_PT|Y telnet|
|00004560| 2e 39 30 2e 30 36 2e 32 | 38 2f 74 65 6c 6e 65 74 |.90.06.2|8/telnet|
|00004570| 64 2f 70 61 74 68 6e 61 | 6d 65 73 2e 68 0a 58 0a |d/pathna|mes.h.X.|
|00004580| 58 35 2e 20 41 64 64 20 | 73 6f 63 6b 2e 6f 20 61 |X5. Add |sock.o a|
|00004590| 6e 64 20 73 6f 63 6b 2e | 68 20 73 79 6d 6c 69 6e |nd sock.|h symlin|
|000045a0| 6b 73 3a 0a 58 0a 58 20 | 20 25 20 28 20 63 64 20 |ks:.X.X | % ( cd |
|000045b0| 74 65 6c 6e 65 74 2e 39 | 30 2e 30 36 2e 32 38 2f |telnet.9|0.06.28/|
|000045c0| 74 65 6c 6e 65 74 64 3b | 20 6c 6e 20 2d 73 20 2e |telnetd;| ln -s .|
|000045d0| 2e 2f 2e 2e 2f 2e 2e 2f | 73 6f 63 6b 2e 7b 6f 2c |./../../|sock.{o,|
|000045e0| 68 7d 20 2e 20 29 0a 58 | 0a 58 36 2e 20 57 68 65 |h} . ).X|.X6. Whe|
|000045f0| 6e 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 63 6f |n you wa|nt to co|
|00004600| 6d 70 69 6c 65 20 74 68 | 65 20 70 61 74 63 68 65 |mpile th|e patche|
|00004610| 64 20 76 65 72 73 69 6f | 6e 3a 20 41 64 64 20 73 |d versio|n: Add s|
|00004620| 6f 63 6b 2e 6f 20 74 6f | 20 4f 42 4a 53 0a 58 20 |ock.o to| OBJS.X |
|00004630| 20 20 61 6e 64 20 2d 44 | 55 53 45 50 54 59 20 74 | and -D|USEPTY t|
|00004640| 6f 20 43 43 4f 50 54 53 | 20 69 6e 20 4d 61 6b 65 |o CCOPTS| in Make|
|00004650| 66 69 6c 65 2e 67 65 6e | 65 72 69 63 2e 20 43 68 |file.gen|eric. Ch|
|00004660| 61 6e 67 65 20 77 68 61 | 74 65 76 65 72 20 65 6c |ange wha|tever el|
|00004670| 73 65 0a 58 20 20 20 6e | 65 63 65 73 73 61 72 79 |se.X n|ecessary|
|00004680| 20 74 6f 20 67 65 74 20 | 74 65 6c 6e 65 74 64 20 | to get |telnetd |
|00004690| 74 6f 20 63 6f 6d 70 69 | 6c 65 2e 0a 58 0a 58 37 |to compi|le..X.X7|
|000046a0| 2e 20 43 6f 6d 70 69 6c | 65 21 20 4f 6e 20 61 20 |. Compil|e! On a |
|000046b0| 53 75 6e 20 34 20 75 6e | 64 65 72 20 53 75 6e 4f |Sun 4 un|der SunO|
|000046c0| 53 20 34 2e 30 2e 33 2c | 20 66 6f 72 20 65 78 61 |S 4.0.3,| for exa|
|000046d0| 6d 70 6c 65 2c 20 79 6f | 75 20 6a 75 73 74 0a 58 |mple, yo|u just.X|
|000046e0| 20 20 20 60 60 6d 61 6b | 65 20 73 75 6e 34 2e 30 | ``mak|e sun4.0|
|000046f0| 27 27 20 69 6e 20 74 68 | 65 20 74 65 6c 6e 65 74 |'' in th|e telnet|
|00004700| 64 20 64 69 72 65 63 74 | 6f 72 79 2e 0a 58 0a 58 |d direct|ory..X.X|
|00004710| 38 2e 20 49 66 20 79 6f | 75 20 61 63 74 75 61 6c |8. If yo|u actual|
|00004720| 6c 79 20 73 75 72 76 69 | 76 65 20 74 65 6c 6e 65 |ly survi|ve telne|
|00004730| 74 64 27 73 20 69 6e 63 | 6f 6d 70 61 74 69 62 69 |td's inc|ompatibi|
|00004740| 6c 69 74 69 65 73 20 61 | 6e 64 20 67 65 74 20 69 |lities a|nd get i|
|00004750| 74 20 74 6f 0a 58 20 20 | 20 63 6f 6d 70 69 6c 65 |t to.X | compile|
|00004760| 2c 20 6b 65 65 70 20 72 | 65 61 64 69 6e 67 2e 0a |, keep r|eading..|
|00004770| 58 0a 58 0a 58 54 68 65 | 20 72 65 61 73 6f 6e 20 |X.X.XThe| reason |
|00004780| 74 68 69 73 20 74 65 6c | 6e 65 74 64 20 69 73 20 |this tel|netd is |
|00004790| 73 6f 20 62 69 67 20 69 | 73 20 74 68 61 74 20 69 |so big i|s that i|
|000047a0| 74 20 73 75 70 70 6f 72 | 74 73 20 4c 69 6e 65 6d |t suppor|ts Linem|
|000047b0| 6f 64 65 2c 20 61 20 62 | 6f 6c 64 0a 58 61 74 74 |ode, a b|old.Xatt|
|000047c0| 65 6d 70 74 20 74 6f 20 | 63 75 74 20 74 68 65 20 |empt to |cut the |
|000047d0| 49 6e 74 65 72 6e 65 74 | 20 6c 6f 61 64 20 66 72 |Internet| load fr|
|000047e0| 6f 6d 20 61 6c 6c 20 74 | 68 65 20 66 61 73 74 20 |om all t|he fast |
|000047f0| 74 79 70 69 73 74 73 20 | 69 6e 20 74 68 65 20 77 |typists |in the w|
|00004800| 6f 72 6c 64 0a 58 62 79 | 20 61 20 74 68 69 72 64 |orld.Xby| a third|
|00004810| 20 6f 72 20 65 76 65 6e | 20 61 20 68 61 6c 66 2e | or even| a half.|
|00004820| 0a 58 0a 58 49 66 20 79 | 6f 75 27 72 65 20 62 6f |.X.XIf y|ou're bo|
|00004830| 72 65 64 2c 20 63 6f 6d | 70 69 6c 65 20 74 68 65 |red, com|pile the|
|00004840| 20 74 65 6c 6e 65 74 20 | 63 6c 69 65 6e 74 20 61 | telnet |client a|
|00004850| 73 20 77 65 6c 6c 2e 0a | 58 0a 58 0a 58 41 6e 79 |s well..|X.X.XAny|
|00004860| 77 61 79 2c 20 74 68 65 | 20 74 65 6c 6e 65 74 64 |way, the| telnetd|
|00004870| 20 79 6f 75 20 6a 75 73 | 74 20 63 6f 6d 70 69 6c | you jus|t compil|
|00004880| 65 64 20 73 75 70 70 6f | 72 74 73 20 70 74 79 2e |ed suppo|rts pty.|
|00004890| 20 59 6f 75 20 70 72 6f | 62 61 62 6c 79 20 64 6f | You pro|bably do|
|000048a0| 6e 27 74 0a 58 77 61 6e | 74 20 74 6f 20 72 65 70 |n't.Xwan|t to rep|
|000048b0| 6c 61 63 65 20 79 6f 75 | 72 20 6f 72 69 67 69 6e |lace you|r origin|
|000048c0| 61 6c 20 74 65 6c 6e 65 | 74 64 2c 20 62 65 63 61 |al telne|td, beca|
|000048d0| 75 73 65 20 69 66 20 73 | 6f 6d 65 74 68 69 6e 67 |use if s|omething|
|000048e0| 20 67 6f 65 73 20 77 72 | 6f 6e 67 0a 58 74 68 65 | goes wr|ong.Xthe|
|000048f0| 6e 20 79 6f 75 20 6e 65 | 65 64 20 74 6f 20 6c 6f |n you ne|ed to lo|
|00004900| 67 20 69 6e 20 61 67 61 | 69 6e 2e 20 41 6c 73 6f |g in aga|in. Also|
|00004910| 2c 20 79 6f 75 72 20 74 | 65 6c 6e 65 74 64 20 6d |, your t|elnetd m|
|00004920| 61 79 20 68 61 76 65 20 | 73 70 65 63 69 61 6c 0a |ay have |special.|
|00004930| 58 66 65 61 74 75 72 65 | 73 20 66 6f 72 20 79 6f |Xfeature|s for yo|
|00004940| 75 72 20 6d 61 63 68 69 | 6e 65 2e 20 49 6e 73 74 |ur machi|ne. Inst|
|00004950| 65 61 64 2c 20 74 61 6b | 65 20 74 68 65 20 67 72 |ead, tak|e the gr|
|00004960| 61 64 75 61 6c 20 75 70 | 67 72 61 64 65 20 70 61 |adual up|grade pa|
|00004970| 74 68 3a 20 50 75 74 0a | 58 74 65 6c 6e 65 74 64 |th: Put.|Xtelnetd|
|00004980| 20 69 6e 74 6f 20 2f 75 | 73 72 2f 6c 6f 63 61 6c | into /u|sr/local|
|00004990| 2f 74 65 6c 6e 65 74 64 | 2e 70 74 79 2c 20 61 64 |/telnetd|.pty, ad|
|000049a0| 64 20 61 20 6e 65 77 20 | 60 60 74 70 74 27 27 20 |d a new |``tpt'' |
|000049b0| 70 6f 72 74 20 74 6f 0a | 58 2f 65 74 63 2f 73 65 |port to.|X/etc/se|
|000049c0| 72 76 69 63 65 73 2c 20 | 61 6e 64 20 61 64 64 20 |rvices, |and add |
|000049d0| 74 68 69 73 20 6c 69 6e | 65 20 74 6f 20 2f 65 74 |this lin|e to /et|
|000049e0| 63 2f 69 6e 65 74 64 2e | 63 6f 6e 66 3a 0a 58 0a |c/inetd.|conf:.X.|
|000049f0| 58 74 70 74 09 73 74 72 | 65 61 6d 09 74 63 70 09 |Xtpt.str|eam.tcp.|
|00004a00| 6e 6f 77 61 69 74 09 72 | 6f 6f 74 09 2f 75 73 72 |nowait.r|oot./usr|
|00004a10| 2f 6c 6f 63 61 6c 2f 74 | 65 6c 6e 65 74 64 2e 70 |/local/t|elnetd.p|
|00004a20| 74 79 09 74 65 6c 6e 65 | 74 64 0a 58 0a 58 28 4f |ty.telne|td.X.X(O|
|00004a30| 6e 20 6f 6c 64 65 72 20 | 6d 61 63 68 69 6e 65 73 |n older |machines|
|00004a40| 2c 20 60 60 72 6f 6f 74 | 27 27 20 77 6f 75 6c 64 |, ``root|'' would|
|00004a50| 6e 27 74 20 62 65 20 74 | 68 65 72 65 3b 20 69 6d |n't be t|here; im|
|00004a60| 69 74 61 74 65 20 74 68 | 65 20 74 65 6c 6e 65 74 |itate th|e telnet|
|00004a70| 20 6c 69 6e 65 0a 58 74 | 6f 20 66 69 67 75 72 65 | line.Xt|o figure|
|00004a80| 20 6f 75 74 20 74 68 65 | 20 72 69 67 68 74 20 66 | out the| right f|
|00004a90| 6f 72 6d 61 74 2e 20 49 | 66 20 79 6f 75 20 68 61 |ormat. I|f you ha|
|00004aa0| 76 65 20 74 68 65 20 62 | 65 74 74 65 72 20 69 6e |ve the b|etter in|
|00004ab0| 74 65 72 66 61 63 65 20 | 6f 66 0a 58 61 74 74 61 |terface |of.Xatta|
|00004ac0| 63 68 70 6f 72 74 2c 20 | 75 73 65 20 69 74 20 69 |chport, |use it i|
|00004ad0| 6e 73 74 65 61 64 2e 29 | 20 6b 69 6c 6c 20 2d 48 |nstead.)| kill -H|
|00004ae0| 55 50 20 74 68 65 20 69 | 6e 65 74 64 20 70 72 6f |UP the i|netd pro|
|00004af0| 63 65 73 73 20 73 6f 20 | 74 68 61 74 20 69 74 20 |cess so |that it |
|00004b00| 77 69 6c 6c 0a 58 72 65 | 72 65 61 64 20 69 6e 65 |will.Xre|read ine|
|00004b10| 74 64 2e 63 6f 6e 66 2e | 0a 58 0a 58 0a 58 4e 6f |td.conf.|.X.X.XNo|
|00004b20| 77 20 74 72 79 20 63 6f | 6e 6e 65 63 74 69 6e 67 |w try co|nnecting|
|00004b30| 20 74 6f 20 74 68 65 20 | 74 70 74 20 70 6f 72 74 | to the |tpt port|
|00004b40| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 32 33 20 | rather |than 23 |
|00004b50| 28 69 6e 73 74 65 61 64 | 20 6f 66 20 74 65 6c 6e |(instead| of teln|
|00004b60| 65 74 20 58 2c 0a 58 64 | 6f 20 74 65 6c 6e 65 74 |et X,.Xd|o telnet|
|00004b70| 20 58 20 74 70 74 29 2e | 20 59 6f 75 20 73 68 6f | X tpt).| You sho|
|00004b80| 75 6c 64 20 65 6e 64 20 | 75 70 20 74 61 6c 6b 69 |uld end |up talki|
|00004b90| 6e 67 20 74 6f 20 74 68 | 65 20 6e 65 77 20 74 65 |ng to th|e new te|
|00004ba0| 6c 6e 65 74 64 2c 20 61 | 20 63 6c 65 61 6e 0a 58 |lnetd, a| clean.X|
|00004bb0| 6c 6f 67 69 6e 2c 20 61 | 6e 64 20 28 62 65 73 74 |login, a|nd (best|
|00004bc0| 20 6f 66 20 61 6c 6c 29 | 20 61 20 70 74 79 20 73 | of all)| a pty s|
|00004bd0| 65 73 73 69 6f 6e 2e 20 | 28 54 68 65 20 6d 6f 73 |ession. |(The mos|
|00004be0| 74 20 63 6f 6d 6d 6f 6e | 20 70 72 6f 62 6c 65 6d |t common| problem|
|00004bf0| 3a 20 4c 69 6e 65 73 0a | 58 64 6f 6e 27 74 20 61 |: Lines.|Xdon't a|
|00004c00| 70 70 65 61 72 20 75 6e | 74 69 6c 20 61 66 74 65 |ppear un|til afte|
|00004c10| 72 20 79 6f 75 20 70 72 | 65 73 73 20 72 65 74 75 |r you pr|ess retu|
|00004c20| 72 6e 2e 20 54 68 69 73 | 20 6d 65 61 6e 73 20 74 |rn. This| means t|
|00004c30| 68 61 74 20 79 6f 75 72 | 20 6f 6c 64 0a 58 74 65 |hat your| old.Xte|
|00004c40| 6c 6e 65 74 20 64 6f 65 | 73 6e 27 74 20 73 75 70 |lnet doe|sn't sup|
|00004c50| 70 6f 72 74 20 4c 69 6e | 65 6d 6f 64 65 3b 20 74 |port Lin|emode; t|
|00004c60| 79 70 65 20 60 60 5e 5d | 6d 6f 20 63 68 27 27 20 |ype ``^]|mo ch'' |
|00004c70| 74 6f 20 66 69 78 20 69 | 74 2e 20 41 6c 73 6f 20 |to fix i|t. Also |
|00004c80| 73 65 6e 64 0a 58 63 6f | 6d 70 6c 61 69 6e 74 73 |send.Xco|mplaints|
|00004c90| 20 61 62 6f 75 74 20 74 | 68 65 20 69 6e 63 6f 6d | about t|he incom|
|00004ca0| 70 61 74 69 62 69 6c 69 | 74 69 65 73 20 74 6f 20 |patibili|ties to |
|00004cb0| 64 61 62 40 63 72 61 79 | 2e 63 6f 6d 2e 29 20 49 |dab@cray|.com.) I|
|00004cc0| 66 20 74 68 65 0a 58 63 | 6f 6e 6e 65 63 74 69 6f |f the.Xc|onnectio|
|00004cd0| 6e 20 68 61 6e 67 73 20 | 66 6f 72 20 6d 6f 72 65 |n hangs |for more|
|00004ce0| 20 74 68 61 6e 20 61 20 | 73 65 63 6f 6e 64 20 6f | than a |second o|
|00004cf0| 72 20 70 72 6f 64 75 63 | 65 73 20 77 65 69 72 64 |r produc|es weird|
|00004d00| 20 72 65 73 75 6c 74 73 | 2c 0a 58 79 6f 75 27 72 | results|,.Xyou'r|
|00004d10| 65 20 70 72 6f 62 61 62 | 6c 79 20 6f 75 74 20 6f |e probab|ly out o|
|00004d20| 66 20 6c 75 63 6b 3b 20 | 70 74 79 27 73 20 61 75 |f luck; |pty's au|
|00004d30| 74 68 6f 72 20 77 6f 75 | 6c 64 20 61 70 70 72 65 |thor wou|ld appre|
|00004d40| 63 69 61 74 65 20 68 65 | 61 72 69 6e 67 20 61 62 |ciate he|aring ab|
|00004d50| 6f 75 74 0a 58 79 6f 75 | 72 20 65 78 70 65 72 69 |out.Xyou|r experi|
|00004d60| 65 6e 63 65 73 2e 0a 58 | 0a 58 49 66 20 61 6c 6c |ences..X|.XIf all|
|00004d70| 20 67 6f 65 73 20 77 65 | 6c 6c 20 28 77 68 65 77 | goes we|ll (whew|
|00004d80| 21 29 20 79 6f 75 20 63 | 61 6e 20 6c 6f 67 20 69 |!) you c|an log i|
|00004d90| 6e 20 6e 6f 72 6d 61 6c | 6c 79 2c 20 6a 75 73 74 |n normal|ly, just|
|00004da0| 20 61 73 20 69 66 20 79 | 6f 75 27 72 65 0a 58 63 | as if y|ou're.Xc|
|00004db0| 6f 6e 6e 65 63 74 65 64 | 20 74 6f 20 74 68 65 20 |onnected| to the |
|00004dc0| 6f 6c 64 20 74 65 6c 6e | 65 74 64 2e 20 4f 6e 63 |old teln|etd. Onc|
|00004dd0| 65 20 79 6f 75 27 72 65 | 20 69 6e 20 61 20 73 68 |e you're| in a sh|
|00004de0| 65 6c 6c 2c 20 74 72 79 | 20 75 73 69 6e 67 20 74 |ell, try| using t|
|00004df0| 68 65 20 70 74 79 0a 58 | 75 74 69 6c 69 74 69 65 |he pty.X|utilitie|
|00004e00| 73 2c 20 61 73 20 69 66 | 20 79 6f 75 20 77 65 72 |s, as if| you wer|
|00004e10| 65 20 75 6e 64 65 72 20 | 73 65 73 73 2e 20 59 6f |e under |sess. Yo|
|00004e20| 75 20 73 68 6f 75 6c 64 | 20 66 69 6e 64 20 74 68 |u should| find th|
|00004e30| 61 74 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 73 0a |at the c|ommands.|
|00004e40| 58 66 61 69 6c 20 75 6e | 6c 65 73 73 20 79 6f 75 |Xfail un|less you|
|00004e50| 27 72 65 20 72 6f 6f 74 | 2c 20 62 65 63 61 75 73 |'re root|, becaus|
|00004e60| 65 20 74 68 61 74 20 73 | 65 73 73 69 6f 6e 20 77 |e that s|ession w|
|00004e70| 61 73 20 73 74 61 72 74 | 65 64 20 62 79 20 72 6f |as start|ed by ro|
|00004e80| 6f 74 20 72 61 74 68 65 | 72 0a 58 74 68 61 6e 20 |ot rathe|r.Xthan |
|00004e90| 79 6f 75 2e 20 28 54 68 | 69 73 20 70 6f 69 6e 74 |you. (Th|is point|
|00004ea0| 73 20 6f 75 74 20 61 20 | 66 61 69 6c 75 72 65 20 |s out a |failure |
|00004eb0| 69 6e 20 74 68 65 20 74 | 65 6c 6e 65 74 64 2d 6c |in the t|elnetd-l|
|00004ec0| 6f 67 69 6e 2d 75 74 6d | 70 20 6d 6f 64 65 6c 2e |ogin-utm|p model.|
|00004ed0| 29 0a 58 54 6f 20 67 61 | 69 6e 20 63 6f 6e 74 72 |).XTo ga|in contr|
|00004ee0| 6f 6c 20 6f 66 20 74 68 | 65 20 73 65 73 73 69 6f |ol of th|e sessio|
|00004ef0| 6e 2c 20 74 79 70 65 20 | 60 60 73 65 73 73 75 73 |n, type |``sessus|
|00004f00| 65 72 27 27 20 61 6e 64 | 20 70 72 61 79 2e 20 49 |er'' and| pray. I|
|00004f10| 66 20 6e 6f 74 68 69 6e | 67 0a 58 67 6f 65 73 20 |f nothin|g.Xgoes |
|00004f20| 77 72 6f 6e 67 2c 20 79 | 6f 75 20 63 61 6e 20 74 |wrong, y|ou can t|
|00004f30| 68 65 6e 20 64 69 73 63 | 6f 6e 6e 65 63 74 20 74 |hen disc|onnect t|
|00004f40| 68 65 20 73 65 73 73 69 | 6f 6e 2c 20 73 65 74 20 |he sessi|on, set |
|00004f50| 75 70 20 61 20 72 65 63 | 6f 6e 6e 65 63 74 20 74 |up a rec|onnect t|
|00004f60| 6f 0a 58 61 6e 6f 74 68 | 65 72 20 6f 6e 65 2c 20 |o.Xanoth|er one, |
|00004f70| 75 73 65 20 73 65 73 73 | 6e 61 6d 65 20 61 6e 64 |use sess|name and|
|00004f80| 20 73 65 73 73 6c 69 73 | 74 2c 20 65 74 63 2e 20 | sesslis|t, etc. |
|00004f90| 59 61 68 6f 6f 21 20 54 | 65 6c 6c 20 79 6f 75 72 |Yahoo! T|ell your|
|00004fa0| 20 75 73 65 72 73 21 0a | 58 52 65 70 6c 61 63 65 | users!.|XReplace|
|00004fb0| 20 79 6f 75 72 20 6f 6c | 64 20 74 65 6c 6e 65 74 | your ol|d telnet|
|00004fc0| 64 20 77 69 74 68 20 74 | 68 65 20 6e 65 77 20 6f |d with t|he new o|
|00004fd0| 6e 65 21 20 41 64 64 20 | 73 65 73 73 75 73 65 72 |ne! Add |sessuser|
|00004fe0| 20 74 6f 20 74 68 65 20 | 64 65 66 61 75 6c 74 0a | to the |default.|
|00004ff0| 58 2e 63 73 68 72 63 21 | 20 41 6e 64 20 70 6c 65 |X.cshrc!| And ple|
|00005000| 61 73 65 20 73 65 6e 64 | 20 61 20 6e 6f 74 65 20 |ase send| a note |
|00005010| 74 6f 20 62 72 6e 73 74 | 6e 64 40 6e 79 75 2e 65 |to brnst|nd@nyu.e|
|00005020| 64 75 20 61 62 6f 75 74 | 20 79 6f 75 72 20 73 75 |du about| your su|
|00005030| 63 63 65 73 73 2e 0a 58 | 0a 58 0a 58 4e 6f 74 65 |ccess..X|.X.XNote|
|00005040| 20 74 68 61 74 20 6d 61 | 6e 79 20 70 6f 70 75 6c | that ma|ny popul|
|00005050| 61 72 20 76 65 72 73 69 | 6f 6e 73 20 6f 66 20 6c |ar versi|ons of l|
|00005060| 6f 67 69 6e 20 75 73 65 | 20 61 6e 20 61 6e 6e 6f |ogin use| an anno|
|00005070| 79 69 6e 67 20 68 65 75 | 72 69 73 74 69 63 20 74 |ying heu|ristic t|
|00005080| 6f 0a 58 73 61 76 65 20 | 61 20 66 65 77 20 6d 69 |o.Xsave |a few mi|
|00005090| 63 72 6f 73 65 63 6f 6e | 64 73 20 69 6e 20 75 70 |crosecon|ds in up|
|000050a0| 64 61 74 69 6e 67 20 2f | 65 74 63 2f 75 74 6d 70 |dating /|etc/utmp|
|000050b0| 2e 20 54 68 65 20 72 65 | 73 75 6c 74 20 69 73 2c |. The re|sult is,|
|000050c0| 20 66 69 72 73 74 2c 0a | 58 74 68 61 74 20 74 68 | first,.|Xthat th|
|000050d0| 65 72 65 27 73 20 61 20 | 72 61 63 65 20 63 6f 6e |ere's a |race con|
|000050e0| 64 69 74 69 6f 6e 20 74 | 68 61 74 20 63 61 6e 20 |dition t|hat can |
|000050f0| 62 72 65 61 6b 20 64 6f | 77 6e 20 2f 65 74 63 2f |break do|wn /etc/|
|00005100| 75 74 6d 70 20 6f 6e 20 | 68 65 61 76 69 6c 79 0a |utmp on |heavily.|
|00005110| 58 6c 6f 61 64 65 64 20 | 6d 61 63 68 69 6e 65 73 |Xloaded |machines|
|00005120| 3b 20 61 6e 64 20 73 65 | 63 6f 6e 64 2c 20 74 68 |; and se|cond, th|
|00005130| 61 74 20 6c 6f 67 69 6e | 20 61 6e 64 20 70 74 79 |at login| and pty|
|00005140| 20 68 61 76 65 20 64 69 | 66 66 65 72 65 6e 74 20 | have di|fferent |
|00005150| 76 69 65 77 73 20 6f 66 | 0a 58 2f 65 74 63 2f 75 |views of|.X/etc/u|
|00005160| 74 6d 70 2e 20 46 6f 72 | 20 74 68 69 73 20 72 65 |tmp. For| this re|
|00005170| 61 73 6f 6e 2c 20 70 74 | 79 20 69 73 20 69 6e 76 |ason, pt|y is inv|
|00005180| 6f 6b 65 64 20 77 69 74 | 68 20 2d 78 52 20 74 6f |oked wit|h -xR to|
|00005190| 20 73 65 61 72 63 68 20 | 66 6f 72 20 70 74 79 73 | search |for ptys|
|000051a0| 0a 58 69 6e 20 6f 72 64 | 65 72 2e 20 59 6f 75 20 |.Xin ord|er. You |
|000051b0| 6d 61 79 20 65 76 65 6e | 20 77 61 6e 74 20 74 6f |may even| want to|
|000051c0| 20 6d 61 6b 65 20 2d 78 | 52 20 64 65 66 61 75 6c | make -x|R defaul|
|000051d0| 74 20 28 62 79 20 73 65 | 74 74 69 6e 67 20 66 6c |t (by se|tting fl|
|000051e0| 61 67 78 72 61 6e 64 6f | 6d 0a 58 74 6f 20 30 20 |agxrando|m.Xto 0 |
|000051f0| 69 6e 20 70 74 79 27 73 | 20 67 6c 6f 62 61 6c 73 |in pty's| globals|
|00005200| 2e 63 29 2e 20 53 69 67 | 68 2e 0a 45 4e 44 5f 4f |.c). Sig|h..END_O|
|00005210| 46 5f 46 49 4c 45 0a 20 | 20 69 66 20 74 65 73 74 |F_FILE. | if test|
|00005220| 20 34 37 37 37 20 2d 6e | 65 20 60 77 63 20 2d 63 | 4777 -n|e `wc -c|
|00005230| 20 3c 27 70 61 74 63 68 | 2f 52 45 41 44 4d 45 27 | <'patch|/README'|
|00005240| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00005250| 20 73 68 61 72 3a 20 5c | 22 27 70 61 74 63 68 2f | shar: \|"'patch/|
|00005260| 52 45 41 44 4d 45 27 5c | 22 20 75 6e 70 61 63 6b |README'\|" unpack|
|00005270| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00005280| 7a 65 21 0a 20 20 66 69 | 0a 20 20 23 20 65 6e 64 |ze!. fi|. # end|
|00005290| 20 6f 66 20 27 70 61 74 | 63 68 2f 52 45 41 44 4d | of 'pat|ch/READM|
|000052a0| 45 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |E'.fi.if| test -f|
|000052b0| 20 27 73 69 67 2e 63 27 | 20 2d 61 20 22 24 7b 31 | 'sig.c'| -a "${1|
|000052c0| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|000052d0| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|000052e0| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|000052f0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00005300| 22 27 73 69 67 2e 63 27 | 5c 22 0a 65 6c 73 65 0a |"'sig.c'|\".else.|
|00005310| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 | echo s|har: Ext|
|00005320| 72 61 63 74 69 6e 67 20 | 5c 22 27 73 69 67 2e 63 |racting |\"'sig.c|
|00005330| 27 5c 22 20 5c 28 34 35 | 34 39 20 63 68 61 72 61 |'\" \(45|49 chara|
|00005340| 63 74 65 72 73 5c 29 0a | 20 20 73 65 64 20 22 73 |cters\).| sed "s|
|00005350| 2f 5e 58 2f 2f 22 20 3e | 27 73 69 67 2e 63 27 20 |/^X//" >|'sig.c' |
|00005360| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00005370| 58 2f 2a 20 43 6f 70 79 | 72 69 67 68 74 20 31 39 |X/* Copy|right 19|
|00005380| 39 30 2c 20 44 61 6e 69 | 65 6c 20 4a 2e 20 42 65 |90, Dani|el J. Be|
|00005390| 72 6e 73 74 65 69 6e 2e | 20 41 6c 6c 20 72 69 67 |rnstein.| All rig|
|000053a0| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 20 2a 2f |hts rese|rved. */|
|000053b0| 0a 58 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 63 6f |.X.X#inc|lude "co|
|000053c0| 6e 66 69 67 2e 68 22 0a | 58 23 69 6e 63 6c 75 64 |nfig.h".|X#includ|
|000053d0| 65 20 3c 73 79 73 2f 74 | 69 6d 65 2e 68 3e 0a 58 |e <sys/t|ime.h>.X|
|000053e0| 23 69 6e 63 6c 75 64 65 | 20 22 73 69 67 2e 68 22 |#include| "sig.h"|
|000053f0| 0a 58 0a 58 2f 2a 20 54 | 68 69 73 20 69 73 20 61 |.X.X/* T|his is a|
|00005400| 20 73 74 72 69 70 70 65 | 64 2d 64 6f 77 6e 20 73 | strippe|d-down s|
|00005410| 69 67 6e 61 6c 20 6c 69 | 62 72 61 72 79 2c 20 77 |ignal li|brary, w|
|00005420| 69 74 68 20 61 75 74 6f | 6d 61 74 69 63 20 63 72 |ith auto|matic cr|
|00005430| 69 74 69 63 61 6c 20 2a | 2f 0a 58 2f 2a 20 73 65 |itical *|/.X/* se|
|00005440| 63 74 69 6f 6e 73 20 61 | 72 6f 75 6e 64 20 65 76 |ctions a|round ev|
|00005450| 65 72 79 20 73 69 67 6e | 61 6c 20 68 61 6e 64 6c |ery sign|al handl|
|00005460| 65 72 2e 20 41 73 20 6c | 6f 6e 67 20 61 73 20 6e |er. As l|ong as n|
|00005470| 6f 20 73 69 67 6e 61 6c | 20 68 61 6e 64 6c 65 72 |o signal| handler|
|00005480| 20 2a 2f 0a 58 2f 2a 20 | 68 61 73 20 74 6f 20 70 | */.X/* |has to p|
|00005490| 61 75 73 65 20 77 61 69 | 74 69 6e 67 20 66 6f 72 |ause wai|ting for|
|000054a0| 20 61 6e 6f 74 68 65 72 | 20 73 69 67 6e 61 6c 2c | another| signal,|
|000054b0| 20 74 68 69 73 20 77 6f | 72 6b 73 20 62 65 61 75 | this wo|rks beau|
|000054c0| 74 69 66 75 6c 6c 79 20 | 2a 2f 0a 58 2f 2a 20 61 |tifully |*/.X/* a|
|000054d0| 6e 64 20 70 72 65 76 65 | 6e 74 73 20 61 6c 6c 20 |nd preve|nts all |
|000054e0| 72 61 63 65 73 2e 20 2a | 2f 0a 58 0a 58 73 74 61 |races. *|/.X.Xsta|
|000054f0| 74 69 63 20 69 6e 74 20 | 71 75 65 75 65 64 5b 53 |tic int |queued[S|
|00005500| 49 47 4e 55 4d 5d 3b 0a | 58 73 74 61 74 69 63 20 |IGNUM];.|Xstatic |
|00005510| 69 6e 74 20 71 75 6f 5b | 53 49 47 4e 55 4d 5d 3b |int quo[|SIGNUM];|
|00005520| 0a 58 73 74 61 74 69 63 | 20 73 69 67 5f 73 79 73 |.Xstatic| sig_sys|
|00005530| 68 61 6e 64 6c 65 72 20 | 6f 72 69 67 5b 53 49 47 |handler |orig[SIG|
|00005540| 4e 55 4d 5d 3b 0a 58 73 | 74 61 74 69 63 20 73 69 |NUM];.Xs|tatic si|
|00005550| 67 5f 68 61 6e 64 6c 65 | 72 20 68 61 6e 64 6c 65 |g_handle|r handle|
|00005560| 72 5b 53 49 47 4e 55 4d | 5d 3b 0a 58 0a 58 73 74 |r[SIGNUM|];.X.Xst|
|00005570| 61 74 69 63 20 73 69 67 | 5f 73 79 73 68 61 6e 64 |atic sig|_syshand|
|00005580| 6c 65 72 20 73 69 67 6e | 61 6c 76 28 73 2c 68 29 |ler sign|alv(s,h)|
|00005590| 0a 58 72 65 67 69 73 74 | 65 72 20 73 69 67 5f 6e |.Xregist|er sig_n|
|000055a0| 75 6d 20 73 3b 0a 58 72 | 65 67 69 73 74 65 72 20 |um s;.Xr|egister |
|000055b0| 73 69 67 5f 73 79 73 68 | 61 6e 64 6c 65 72 20 68 |sig_sysh|andler h|
|000055c0| 3b 0a 58 7b 0a 58 20 72 | 65 74 75 72 6e 20 73 69 |;.X{.X r|eturn si|
|000055d0| 67 6e 61 6c 28 73 2c 68 | 29 3b 0a 58 7d 0a 58 0a |gnal(s,h|);.X}.X.|
|000055e0| 58 73 74 61 74 69 63 20 | 69 6e 74 20 63 72 69 74 |Xstatic |int crit|
|000055f0| 20 3d 20 30 3b 0a 58 0a | 58 73 74 61 74 69 63 20 | = 0;.X.|Xstatic |
|00005600| 76 6f 69 64 20 68 61 6e | 64 6c 65 28 69 29 0a 58 |void han|dle(i).X|
|00005610| 72 65 67 69 73 74 65 72 | 20 73 69 67 5f 6e 75 6d |register| sig_num|
|00005620| 20 69 3b 0a 58 7b 0a 58 | 20 69 66 20 28 63 72 69 | i;.X{.X| if (cri|
|00005630| 74 29 0a 58 20 20 20 71 | 75 65 75 65 64 5b 69 5d |t).X q|ueued[i]|
|00005640| 20 3d 20 31 3b 0a 58 20 | 65 6c 73 65 0a 58 20 20 | = 1;.X |else.X |
|00005650| 7b 0a 58 20 20 20 72 65 | 67 69 73 74 65 72 20 69 |{.X re|gister i|
|00005660| 6e 74 20 71 3b 0a 58 20 | 20 20 72 65 67 69 73 74 |nt q;.X | regist|
|00005670| 65 72 20 73 69 67 5f 6e | 75 6d 20 6a 3b 0a 58 0a |er sig_n|um j;.X.|
|00005680| 58 20 20 20 63 72 69 74 | 20 3d 20 31 3b 20 28 76 |X crit| = 1; (v|
|00005690| 6f 69 64 29 20 68 61 6e | 64 6c 65 72 5b 69 5d 28 |oid) han|dler[i](|
|000056a0| 69 29 3b 20 71 75 65 75 | 65 64 5b 69 5d 20 3d 20 |i); queu|ed[i] = |
|000056b0| 30 3b 20 63 72 69 74 20 | 3d 20 30 3b 0a 58 20 20 |0; crit |= 0;.X |
|000056c0| 20 64 6f 20 66 6f 72 20 | 28 6a 20 3d 20 71 20 3d | do for |(j = q =|
|000056d0| 20 30 3b 6a 20 3c 20 53 | 49 47 4e 55 4d 3b 6a 2b | 0;j < S|IGNUM;j+|
|000056e0| 2b 29 20 69 66 20 28 71 | 75 65 75 65 64 5b 6a 5d |+) if (q|ueued[j]|
|000056f0| 29 0a 58 09 7b 0a 58 09 | 20 63 72 69 74 20 3d 20 |).X.{.X.| crit = |
|00005700| 71 20 3d 20 31 3b 0a 58 | 09 20 69 66 20 28 6a 20 |q = 1;.X|. if (j |
|00005710| 21 3d 20 69 29 20 28 76 | 6f 69 64 29 20 68 61 6e |!= i) (v|oid) han|
|00005720| 64 6c 65 72 5b 6a 5d 28 | 6a 29 3b 0a 58 09 20 71 |dler[j](|j);.X. q|
|00005730| 75 65 75 65 64 5b 6a 5d | 20 3d 20 30 3b 20 63 72 |ueued[j]| = 0; cr|
|00005740| 69 74 20 3d 20 30 3b 0a | 58 09 7d 0a 58 20 20 20 |it = 0;.|X.}.X |
|00005750| 77 68 69 6c 65 20 28 71 | 29 3b 0a 58 20 20 7d 0a |while (q|);.X }.|
|00005760| 58 7d 0a 58 0a 58 2f 2a | 20 54 6f 20 73 65 65 20 |X}.X.X/*| To see |
|00005770| 77 68 79 20 68 61 6e 64 | 6c 65 28 29 20 77 6f 72 |why hand|le() wor|
|00005780| 6b 73 3a 20 46 69 72 73 | 74 2c 20 63 72 69 74 20 |ks: Firs|t, crit |
|00005790| 63 61 6e 20 62 65 20 63 | 6f 6e 73 69 64 65 72 65 |can be c|onsidere|
|000057a0| 64 20 61 20 6c 6f 63 61 | 6c 0a 58 76 61 72 69 61 |d a loca|l.Xvaria|
|000057b0| 62 6c 65 2c 20 62 65 63 | 61 75 73 65 20 68 61 6e |ble, bec|ause han|
|000057c0| 64 6c 65 28 29 20 69 73 | 20 74 68 65 20 6f 6e 6c |dle() is| the onl|
|000057d0| 79 20 72 6f 75 74 69 6e | 65 20 74 68 61 74 20 6d |y routin|e that m|
|000057e0| 6f 64 69 66 69 65 73 20 | 69 74 2c 20 61 6e 64 0a |odifies |it, and.|
|000057f0| 58 68 61 6e 64 6c 65 28 | 29 20 61 6c 77 61 79 73 |Xhandle(|) always|
|00005800| 20 6c 65 61 76 65 73 20 | 63 72 69 74 20 74 68 65 | leaves |crit the|
|00005810| 20 73 61 6d 65 2e 20 53 | 65 63 6f 6e 64 2c 20 63 | same. S|econd, c|
|00005820| 72 69 74 20 69 73 20 31 | 20 77 68 69 6c 65 20 61 |rit is 1| while a|
|00005830| 6e 79 0a 58 68 61 6e 64 | 6c 65 72 20 69 73 20 63 |ny.Xhand|ler is c|
|00005840| 61 6c 6c 65 64 2c 20 61 | 6e 64 20 74 68 65 6e 20 |alled, a|nd then |
|00005850| 61 6e 79 20 73 69 6d 75 | 6c 74 61 6e 65 6f 75 73 |any simu|ltaneous|
|00005860| 20 68 61 6e 64 6c 65 28 | 29 73 20 77 69 6c 6c 20 | handle(|)s will |
|00005870| 73 69 6d 70 6c 79 0a 58 | 71 75 65 75 65 2e 20 48 |simply.X|queue. H|
|00005880| 65 6e 63 65 20 68 61 6e | 64 6c 65 72 73 20 61 72 |ence han|dlers ar|
|00005890| 65 20 6d 75 74 75 61 6c | 6c 79 20 65 78 63 6c 75 |e mutual|ly exclu|
|000058a0| 73 69 76 65 2e 20 54 68 | 69 72 64 2c 20 77 68 65 |sive. Th|ird, whe|
|000058b0| 6e 20 68 61 6e 64 6c 65 | 28 29 20 69 73 0a 58 63 |n handle|() is.Xc|
|000058c0| 61 6c 6c 65 64 20 77 69 | 74 68 20 63 72 69 74 20 |alled wi|th crit |
|000058d0| 3d 3d 20 30 2c 20 69 74 | 20 63 61 6e 20 6f 6e 6c |== 0, it| can onl|
|000058e0| 79 20 65 78 69 74 20 61 | 66 74 65 72 20 67 6f 69 |y exit a|fter goi|
|000058f0| 6e 67 20 74 68 72 6f 75 | 67 68 20 61 6e 20 65 6e |ng throu|gh an en|
|00005900| 74 69 72 65 20 6a 0a 58 | 6c 6f 6f 70 20 77 69 74 |tire j.X|loop wit|
|00005910| 68 20 6e 6f 20 71 75 65 | 75 65 64 5b 5d 73 20 74 |h no que|ued[]s t|
|00005920| 72 75 65 2e 20 46 6f 75 | 72 74 68 2c 20 69 66 20 |rue. Fou|rth, if |
|00005930| 61 6c 6c 20 71 75 65 75 | 65 64 5b 5d 73 20 61 72 |all queu|ed[]s ar|
|00005940| 65 20 66 61 6c 73 65 20 | 74 68 72 6f 75 67 68 0a |e false |through.|
|00005950| 58 74 68 61 74 20 6a 20 | 6c 6f 6f 70 2c 20 74 68 |Xthat j |loop, th|
|00005960| 65 6e 20 63 72 69 74 20 | 69 73 20 6e 6f 74 20 73 |en crit |is not s|
|00005970| 65 74 20 62 79 20 68 61 | 6e 64 6c 65 28 29 20 64 |et by ha|ndle() d|
|00005980| 75 72 69 6e 67 20 74 68 | 61 74 20 6c 6f 6f 70 2e |uring th|at loop.|
|00005990| 20 46 69 6e 61 6c 6c 79 | 2c 0a 58 69 66 20 63 72 | Finally|,.Xif cr|
|000059a0| 69 74 20 69 73 20 30 2c | 20 68 61 6e 64 6c 65 28 |it is 0,| handle(|
|000059b0| 29 20 77 69 6c 6c 20 65 | 78 69 74 20 77 69 74 68 |) will e|xit with|
|000059c0| 20 6e 6f 20 71 75 65 75 | 65 64 20 73 69 67 6e 61 | no queu|ed signa|
|000059d0| 6c 73 3a 20 74 68 69 73 | 20 69 73 20 74 72 75 65 |ls: this| is true|
|000059e0| 20 62 79 0a 58 69 6e 64 | 75 63 74 69 6f 6e 20 66 | by.Xind|uction f|
|000059f0| 72 6f 6d 20 74 68 65 20 | 70 72 65 76 69 6f 75 73 |rom the |previous|
|00005a00| 20 6f 62 73 65 72 76 61 | 74 69 6f 6e 73 2e 20 2a | observa|tions. *|
|00005a10| 2f 0a 58 0a 58 0a 58 2f | 2a 20 54 68 65 72 65 20 |/.X.X.X/|* There |
|00005a20| 69 73 20 75 6e 66 6f 72 | 74 75 6e 61 74 65 6c 79 |is unfor|tunately|
|00005a30| 20 6e 6f 20 67 75 61 72 | 61 6e 74 65 65 20 74 68 | no guar|antee th|
|00005a40| 61 74 20 61 20 73 69 67 | 6e 61 6c 20 68 61 6e 64 |at a sig|nal hand|
|00005a50| 6c 65 72 20 61 73 20 2a | 2f 0a 58 2f 2a 20 70 61 |ler as *|/.X/* pa|
|00005a60| 73 73 65 64 20 74 6f 20 | 73 69 67 6e 61 6c 28 29 |ssed to |signal()|
|00005a70| 20 77 69 6c 6c 20 72 65 | 63 65 69 76 65 20 69 74 | will re|ceive it|
|00005a80| 73 20 73 69 67 6e 61 6c | 20 6e 75 6d 62 65 72 20 |s signal| number |
|00005a90| 61 73 20 69 74 73 20 66 | 69 72 73 74 20 2a 2f 0a |as its f|irst */.|
|00005aa0| 58 2f 2a 20 61 72 67 75 | 6d 65 6e 74 2e 20 57 65 |X/* argu|ment. We|
|00005ab0| 20 64 6f 20 6d 61 6b 65 | 20 74 68 61 74 20 67 75 | do make| that gu|
|00005ac0| 61 72 61 6e 74 65 65 2e | 20 2a 2f 0a 58 0a 58 23 |arantee.| */.X.X#|
|00005ad0| 64 65 66 69 6e 65 20 48 | 41 4e 28 73 2c 68 29 20 |define H|AN(s,h) |
|00005ae0| 53 49 47 52 45 54 5f 54 | 59 50 45 20 68 28 29 20 |SIGRET_T|YPE h() |
|00005af0| 7b 20 68 61 6e 64 6c 65 | 28 73 29 3b 20 7d 0a 58 |{ handle|(s); }.X|
|00005b00| 0a 58 48 41 4e 28 30 2c | 68 61 6e 30 29 3b 20 20 |.XHAN(0,|han0); |
|00005b10| 20 48 41 4e 28 31 2c 68 | 61 6e 31 29 3b 20 20 20 | HAN(1,h|an1); |
|00005b20| 48 41 4e 28 32 2c 68 61 | 6e 32 29 3b 20 20 20 48 |HAN(2,ha|n2); H|
|00005b30| 41 4e 28 33 2c 68 61 6e | 33 29 3b 0a 58 48 41 4e |AN(3,han|3);.XHAN|
|00005b40| 28 34 2c 68 61 6e 34 29 | 3b 20 20 20 48 41 4e 28 |(4,han4)|; HAN(|
|00005b50| 35 2c 68 61 6e 35 29 3b | 20 20 20 48 41 4e 28 36 |5,han5);| HAN(6|
|00005b60| 2c 68 61 6e 36 29 3b 20 | 20 20 48 41 4e 28 37 2c |,han6); | HAN(7,|
|00005b70| 68 61 6e 37 29 3b 0a 58 | 48 41 4e 28 38 2c 68 61 |han7);.X|HAN(8,ha|
|00005b80| 6e 38 29 3b 20 20 20 48 | 41 4e 28 39 2c 68 61 6e |n8); H|AN(9,han|
|00005b90| 39 29 3b 20 20 20 48 41 | 4e 28 31 30 2c 68 61 6e |9); HA|N(10,han|
|00005ba0| 31 30 29 3b 20 48 41 4e | 28 31 31 2c 68 61 6e 31 |10); HAN|(11,han1|
|00005bb0| 31 29 3b 0a 58 48 41 4e | 28 31 32 2c 68 61 6e 31 |1);.XHAN|(12,han1|
|00005bc0| 32 29 3b 20 48 41 4e 28 | 31 33 2c 68 61 6e 31 33 |2); HAN(|13,han13|
|00005bd0| 29 3b 20 48 41 4e 28 31 | 34 2c 68 61 6e 31 34 29 |); HAN(1|4,han14)|
|00005be0| 3b 20 48 41 4e 28 31 35 | 2c 68 61 6e 31 35 29 3b |; HAN(15|,han15);|
|00005bf0| 0a 58 48 41 4e 28 31 36 | 2c 68 61 6e 31 36 29 3b |.XHAN(16|,han16);|
|00005c00| 20 48 41 4e 28 31 37 2c | 68 61 6e 31 37 29 3b 20 | HAN(17,|han17); |
|00005c10| 48 41 4e 28 31 38 2c 68 | 61 6e 31 38 29 3b 20 48 |HAN(18,h|an18); H|
|00005c20| 41 4e 28 31 39 2c 68 61 | 6e 31 39 29 3b 0a 58 48 |AN(19,ha|n19);.XH|
|00005c30| 41 4e 28 32 30 2c 68 61 | 6e 32 30 29 3b 20 48 41 |AN(20,ha|n20); HA|
|00005c40| 4e 28 32 31 2c 68 61 6e | 32 31 29 3b 20 48 41 4e |N(21,han|21); HAN|
|00005c50| 28 32 32 2c 68 61 6e 32 | 32 29 3b 20 48 41 4e 28 |(22,han2|2); HAN(|
|00005c60| 32 33 2c 68 61 6e 32 33 | 29 3b 0a 58 48 41 4e 28 |23,han23|);.XHAN(|
|00005c70| 32 34 2c 68 61 6e 32 34 | 29 3b 20 48 41 4e 28 32 |24,han24|); HAN(2|
|00005c80| 35 2c 68 61 6e 32 35 29 | 3b 20 48 41 4e 28 32 36 |5,han25)|; HAN(26|
|00005c90| 2c 68 61 6e 32 36 29 3b | 20 48 41 4e 28 32 37 2c |,han26);| HAN(27,|
|00005ca0| 68 61 6e 32 37 29 3b 0a | 58 48 41 4e 28 32 38 2c |han27);.|XHAN(28,|
|00005cb0| 68 61 6e 32 38 29 3b 20 | 48 41 4e 28 32 39 2c 68 |han28); |HAN(29,h|
|00005cc0| 61 6e 32 39 29 3b 20 48 | 41 4e 28 33 30 2c 68 61 |an29); H|AN(30,ha|
|00005cd0| 6e 33 30 29 3b 20 48 41 | 4e 28 33 31 2c 68 61 6e |n30); HA|N(31,han|
|00005ce0| 33 31 29 3b 0a 58 0a 58 | 73 74 61 74 69 63 20 73 |31);.X.X|static s|
|00005cf0| 69 67 5f 73 79 73 68 61 | 6e 64 6c 65 72 20 68 61 |ig_sysha|ndler ha|
|00005d00| 6e 5b 33 32 5d 20 3d 0a | 58 20 20 7b 20 68 61 6e |n[32] =.|X { han|
|00005d10| 30 20 2c 68 61 6e 31 20 | 2c 68 61 6e 32 20 2c 68 |0 ,han1 |,han2 ,h|
|00005d20| 61 6e 33 20 2c 68 61 6e | 34 20 2c 68 61 6e 35 20 |an3 ,han|4 ,han5 |
|00005d30| 2c 68 61 6e 36 20 2c 68 | 61 6e 37 20 2c 0a 58 20 |,han6 ,h|an7 ,.X |
|00005d40| 20 20 20 68 61 6e 38 20 | 2c 68 61 6e 39 20 2c 68 | han8 |,han9 ,h|
|00005d50| 61 6e 31 30 2c 68 61 6e | 31 31 2c 68 61 6e 31 32 |an10,han|11,han12|
|00005d60| 2c 68 61 6e 31 33 2c 68 | 61 6e 31 34 2c 68 61 6e |,han13,h|an14,han|
|00005d70| 31 35 2c 0a 58 20 20 20 | 20 68 61 6e 31 36 2c 68 |15,.X | han16,h|
|00005d80| 61 6e 31 37 2c 68 61 6e | 31 38 2c 68 61 6e 31 39 |an17,han|18,han19|
|00005d90| 2c 68 61 6e 32 30 2c 68 | 61 6e 32 31 2c 68 61 6e |,han20,h|an21,han|
|00005da0| 32 32 2c 68 61 6e 32 33 | 2c 0a 58 20 20 20 20 68 |22,han23|,.X h|
|00005db0| 61 6e 32 34 2c 68 61 6e | 32 35 2c 68 61 6e 32 36 |an24,han|25,han26|
|00005dc0| 2c 68 61 6e 32 37 2c 68 | 61 6e 32 38 2c 68 61 6e |,han27,h|an28,han|
|00005dd0| 32 39 2c 68 61 6e 33 30 | 2c 68 61 6e 33 31 0a 58 |29,han30|,han31.X|
|00005de0| 20 20 7d 20 3b 0a 58 0a | 58 23 64 65 66 69 6e 65 | } ;.X.|X#define|
|00005df0| 20 51 55 45 28 73 2c 68 | 29 20 53 49 47 52 45 54 | QUE(s,h|) SIGRET|
|00005e00| 5f 54 59 50 45 20 68 28 | 29 20 7b 20 71 75 6f 5b |_TYPE h(|) { quo[|
|00005e10| 73 5d 20 3d 20 31 3b 20 | 7d 0a 58 0a 58 51 55 45 |s] = 1; |}.X.XQUE|
|00005e20| 28 30 2c 71 75 65 30 29 | 3b 20 20 20 51 55 45 28 |(0,que0)|; QUE(|
|00005e30| 31 2c 71 75 65 31 29 3b | 20 20 20 51 55 45 28 32 |1,que1);| QUE(2|
|00005e40| 2c 71 75 65 32 29 3b 20 | 20 20 51 55 45 28 33 2c |,que2); | QUE(3,|
|00005e50| 71 75 65 33 29 3b 0a 58 | 51 55 45 28 34 2c 71 75 |que3);.X|QUE(4,qu|
|00005e60| 65 34 29 3b 20 20 20 51 | 55 45 28 35 2c 71 75 65 |e4); Q|UE(5,que|
|00005e70| 35 29 3b 20 20 20 51 55 | 45 28 36 2c 71 75 65 36 |5); QU|E(6,que6|
|00005e80| 29 3b 20 20 20 51 55 45 | 28 37 2c 71 75 65 37 29 |); QUE|(7,que7)|
|00005e90| 3b 0a 58 51 55 45 28 38 | 2c 71 75 65 38 29 3b 20 |;.XQUE(8|,que8); |
|00005ea0| 20 20 51 55 45 28 39 2c | 71 75 65 39 29 3b 20 20 | QUE(9,|que9); |
|00005eb0| 20 51 55 45 28 31 30 2c | 71 75 65 31 30 29 3b 20 | QUE(10,|que10); |
|00005ec0| 51 55 45 28 31 31 2c 71 | 75 65 31 31 29 3b 0a 58 |QUE(11,q|ue11);.X|
|00005ed0| 51 55 45 28 31 32 2c 71 | 75 65 31 32 29 3b 20 51 |QUE(12,q|ue12); Q|
|00005ee0| 55 45 28 31 33 2c 71 75 | 65 31 33 29 3b 20 51 55 |UE(13,qu|e13); QU|
|00005ef0| 45 28 31 34 2c 71 75 65 | 31 34 29 3b 20 51 55 45 |E(14,que|14); QUE|
|00005f00| 28 31 35 2c 71 75 65 31 | 35 29 3b 0a 58 51 55 45 |(15,que1|5);.XQUE|
|00005f10| 28 31 36 2c 71 75 65 31 | 36 29 3b 20 51 55 45 28 |(16,que1|6); QUE(|
|00005f20| 31 37 2c 71 75 65 31 37 | 29 3b 20 51 55 45 28 31 |17,que17|); QUE(1|
|00005f30| 38 2c 71 75 65 31 38 29 | 3b 20 51 55 45 28 31 39 |8,que18)|; QUE(19|
|00005f40| 2c 71 75 65 31 39 29 3b | 0a 58 51 55 45 28 32 30 |,que19);|.XQUE(20|
|00005f50| 2c 71 75 65 32 30 29 3b | 20 51 55 45 28 32 31 2c |,que20);| QUE(21,|
|00005f60| 71 75 65 32 31 29 3b 20 | 51 55 45 28 32 32 2c 71 |que21); |QUE(22,q|
|00005f70| 75 65 32 32 29 3b 20 51 | 55 45 28 32 33 2c 71 75 |ue22); Q|UE(23,qu|
|00005f80| 65 32 33 29 3b 0a 58 51 | 55 45 28 32 34 2c 71 75 |e23);.XQ|UE(24,qu|
|00005f90| 65 32 34 29 3b 20 51 55 | 45 28 32 35 2c 71 75 65 |e24); QU|E(25,que|
|00005fa0| 32 35 29 3b 20 51 55 45 | 28 32 36 2c 71 75 65 32 |25); QUE|(26,que2|
|00005fb0| 36 29 3b 20 51 55 45 28 | 32 37 2c 71 75 65 32 37 |6); QUE(|27,que27|
|00005fc0| 29 3b 0a 58 51 55 45 28 | 32 38 2c 71 75 65 32 38 |);.XQUE(|28,que28|
|00005fd0| 29 3b 20 51 55 45 28 32 | 39 2c 71 75 65 32 39 29 |); QUE(2|9,que29)|
|00005fe0| 3b 20 51 55 45 28 33 30 | 2c 71 75 65 33 30 29 3b |; QUE(30|,que30);|
|00005ff0| 20 51 55 45 28 33 31 2c | 71 75 65 33 31 29 3b 0a | QUE(31,|que31);.|
|00006000| 58 0a 58 73 74 61 74 69 | 63 20 73 69 67 5f 73 79 |X.Xstati|c sig_sy|
|00006010| 73 68 61 6e 64 6c 65 72 | 20 71 75 65 5b 33 32 5d |shandler| que[32]|
|00006020| 20 3d 0a 58 20 20 7b 20 | 71 75 65 30 20 2c 71 75 | =.X { |que0 ,qu|
|00006030| 65 31 20 2c 71 75 65 32 | 20 2c 71 75 65 33 20 2c |e1 ,que2| ,que3 ,|
|00006040| 71 75 65 34 20 2c 71 75 | 65 35 20 2c 71 75 65 36 |que4 ,qu|e5 ,que6|
|00006050| 20 2c 71 75 65 37 20 2c | 0a 58 20 20 20 20 71 75 | ,que7 ,|.X qu|
|00006060| 65 38 20 2c 71 75 65 39 | 20 2c 71 75 65 31 30 2c |e8 ,que9| ,que10,|
|00006070| 71 75 65 31 31 2c 71 75 | 65 31 32 2c 71 75 65 31 |que11,qu|e12,que1|
|00006080| 33 2c 71 75 65 31 34 2c | 71 75 65 31 35 2c 0a 58 |3,que14,|que15,.X|
|00006090| 20 20 20 20 71 75 65 31 | 36 2c 71 75 65 31 37 2c | que1|6,que17,|
|000060a0| 71 75 65 31 38 2c 71 75 | 65 31 39 2c 71 75 65 32 |que18,qu|e19,que2|
|000060b0| 30 2c 71 75 65 32 31 2c | 71 75 65 32 32 2c 71 75 |0,que21,|que22,qu|
|000060c0| 65 32 33 2c 0a 58 20 20 | 20 20 71 75 65 32 34 2c |e23,.X | que24,|
|000060d0| 71 75 65 32 35 2c 71 75 | 65 32 36 2c 71 75 65 32 |que25,qu|e26,que2|
|000060e0| 37 2c 71 75 65 32 38 2c | 71 75 65 32 39 2c 71 75 |7,que28,|que29,qu|
|000060f0| 65 33 30 2c 71 75 65 33 | 31 0a 58 20 20 7d 20 3b |e30,que3|1.X } ;|
|00006100| 0a 58 0a 58 0a 58 76 6f | 69 64 20 73 69 67 5f 69 |.X.X.Xvo|id sig_i|
|00006110| 6e 69 74 28 29 0a 58 7b | 0a 58 20 73 69 67 5f 6e |nit().X{|.X sig_n|
|00006120| 75 6d 20 69 3b 0a 58 0a | 58 20 66 6f 72 20 28 69 |um i;.X.|X for (i|
|00006130| 20 3d 20 30 3b 69 20 3c | 20 53 49 47 4e 55 4d 3b | = 0;i <| SIGNUM;|
|00006140| 69 2b 2b 29 0a 58 20 20 | 20 71 75 6f 5b 69 5d 20 |i++).X | quo[i] |
|00006150| 3d 20 30 3b 0a 58 20 66 | 6f 72 20 28 69 20 3d 20 |= 0;.X f|or (i = |
|00006160| 30 3b 69 20 3c 20 53 49 | 47 4e 55 4d 3b 69 2b 2b |0;i < SI|GNUM;i++|
|00006170| 29 0a 58 20 20 20 6f 72 | 69 67 5b 69 5d 20 3d 20 |).X or|ig[i] = |
|00006180| 73 69 67 6e 61 6c 76 28 | 69 2c 71 75 65 5b 69 5d |signalv(|i,que[i]|
|00006190| 29 3b 0a 58 7d 0a 58 0a | 58 76 6f 69 64 20 73 69 |);.X}.X.|Xvoid si|
|000061a0| 67 5f 72 65 73 74 6f 72 | 65 28 29 0a 58 7b 0a 58 |g_restor|e().X{.X|
|000061b0| 20 73 69 67 5f 6e 75 6d | 20 69 3b 0a 58 0a 58 20 | sig_num| i;.X.X |
|000061c0| 66 6f 72 20 28 69 20 3d | 20 30 3b 69 20 3c 20 53 |for (i =| 0;i < S|
|000061d0| 49 47 4e 55 4d 3b 69 2b | 2b 29 0a 58 20 20 20 28 |IGNUM;i+|+).X (|
|000061e0| 76 6f 69 64 29 20 73 69 | 67 6e 61 6c 76 28 69 2c |void) si|gnalv(i,|
|000061f0| 6f 72 69 67 5b 69 5d 29 | 3b 0a 58 7d 0a 58 0a 58 |orig[i])|;.X}.X.X|
|00006200| 76 6f 69 64 20 73 69 67 | 5f 68 61 6e 64 6c 65 28 |void sig|_handle(|
|00006210| 73 29 0a 58 73 69 67 5f | 6e 75 6d 20 73 3b 0a 58 |s).Xsig_|num s;.X|
|00006220| 7b 0a 58 20 69 66 20 28 | 71 75 6f 5b 73 5d 29 0a |{.X if (|quo[s]).|
|00006230| 58 20 20 20 68 61 6e 5b | 73 5d 28 29 3b 0a 58 20 |X han[|s]();.X |
|00006240| 28 76 6f 69 64 29 20 73 | 69 67 6e 61 6c 76 28 73 |(void) s|ignalv(s|
|00006250| 2c 68 61 6e 5b 73 5d 29 | 3b 0a 58 20 71 75 6f 5b |,han[s])|;.X quo[|
|00006260| 73 5d 20 3d 20 30 3b 0a | 58 7d 0a 58 0a 58 76 6f |s] = 0;.|X}.X.Xvo|
|00006270| 69 64 20 73 69 67 5f 69 | 67 6e 6f 72 65 28 73 29 |id sig_i|gnore(s)|
|00006280| 0a 58 73 69 67 5f 6e 75 | 6d 20 73 3b 0a 58 7b 0a |.Xsig_nu|m s;.X{.|
|00006290| 58 20 28 76 6f 69 64 29 | 20 73 69 67 6e 61 6c 76 |X (void)| signalv|
|000062a0| 28 73 2c 53 49 47 5f 49 | 47 4e 29 3b 0a 58 7d 0a |(s,SIG_I|GN);.X}.|
|000062b0| 58 0a 58 76 6f 69 64 20 | 73 69 67 5f 64 65 66 61 |X.Xvoid |sig_defa|
|000062c0| 75 6c 74 28 73 29 0a 58 | 73 69 67 5f 6e 75 6d 20 |ult(s).X|sig_num |
|000062d0| 73 3b 0a 58 7b 0a 58 20 | 28 76 6f 69 64 29 20 73 |s;.X{.X |(void) s|
|000062e0| 69 67 6e 61 6c 76 28 73 | 2c 53 49 47 5f 44 46 4c |ignalv(s|,SIG_DFL|
|000062f0| 29 3b 0a 58 7d 0a 58 0a | 58 76 6f 69 64 20 73 69 |);.X}.X.|Xvoid si|
|00006300| 67 5f 73 65 74 68 61 6e | 64 6c 65 72 28 73 2c 68 |g_sethan|dler(s,h|
|00006310| 29 0a 58 73 69 67 5f 6e | 75 6d 20 73 3b 0a 58 73 |).Xsig_n|um s;.Xs|
|00006320| 69 67 5f 68 61 6e 64 6c | 65 72 20 68 3b 0a 58 7b |ig_handl|er h;.X{|
|00006330| 0a 58 20 68 61 6e 64 6c | 65 72 5b 73 5d 20 3d 20 |.X handl|er[s] = |
|00006340| 68 3b 0a 58 7d 0a 58 0a | 58 23 69 66 64 65 66 20 |h;.X}.X.|X#ifdef |
|00006350| 53 49 47 49 4e 54 45 52 | 52 55 50 54 0a 58 76 6f |SIGINTER|RUPT.Xvo|
|00006360| 69 64 20 73 69 67 5f 69 | 6e 74 65 72 72 75 70 74 |id sig_i|nterrupt|
|00006370| 28 29 0a 58 7b 0a 58 20 | 72 65 67 69 73 74 65 72 |().X{.X |register|
|00006380| 20 73 69 67 5f 6e 75 6d | 20 73 3b 0a 58 0a 58 20 | sig_num| s;.X.X |
|00006390| 66 6f 72 20 28 73 20 3d | 20 30 3b 73 20 3c 20 53 |for (s =| 0;s < S|
|000063a0| 49 47 4e 55 4d 3b 73 2b | 2b 29 0a 58 20 20 20 28 |IGNUM;s+|+).X (|
|000063b0| 76 6f 69 64 29 20 73 69 | 67 69 6e 74 65 72 72 75 |void) si|ginterru|
|000063c0| 70 74 28 73 2c 31 29 3b | 0a 58 7d 0a 58 23 65 6e |pt(s,1);|.X}.X#en|
|000063d0| 64 69 66 0a 58 0a 58 76 | 6f 69 64 20 73 69 67 5f |dif.X.Xv|oid sig_|
|000063e0| 73 74 61 72 74 72 69 6e | 67 28 29 0a 58 7b 0a 58 |startrin|g().X{.X|
|000063f0| 20 73 74 72 75 63 74 20 | 69 74 69 6d 65 72 76 61 | struct |itimerva|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.