home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v22 / 105 < prev    next >
Mailbox/MIME Entity  |  1991-03-07  |  2.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file Mailbox text, 1st line "From jsq@cs.utexas.edu Mon Feb 4 19:23:19 1991", ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime application/mbox default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 6a 73 71 | 40 63 73 2e 75 74 65 78 |From jsq|@cs.utex|
|00000010| 61 73 2e 65 64 75 20 20 | 4d 6f 6e 20 46 65 62 20 |as.edu |Mon Feb |
|00000020| 20 34 20 31 39 3a 32 33 | 3a 31 39 20 31 39 39 31 | 4 19:23|:19 1991|
|00000030| 0a 52 65 63 65 69 76 65 | 64 3a 20 66 72 6f 6d 20 |.Receive|d: from |
|00000040| 63 73 2e 75 74 65 78 61 | 73 2e 65 64 75 20 62 79 |cs.utexa|s.edu by|
|00000050| 20 75 75 6e 65 74 2e 75 | 75 2e 6e 65 74 20 28 35 | uunet.u|u.net (5|
|00000060| 2e 36 31 2f 31 2e 31 34 | 29 20 77 69 74 68 20 53 |.61/1.14|) with S|
|00000070| 4d 54 50 20 0a 09 69 64 | 20 41 41 31 32 31 35 31 |MTP ..id| AA12151|
|00000080| 3b 20 4d 6f 6e 2c 20 34 | 20 46 65 62 20 39 31 20 |; Mon, 4| Feb 91 |
|00000090| 31 39 3a 32 33 3a 31 39 | 20 2d 30 35 30 30 0a 50 |19:23:19| -0500.P|
|000000a0| 6f 73 74 65 64 2d 44 61 | 74 65 3a 20 34 20 46 65 |osted-Da|te: 4 Fe|
|000000b0| 62 20 39 31 20 31 36 3a | 34 35 3a 31 37 20 47 4d |b 91 16:|45:17 GM|
|000000c0| 54 0a 52 65 63 65 69 76 | 65 64 3a 20 62 79 20 63 |T.Receiv|ed: by c|
|000000d0| 73 2e 75 74 65 78 61 73 | 2e 65 64 75 20 28 35 2e |s.utexas|.edu (5.|
|000000e0| 36 34 2f 31 2e 39 33 29 | 20 0a 46 72 6f 6d 3a 20 |64/1.93)| .From: |
|000000f0| 70 65 74 65 72 40 66 69 | 63 63 2e 66 65 72 72 61 |peter@fi|cc.ferra|
|00000100| 6e 74 69 2e 63 6f 6d 20 | 28 50 65 74 65 72 20 64 |nti.com |(Peter d|
|00000110| 61 20 53 69 6c 76 61 29 | 0a 4e 65 77 73 67 72 6f |a Silva)|.Newsgro|
|00000120| 75 70 73 3a 20 63 6f 6d | 70 2e 73 74 64 2e 75 6e |ups: com|p.std.un|
|00000130| 69 78 0a 53 75 62 6a 65 | 63 74 3a 20 73 70 61 77 |ix.Subje|ct: spaw|
|00000140| 6e 28 29 20 77 61 72 73 | 2e 2e 2e 20 70 6c 65 61 |n() wars|... plea|
|00000150| 73 65 2e 2e 2e 20 6e 6f | 74 20 61 67 61 69 6e 2e |se... no|t again.|
|00000160| 2e 2e 0a 4d 65 73 73 61 | 67 65 2d 49 64 3a 20 3c |...Messa|ge-Id: <|
|00000170| 31 37 36 33 33 40 63 73 | 2e 75 74 65 78 61 73 2e |17633@cs|.utexas.|
|00000180| 65 64 75 3e 0a 53 65 6e | 64 65 72 3a 20 6a 73 71 |edu>.Sen|der: jsq|
|00000190| 40 63 73 2e 75 74 65 78 | 61 73 2e 65 64 75 0a 58 |@cs.utex|as.edu.X|
|000001a0| 2d 53 75 62 6d 69 73 73 | 69 6f 6e 73 3a 20 73 74 |-Submiss|ions: st|
|000001b0| 64 2d 75 6e 69 78 40 75 | 75 6e 65 74 2e 75 75 2e |d-unix@u|unet.uu.|
|000001c0| 6e 65 74 0a 44 61 74 65 | 3a 20 34 20 46 65 62 20 |net.Date|: 4 Feb |
|000001d0| 39 31 20 31 36 3a 34 35 | 3a 31 37 20 47 4d 54 0a |91 16:45|:17 GMT.|
|000001e0| 52 65 70 6c 79 2d 54 6f | 3a 20 73 74 64 2d 75 6e |Reply-To|: std-un|
|000001f0| 69 78 40 75 75 6e 65 74 | 2e 75 75 2e 6e 65 74 0a |ix@uunet|.uu.net.|
|00000200| 54 6f 3a 20 73 74 64 2d | 75 6e 69 78 40 75 75 6e |To: std-|unix@uun|
|00000210| 65 74 2e 75 75 2e 6e 65 | 74 0a 0a 53 75 62 6d 69 |et.uu.ne|t..Submi|
|00000220| 74 74 65 64 2d 62 79 3a | 20 70 65 74 65 72 40 66 |tted-by:| peter@f|
|00000230| 69 63 63 2e 66 65 72 72 | 61 6e 74 69 2e 63 6f 6d |icc.ferr|anti.com|
|00000240| 20 28 50 65 74 65 72 20 | 64 61 20 53 69 6c 76 61 | (Peter |da Silva|
|00000250| 29 0a 0a 4c 6f 6f 6b 2c | 20 49 20 6b 6e 6f 77 20 |)..Look,| I know |
|00000260| 79 6f 75 20 64 6f 6e 27 | 74 20 6c 69 6b 65 20 73 |you don'|t like s|
|00000270| 70 61 77 6e 28 29 2e 20 | 42 75 74 20 69 6e 20 61 |pawn(). |But in a|
|00000280| 20 6c 6f 74 20 6f 66 20 | 65 6e 76 69 72 6f 6e 6d | lot of |environm|
|00000290| 65 6e 74 73 2e 2e 2e 20 | 49 4e 43 4c 55 44 49 4e |ents... |INCLUDIN|
|000002a0| 47 0a 4f 4e 45 53 20 54 | 48 41 54 20 41 52 45 20 |G.ONES T|HAT ARE |
|000002b0| 4f 54 48 45 52 57 49 53 | 45 20 51 55 49 54 45 20 |OTHERWIS|E QUITE |
|000002c0| 43 41 50 41 42 4c 45 20 | 4f 46 20 53 55 50 50 4f |CAPABLE |OF SUPPO|
|000002d0| 52 54 49 4e 47 20 41 20 | 50 4f 53 49 58 20 41 42 |RTING A |POSIX AB|
|000002e0| 49 2e 2e 2e 20 69 74 20 | 69 73 20 2a 6e 6f 74 2a |I... it |is *not*|
|000002f0| 0a 70 6f 73 73 69 62 6c | 65 20 74 6f 20 64 6f 20 |.possibl|e to do |
|00000300| 61 20 73 61 66 65 20 61 | 6e 64 20 65 66 66 69 63 |a safe a|nd effic|
|00000310| 69 65 6e 74 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |ient imp|lementat|
|00000320| 69 6f 6e 20 6f 66 20 66 | 6f 72 6b 28 29 2e 20 4c |ion of f|ork(). L|
|00000330| 65 61 76 65 20 69 6e 20 | 74 68 65 0a 66 6f 72 6b |eave in |the.fork|
|00000340| 28 29 20 63 61 6c 6c 2c | 20 62 75 74 20 61 6c 6c |() call,| but all|
|00000350| 6f 77 20 61 20 6d 6f 72 | 65 20 65 66 66 69 63 69 |ow a mor|e effici|
|00000360| 65 6e 74 20 28 61 6e 64 | 2c 20 6c 65 74 27 73 20 |ent (and|, let's |
|00000370| 66 61 63 65 20 69 74 2c | 20 65 61 73 69 65 72 20 |face it,| easier |
|00000380| 74 6f 0a 75 6e 64 65 72 | 73 74 61 6e 64 29 20 61 |to.under|stand) a|
|00000390| 6c 74 65 72 6e 61 74 69 | 76 65 3a 20 73 70 61 77 |lternati|ve: spaw|
|000003a0| 6e 28 29 2e 0a 0a 49 6e | 20 61 72 74 69 63 6c 65 |n()...In| article|
|000003b0| 20 3c 31 37 35 39 38 40 | 63 73 2e 75 74 65 78 61 | <17598@|cs.utexa|
|000003c0| 73 2e 65 64 75 3e 20 6d | 6f 68 74 61 40 6e 65 63 |s.edu> m|ohta@nec|
|000003d0| 6f 6d 38 33 30 2e 63 63 | 2e 74 69 74 65 63 68 2e |om830.cc|.titech.|
|000003e0| 61 63 2e 6a 70 20 28 4d | 61 73 61 74 61 6b 61 20 |ac.jp (M|asataka |
|000003f0| 4f 68 74 61 29 20 77 72 | 69 74 65 73 3a 0a 3e 20 |Ohta) wr|ites:.> |
|00000400| 46 69 72 73 74 2c 20 6c | 69 73 74 20 65 76 65 72 |First, l|ist ever|
|00000410| 79 20 6f 70 65 72 61 74 | 69 6f 6e 73 20 77 68 69 |y operat|ions whi|
|00000420| 63 68 20 69 73 20 73 61 | 66 65 20 62 65 74 77 65 |ch is sa|fe betwe|
|00000430| 65 6e 20 66 6f 72 6b 28 | 29 20 61 6e 64 20 65 78 |en fork(|) and ex|
|00000440| 65 63 28 29 0a 3e 20 2a | 61 6e 64 2a 20 62 65 74 |ec().> *|and* bet|
|00000450| 77 65 65 6e 20 42 53 44 | 20 76 66 6f 72 6b 28 29 |ween BSD| vfork()|
|00000460| 20 61 6e 64 20 65 78 65 | 63 28 29 2e 0a 0a 3e 20 | and exe|c()...> |
|00000470| 54 68 65 6e 2c 20 74 68 | 6f 73 65 20 61 72 65 20 |Then, th|ose are |
|00000480| 74 68 65 20 73 61 66 65 | 20 6f 70 65 72 61 74 69 |the safe| operati|
|00000490| 6f 6e 73 20 6f 66 20 50 | 4f 53 49 58 20 76 66 6f |ons of P|OSIX vfo|
|000004a0| 72 6b 28 29 20 6f 6e 20 | 2a 61 6c 6c 2a 20 61 72 |rk() on |*all* ar|
|000004b0| 63 68 69 74 65 63 74 75 | 72 65 73 2e 0a 0a 4e 6f |chitectu|res...No|
|000004c0| 2e 20 54 68 6f 73 65 20 | 61 72 65 20 74 68 65 20 |. Those |are the |
|000004d0| 73 61 66 65 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |safe ope|rations |
|000004e0| 62 65 74 77 65 65 6e 20 | 66 6f 72 6b 28 29 20 61 |between |fork() a|
|000004f0| 6e 64 20 65 78 65 63 28 | 29 20 6f 6e 20 55 4e 49 |nd exec(|) on UNI|
|00000500| 58 2e 0a 0a 50 4f 53 49 | 58 20 6c 6f 6f 6b 73 20 |X...POSI|X looks |
|00000510| 6c 69 6b 65 20 69 74 27 | 73 20 67 6f 69 6e 67 20 |like it'|s going |
|00000520| 74 6f 20 63 6f 6d 70 72 | 69 73 65 20 66 61 72 20 |to compr|ise far |
|00000530| 6d 6f 72 65 20 74 68 61 | 6e 20 55 4e 49 58 2e 0a |more tha|n UNIX..|
|00000540| 0a 4c 65 74 27 73 20 73 | 61 79 20 79 6f 75 20 64 |.Let's s|ay you d|
|00000550| 65 66 69 6e 65 20 76 66 | 6f 72 6b 28 29 20 61 73 |efine vf|ork() as|
|00000560| 20 22 73 65 74 20 61 20 | 66 6c 61 67 20 74 68 61 | "set a |flag tha|
|00000570| 74 20 61 6c 6c 20 70 6f | 73 69 78 20 63 61 6c 6c |t all po|six call|
|00000580| 73 20 74 68 61 74 20 64 | 65 61 6c 0a 77 69 74 68 |s that d|eal.with|
|00000590| 20 75 69 64 2c 20 73 69 | 67 6e 61 6c 73 2c 20 66 | uid, si|gnals, f|
|000005a0| 69 6c 65 73 2c 20 65 74 | 63 2e 2e 2e 20 6c 6f 6f |iles, et|c... loo|
|000005b0| 6b 20 61 74 2c 20 73 6f | 20 74 68 65 79 20 6a 75 |k at, so| they ju|
|000005c0| 73 74 20 77 72 69 74 65 | 20 61 20 22 73 63 72 69 |st write| a "scri|
|000005d0| 70 74 22 20 6f 66 0a 61 | 63 74 69 6f 6e 73 20 74 |pt" of.a|ctions t|
|000005e0| 6f 20 74 61 6b 65 20 6f | 6e 20 62 65 68 61 6c 66 |o take o|n behalf|
|000005f0| 20 6f 66 20 74 68 65 20 | 6e 65 77 20 70 72 6f 63 | of the |new proc|
|00000600| 65 73 73 22 2e 0a 0a 54 | 68 65 6e 2c 20 79 6f 75 |ess"...T|hen, you|
|00000610| 20 64 65 66 69 6e 65 20 | 22 65 78 65 63 22 20 61 | define |"exec" a|
|00000620| 73 20 22 6c 6f 6f 6b 20 | 61 74 20 74 68 65 20 73 |s "look |at the s|
|00000630| 63 72 69 70 74 2c 20 69 | 66 20 74 68 65 72 65 2c |cript, i|f there,|
|00000640| 20 61 6e 64 20 63 6f 6e | 73 20 75 70 20 61 6e 0a | and con|s up an.|
|00000650| 65 66 66 69 63 69 65 6e | 74 20 73 79 73 74 65 6d |efficien|t system|
|00000660| 20 63 61 6c 6c 20 6f 6e | 20 74 68 65 20 75 6e 64 | call on| the und|
|00000670| 65 72 6c 79 69 6e 67 20 | 4f 2f 53 20 28 56 4d 53 |erlying |O/S (VMS|
|00000680| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 29 20 74 |, for ex|ample) t|
|00000690| 6f 20 73 61 74 69 73 66 | 79 0a 69 74 22 2e 0a 0a |o satisf|y.it"...|
|000006a0| 3e 20 4d 6f 73 74 20 28 | 70 65 72 68 61 70 73 2c |> Most (|perhaps,|
|000006b0| 20 6d 6f 72 65 20 74 68 | 61 6e 20 39 30 25 29 20 | more th|an 90%) |
|000006c0| 6f 66 20 63 61 73 65 73 | 20 77 68 65 72 65 20 66 |of cases| where f|
|000006d0| 6f 72 6b 2f 65 78 65 63 | 20 69 73 20 6e 65 63 65 |ork/exec| is nece|
|000006e0| 73 73 61 72 79 0a 3e 20 | 69 73 20 63 6f 76 65 72 |ssary.> |is cover|
|000006f0| 65 64 20 62 79 20 73 79 | 73 74 65 6d 28 29 2e 20 |ed by sy|stem(). |
|00000700| 73 70 61 77 6e 28 29 20 | 69 73 20 6e 6f 74 20 6e |spawn() |is not n|
|00000710| 65 63 65 73 73 61 72 79 | 2e 0a 0a 09 4e 6f 2c 20 |ecessary|....No, |
|00000720| 73 79 73 74 65 6d 28 29 | 20 61 6e 64 20 70 6f 70 |system()| and pop|
|00000730| 65 6e 28 29 20 63 61 6e | 20 6e 6f 74 2c 20 65 76 |en() can| not, ev|
|00000740| 65 72 2c 20 6c 65 74 20 | 79 6f 75 20 70 61 73 73 |er, let |you pass|
|00000750| 20 61 20 73 65 74 20 6f | 66 0a 09 61 72 67 75 6d | a set o|f..argum|
|00000760| 65 6e 74 73 20 74 6f 20 | 61 20 70 72 6f 67 72 61 |ents to |a progra|
|00000770| 6d 20 77 69 74 68 6f 75 | 74 20 64 69 64 64 6c 69 |m withou|t diddli|
|00000780| 6e 67 20 62 79 20 74 68 | 65 20 73 68 65 6c 6c 2e |ng by th|e shell.|
|00000790| 20 57 68 65 6e 20 79 6f | 75 0a 09 68 61 76 65 20 | When yo|u..have |
|000007a0| 6e 6f 20 77 61 79 20 6f | 66 20 6b 6e 6f 77 69 6e |no way o|f knowin|
|000007b0| 67 20 77 68 65 74 68 65 | 72 20 74 68 61 74 20 73 |g whethe|r that s|
|000007c0| 68 65 6c 6c 20 77 69 6c | 6c 20 62 65 20 73 68 2c |hell wil|l be sh,|
|000007d0| 20 63 73 68 2c 20 6b 73 | 68 2c 0a 09 6f 72 20 65 | csh, ks|h,..or e|
|000007e0| 76 65 6e 20 72 63 20 77 | 68 61 74 20 63 61 6e 20 |ven rc w|hat can |
|000007f0| 79 6f 75 20 64 6f 20 74 | 6f 20 70 72 6f 74 65 63 |you do t|o protec|
|00000800| 74 20 79 6f 75 72 73 65 | 6c 66 3f 0a 0a 09 57 68 |t yourse|lf?...Wh|
|00000810| 6f 20 6b 6e 6f 77 73 2c | 20 49 20 63 61 6e 20 65 |o knows,| I can e|
|00000820| 61 73 69 6c 79 20 69 6d | 61 67 69 6e 65 20 44 45 |asily im|agine DE|
|00000830| 43 20 73 65 74 74 69 6e | 67 20 74 68 69 6e 67 73 |C settin|g things|
|00000840| 20 75 70 20 73 6f 20 61 | 20 75 73 65 72 0a 09 63 | up so a| user..c|
|00000850| 6f 75 6c 64 20 73 65 74 | 20 68 69 73 20 73 68 65 |ould set| his she|
|00000860| 6c 6c 20 74 6f 20 44 43 | 4c 20 61 6e 64 20 68 6f |ll to DC|L and ho|
|00000870| 73 65 20 2a 65 76 65 72 | 79 74 68 69 6e 67 2a 20 |se *ever|ything* |
|00000880| 75 70 2e 0a 0a 09 55 73 | 69 6e 67 20 73 79 73 74 |up....Us|ing syst|
|00000890| 65 6d 28 29 20 69 6e 20 | 70 72 6f 67 72 61 6d 73 |em() in |programs|
|000008a0| 20 6c 69 6b 65 20 28 66 | 6f 72 20 65 78 61 6d 70 | like (f|or examp|
|000008b0| 6c 65 29 20 75 75 63 70 | 2c 20 6d 61 69 6c 20 68 |le) uucp|, mail h|
|000008c0| 61 6e 64 6c 65 72 73 2c | 0a 09 61 6e 64 20 73 6f |andlers,|..and so|
|000008d0| 20 6f 6e 20 69 73 20 61 | 20 73 65 63 75 72 69 74 | on is a| securit|
|000008e0| 79 20 68 6f 6c 65 20 79 | 6f 75 20 63 61 6e 20 64 |y hole y|ou can d|
|000008f0| 72 69 76 65 20 61 20 74 | 72 75 63 6b 20 74 68 72 |rive a t|ruck thr|
|00000900| 6f 75 67 68 2e 20 54 68 | 65 72 65 0a 09 61 72 65 |ough. Th|ere..are|
|00000910| 20 6c 6f 74 73 20 6f 66 | 20 73 79 73 74 65 6d 73 | lots of| systems|
|00000920| 20 77 68 65 72 65 20 79 | 6f 75 20 63 61 6e 20 75 | where y|ou can u|
|00000930| 73 65 20 74 68 69 73 20 | 74 6f 20 67 65 74 20 70 |se this |to get p|
|00000940| 72 65 74 74 79 20 6d 75 | 63 68 20 2a 61 6e 79 2a |retty mu|ch *any*|
|00000950| 0a 09 66 69 6c 65 20 6f | 6e 20 61 20 6e 65 69 67 |..file o|n a neig|
|00000960| 68 62 6f 72 27 73 20 6d | 61 63 68 69 6e 65 2e 0a |hbor's m|achine..|
|00000970| 2d 2d 20 0a 50 65 74 65 | 72 20 64 61 20 53 69 6c |-- .Pete|r da Sil|
|00000980| 76 61 2e 20 20 60 2d 5f | 2d 27 20 20 70 65 74 65 |va. `-_|-' pete|
|00000990| 72 40 66 65 72 72 61 6e | 74 69 2e 63 6f 6d 0a 2b |r@ferran|ti.com.+|
|000009a0| 31 20 37 31 33 20 32 37 | 34 20 35 31 38 30 2e 20 |1 713 27|4 5180. |
|000009b0| 20 27 55 60 20 20 22 48 | 61 76 65 20 79 6f 75 20 | 'U` "H|ave you |
|000009c0| 68 75 67 67 65 64 20 79 | 6f 75 72 20 77 6f 6c 66 |hugged y|our wolf|
|000009d0| 20 74 6f 64 61 79 3f 22 | 0a 0a 56 6f 6c 75 6d 65 | today?"|..Volume|
|000009e0| 2d 4e 75 6d 62 65 72 3a | 20 56 6f 6c 75 6d 65 20 |-Number:| Volume |
|000009f0| 32 32 2c 20 4e 75 6d 62 | 65 72 20 31 30 35 0a 0a |22, Numb|er 105..|
+--------+-------------------------+-------------------------+--------+--------+