home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v22 / 068.a < prev    next >
Mailbox/MIME Entity  |  1991-03-07  |  2.4 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 System V 64-bit library (executable/systemV64BitLibrary) ext Unsupported
1% dexvert COFF Library (other/coffLibrary) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file Mailbox text, 1st line "From jsq@cs.utexas.edu Thu Jan 17 03:14:52 1991", ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) 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 | 54 68 75 20 4a 61 6e 20 |as.edu |Thu Jan |
|00000020| 31 37 20 30 33 3a 31 34 | 3a 35 32 20 31 39 39 31 |17 03:14|:52 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 55 | 55 2e 4e 45 54 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 30 34 35 34 35 |MTP ..id| AA04545|
|00000080| 3b 20 54 68 75 2c 20 31 | 37 20 4a 61 6e 20 39 31 |; Thu, 1|7 Jan 91|
|00000090| 20 30 33 3a 31 34 3a 35 | 32 20 2d 30 35 30 30 0a | 03:14:5|2 -0500.|
|000000a0| 50 6f 73 74 65 64 2d 44 | 61 74 65 3a 20 31 34 20 |Posted-D|ate: 14 |
|000000b0| 4a 61 6e 20 39 31 20 31 | 34 3a 31 39 3a 30 39 20 |Jan 91 1|4:19:09 |
|000000c0| 47 4d 54 0a 52 65 63 65 | 69 76 65 64 3a 20 62 79 |GMT.Rece|ived: by|
|000000d0| 20 63 73 2e 75 74 65 78 | 61 73 2e 65 64 75 20 28 | cs.utex|as.edu (|
|000000e0| 35 2e 36 34 2f 31 2e 39 | 33 29 20 0a 46 72 6f 6d |5.64/1.9|3) .From|
|000000f0| 3a 20 70 65 74 65 72 40 | 66 69 63 63 2e 66 65 72 |: peter@|ficc.fer|
|00000100| 72 61 6e 74 69 2e 63 6f | 6d 20 28 50 65 74 65 72 |ranti.co|m (Peter|
|00000110| 20 64 61 20 53 69 6c 76 | 61 29 0a 4e 65 77 73 67 | da Silv|a).Newsg|
|00000120| 72 6f 75 70 73 3a 20 63 | 6f 6d 70 2e 73 74 64 2e |roups: c|omp.std.|
|00000130| 75 6e 69 78 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |unix.Sub|ject: Re|
|00000140| 3a 20 71 66 6f 72 6b 28 | 29 20 28 74 68 65 20 73 |: qfork(|) (the s|
|00000150| 70 61 77 6e 20 6f 66 20 | 53 70 61 77 6e 28 29 29 |pawn of |Spawn())|
|00000160| 0a 4d 65 73 73 61 67 65 | 2d 49 64 3a 20 3c 31 36 |.Message|-Id: <16|
|00000170| 39 39 32 40 63 73 2e 75 | 74 65 78 61 73 2e 65 64 |992@cs.u|texas.ed|
|00000180| 75 3e 0a 52 65 66 65 72 | 65 6e 63 65 73 3a 20 3c |u>.Refer|ences: <|
|00000190| 31 36 30 36 36 40 63 73 | 2e 75 74 65 78 61 73 2e |16066@cs|.utexas.|
|000001a0| 65 64 75 3e 20 3c 31 36 | 32 31 33 40 63 73 2e 75 |edu> <16|213@cs.u|
|000001b0| 74 65 78 61 73 2e 65 64 | 75 3e 20 3c 31 36 38 37 |texas.ed|u> <1687|
|000001c0| 35 40 63 73 2e 75 74 65 | 78 61 73 2e 65 64 75 3e |5@cs.ute|xas.edu>|
|000001d0| 0a 53 65 6e 64 65 72 3a | 20 6a 73 71 40 63 73 2e |.Sender:| jsq@cs.|
|000001e0| 75 74 65 78 61 73 2e 65 | 64 75 0a 52 65 70 6c 79 |utexas.e|du.Reply|
|000001f0| 2d 54 6f 3a 20 70 65 74 | 65 72 40 66 69 63 63 2e |-To: pet|er@ficc.|
|00000200| 66 65 72 72 61 6e 74 69 | 2e 63 6f 6d 20 28 50 65 |ferranti|.com (Pe|
|00000210| 74 65 72 20 64 61 20 53 | 69 6c 76 61 29 0a 4f 72 |ter da S|ilva).Or|
|00000220| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 58 65 6e 69 |ganizati|on: Xeni|
|00000230| 78 20 53 75 70 70 6f 72 | 74 2c 20 46 49 43 43 0a |x Suppor|t, FICC.|
|00000240| 58 2d 53 75 62 6d 69 73 | 73 69 6f 6e 73 3a 20 73 |X-Submis|sions: s|
|00000250| 74 64 2d 75 6e 69 78 40 | 75 75 6e 65 74 2e 75 75 |td-unix@|uunet.uu|
|00000260| 2e 6e 65 74 0a 44 61 74 | 65 3a 20 31 34 20 4a 61 |.net.Dat|e: 14 Ja|
|00000270| 6e 20 39 31 20 31 34 3a | 31 39 3a 30 39 20 47 4d |n 91 14:|19:09 GM|
|00000280| 54 0a 54 6f 3a 20 73 74 | 64 2d 75 6e 69 78 40 75 |T.To: st|d-unix@u|
|00000290| 75 6e 65 74 2e 55 55 2e | 4e 45 54 0a 0a 53 75 62 |unet.UU.|NET..Sub|
|000002a0| 6d 69 74 74 65 64 2d 62 | 79 3a 20 70 65 74 65 72 |mitted-b|y: peter|
|000002b0| 40 66 69 63 63 2e 66 65 | 72 72 61 6e 74 69 2e 63 |@ficc.fe|rranti.c|
|000002c0| 6f 6d 20 28 50 65 74 65 | 72 20 64 61 20 53 69 6c |om (Pete|r da Sil|
|000002d0| 76 61 29 0a 0a 49 6e 20 | 61 72 74 69 63 6c 65 20 |va)..In |article |
|000002e0| 3c 31 36 38 37 35 40 63 | 73 2e 75 74 65 78 61 73 |<16875@c|s.utexas|
|000002f0| 2e 65 64 75 3e 20 67 77 | 79 6e 40 73 6d 6f 6b 65 |.edu> gw|yn@smoke|
|00000300| 2e 62 72 6c 2e 6d 69 6c | 20 28 44 6f 75 67 20 47 |.brl.mil| (Doug G|
|00000310| 77 79 6e 29 20 77 72 69 | 74 65 73 3a 0a 3e 20 57 |wyn) wri|tes:.> W|
|00000320| 65 20 28 49 45 45 45 20 | 50 31 30 30 33 29 20 64 |e (IEEE |P1003) d|
|00000330| 65 6c 69 62 65 72 61 74 | 65 6c 79 20 6f 6d 69 74 |eliberat|ely omit|
|00000340| 74 65 64 20 76 66 6f 72 | 6b 28 29 20 66 72 6f 6d |ted vfor|k() from|
|00000350| 20 74 68 65 20 50 4f 53 | 49 58 20 73 70 65 63 0a | the POS|IX spec.|
|00000360| 3e 20 62 65 63 61 75 73 | 65 20 69 74 20 77 61 73 |> becaus|e it was|
|00000370| 20 6e 6f 74 20 6e 65 63 | 65 73 73 61 72 79 2c 20 | not nec|essary, |
|00000380| 67 69 76 65 6e 20 61 20 | 64 65 63 65 6e 74 20 69 |given a |decent i|
|00000390| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |mplement|ation of|
|000003a0| 20 66 6f 72 6b 28 29 2e | 0a 0a 50 4f 53 49 58 20 | fork().|..POSIX |
|000003b0| 69 73 20 6e 6f 74 20 73 | 75 70 70 6f 73 65 64 20 |is not s|upposed |
|000003c0| 74 6f 20 62 65 20 61 20 | 73 74 61 6e 64 61 72 64 |to be a |standard|
|000003d0| 20 66 6f 72 20 55 4e 49 | 58 20 6f 6e 6c 79 2e 20 | for UNI|X only. |
|000003e0| 49 6e 20 6d 61 6e 79 20 | 6e 6f 6e 2d 55 4e 49 58 |In many |non-UNIX|
|000003f0| 0a 65 6e 76 69 72 6f 6e | 6d 65 6e 74 73 20 61 20 |.environ|ments a |
|00000400| 22 64 65 63 65 6e 74 20 | 69 6d 70 6c 65 6d 65 6e |"decent |implemen|
|00000410| 74 61 74 69 6f 6e 20 6f | 66 20 66 6f 72 6b 22 20 |tation o|f fork" |
|00000420| 69 73 20 71 75 69 74 65 | 20 64 69 66 66 69 63 75 |is quite| difficu|
|00000430| 6c 74 20 61 6e 64 0a 6d | 61 79 20 65 76 65 6e 20 |lt and.m|ay even |
|00000440| 62 65 20 69 6d 70 6f 73 | 73 69 62 6c 65 2e 20 41 |be impos|sible. A|
|00000450| 20 70 6f 6f 72 20 69 6d | 70 6c 65 6d 65 6e 74 61 | poor im|plementa|
|00000460| 74 69 6f 6e 20 6f 66 20 | 66 6f 72 6b 28 29 20 69 |tion of |fork() i|
|00000470| 73 20 6c 69 6b 65 6c 79 | 20 74 6f 0a 63 6c 6f 62 |s likely| to.clob|
|00000480| 62 65 72 20 70 65 72 66 | 6f 72 6d 61 6e 63 65 2c |ber perf|ormance,|
|00000490| 20 67 69 76 65 6e 20 68 | 6f 77 20 63 6f 6d 6d 6f | given h|ow commo|
|000004a0| 6e 20 69 74 20 69 73 20 | 69 6e 20 55 4e 49 58 20 |n it is |in UNIX |
|000004b0| 63 6f 64 65 2e 0a 0a 49 | 20 73 75 73 70 65 63 74 |code...I| suspect|
|000004c0| 20 74 68 61 74 20 69 6e | 20 70 72 61 63 74 69 63 | that in| practic|
|000004d0| 65 20 6d 6f 73 74 20 69 | 6d 70 6c 65 6d 65 6e 74 |e most i|mplement|
|000004e0| 61 74 69 6f 6e 73 20 77 | 69 6c 6c 20 75 73 65 20 |ations w|ill use |
|000004f0| 61 6e 20 65 66 66 69 63 | 69 65 6e 74 0a 63 61 6c |an effic|ient.cal|
|00000500| 6c 20 69 6e 20 74 68 65 | 20 69 6e 74 65 72 6e 61 |l in the| interna|
|00000510| 6c 73 20 6f 66 20 73 79 | 73 74 65 6d 28 29 20 61 |ls of sy|stem() a|
|00000520| 6e 64 20 73 69 6d 69 6c | 61 72 20 6c 69 62 72 61 |nd simil|ar libra|
|00000530| 72 79 20 72 6f 75 74 69 | 6e 65 73 2e 20 45 69 74 |ry routi|nes. Eit|
|00000540| 68 65 72 0a 64 69 72 65 | 63 74 20 73 70 61 77 6e |her.dire|ct spawn|
|00000550| 73 20 6f 72 20 61 6e 20 | 69 6d 70 6c 65 6d 65 6e |s or an |implemen|
|00000560| 74 61 74 69 6f 20 6f 66 | 20 71 66 6f 72 6b 20 74 |tatio of| qfork t|
|00000570| 68 61 74 20 6c 6f 6f 6b | 73 20 73 6f 6d 65 74 68 |hat look|s someth|
|00000580| 69 6e 67 20 6c 69 6b 65 | 3a 0a 0a 09 71 66 6f 72 |ing like|:...qfor|
|00000590| 6b 28 29 0a 09 7b 0a 09 | 09 53 61 76 65 20 73 74 |k()..{..|.Save st|
|000005a0| 61 63 6b 20 63 6f 6e 74 | 65 78 74 2e 0a 09 09 56 |ack cont|ext....V|
|000005b0| 65 63 74 6f 72 20 6f 70 | 65 6e 28 29 2c 20 65 78 |ector op|en(), ex|
|000005c0| 69 74 28 29 2c 20 65 74 | 63 20 74 6f 20 70 73 65 |it(), et|c to pse|
|000005d0| 75 64 6f 20 72 6f 75 74 | 69 6e 65 73 20 74 68 61 |udo rout|ines tha|
|000005e0| 74 0a 09 09 09 73 61 76 | 65 20 66 6c 61 67 73 20 |t....sav|e flags |
|000005f0| 28 65 69 74 68 65 72 20 | 61 64 6a 75 73 74 20 6a |(either |adjust j|
|00000600| 75 6d 70 20 74 61 62 6c | 65 20 6f 72 20 73 65 74 |ump tabl|e or set|
|00000610| 0a 09 09 09 61 20 66 6c | 61 67 20 74 68 61 74 20 |....a fl|ag that |
|00000620| 74 65 6c 6c 73 20 6f 70 | 65 6e 20 77 65 27 72 65 |tells op|en we're|
|00000630| 20 22 69 6e 20 61 20 71 | 63 68 69 6c 64 22 2e 0a | "in a q|child"..|
|00000640| 09 09 52 65 74 75 72 6e | 20 30 3b 0a 09 7d 0a 0a |..Return| 0;..}..|
|00000650| 09 71 6f 70 65 6e 28 29 | 20 2f 2a 20 6e 65 77 20 |.qopen()| /* new |
|00000660| 76 65 72 73 69 6f 6e 20 | 6f 66 20 6f 70 65 6e 20 |version |of open |
|00000670| 2a 2f 0a 09 7b 0a 09 09 | 6f 70 65 6e 20 66 69 6c |*/..{...|open fil|
|00000680| 65 2c 20 73 61 76 65 20 | 64 65 73 63 72 69 70 74 |e, save |descript|
|00000690| 6f 72 0a 09 7d 0a 09 2e | 2e 2e 0a 0a 09 71 65 78 |or..}...|.....qex|
|000006a0| 65 63 28 29 20 2f 2a 20 | 6e 65 77 20 76 65 72 73 |ec() /* |new vers|
|000006b0| 69 6f 6e 20 6f 66 20 65 | 78 65 63 20 2a 2f 0a 09 |ion of e|xec */..|
|000006c0| 7b 0a 09 09 63 61 6c 6c | 20 73 70 61 77 6e 2c 20 |{...call| spawn, |
|000006d0| 70 61 73 73 69 6e 67 20 | 69 74 20 74 68 65 20 69 |passing |it the i|
|000006e0| 6e 66 6f 20 66 6f 72 20 | 74 68 65 20 6e 65 77 20 |nfo for |the new |
|000006f0| 65 78 65 63 75 74 69 6f | 6e 0a 09 09 09 65 6e 76 |executio|n....env|
|00000700| 69 72 6f 6e 6d 65 6e 74 | 20 28 6a 75 67 67 6c 69 |ironment| (juggli|
|00000710| 6e 67 20 66 64 73 2c 20 | 73 69 67 6e 61 6c 73 2c |ng fds, |signals,|
|00000720| 20 65 74 63 29 2e 0a 09 | 09 52 65 74 75 72 6e 20 | etc)...|.Return |
|00000730| 65 78 65 63 75 74 69 6f | 6e 20 65 6e 76 69 72 6f |executio|n enviro|
|00000740| 6e 6d 65 6e 74 20 74 6f | 20 74 68 65 20 6f 6e 65 |nment to| the one|
|00000750| 20 73 65 74 20 75 70 20 | 62 61 63 6b 0a 09 09 09 | set up |back....|
|00000760| 61 74 20 74 68 65 20 71 | 66 6f 72 6b 20 28 6a 75 |at the q|fork (ju|
|00000770| 67 67 6c 65 20 66 64 73 | 2c 20 65 74 63 29 0a 09 |ggle fds|, etc)..|
|00000780| 09 6c 6f 6e 67 6a 75 6d | 70 20 62 61 63 6b 20 74 |.longjum|p back t|
|00000790| 6f 20 73 61 76 65 64 20 | 73 74 61 63 6b 20 63 6f |o saved |stack co|
|000007a0| 6e 74 65 78 74 2c 20 72 | 65 74 75 72 6e 69 6e 67 |ntext, r|eturning|
|000007b0| 20 63 68 69 6c 64 20 70 | 69 64 2e 0a 09 7d 0a 0a | child p|id...}..|
|000007c0| 54 68 69 73 20 67 65 74 | 73 20 61 72 6f 75 6e 64 |This get|s around|
|000007d0| 20 74 68 65 20 63 6f 73 | 74 20 6f 66 20 63 72 65 | the cos|t of cre|
|000007e0| 61 74 69 6e 67 20 61 20 | 6e 65 77 20 65 78 65 63 |ating a |new exec|
|000007f0| 75 74 69 6f 6e 20 63 6f | 6e 74 65 78 74 20 74 68 |ution co|ntext th|
|00000800| 61 74 20 77 69 6c 6c 0a | 73 69 6d 70 6c 79 20 62 |at will.|simply b|
|00000810| 65 20 6a 75 67 67 6c 65 | 64 20 62 72 69 65 66 6c |e juggle|d briefl|
|00000820| 79 20 61 6e 64 20 64 69 | 73 63 61 72 64 65 64 2e |y and di|scarded.|
|00000830| 0a 0a 53 6f 6d 65 74 68 | 69 6e 67 20 6c 69 6b 65 |..Someth|ing like|
|00000840| 20 74 68 69 73 20 77 69 | 6c 6c 20 62 65 20 6e 65 | this wi|ll be ne|
|00000850| 65 64 65 64 20 74 6f 20 | 67 65 74 20 64 65 63 65 |eded to |get dece|
|00000860| 6e 74 20 70 65 72 66 6f | 72 6d 61 6e 63 65 20 6f |nt perfo|rmance o|
|00000870| 75 74 20 6f 66 20 73 79 | 73 74 65 6d 73 0a 6c 69 |ut of sy|stems.li|
|00000880| 6b 65 20 56 4d 53 20 77 | 68 65 72 65 20 63 72 65 |ke VMS w|here cre|
|00000890| 61 74 69 6e 67 20 61 20 | 6e 65 77 20 70 72 6f 63 |ating a |new proc|
|000008a0| 65 73 73 20 69 73 20 71 | 75 69 74 65 20 65 78 70 |ess is q|uite exp|
|000008b0| 65 6e 73 69 76 65 2e 20 | 57 68 79 20 6e 6f 74 20 |ensive. |Why not |
|000008c0| 73 74 61 6e 64 61 72 64 | 69 73 65 0a 74 68 69 73 |standard|ise.this|
|000008d0| 20 73 6f 20 70 6f 72 74 | 61 62 6c 65 20 70 72 6f | so port|able pro|
|000008e0| 67 72 61 6d 73 20 63 61 | 6e 20 74 61 6b 65 20 61 |grams ca|n take a|
|000008f0| 64 76 61 6e 74 61 67 65 | 20 6f 66 20 69 74 3f 0a |dvantage| of it?.|
|00000900| 2d 2d 20 0a 50 65 74 65 | 72 20 64 61 20 53 69 6c |-- .Pete|r da Sil|
|00000910| 76 61 2e 20 20 20 60 2d | 5f 2d 27 20 20 20 22 48 |va. `-|_-' "H|
|00000920| 61 76 65 20 79 6f 75 20 | 68 75 67 67 65 64 20 79 |ave you |hugged y|
|00000930| 6f 75 72 20 77 6f 6c 66 | 20 74 6f 64 61 79 3f 22 |our wolf| today?"|
|00000940| 0a 2b 31 20 37 31 33 20 | 32 37 34 20 35 31 38 30 |.+1 713 |274 5180|
|00000950| 2e 20 20 20 27 55 60 0a | 70 65 74 65 72 40 66 65 |. 'U`.|peter@fe|
|00000960| 72 72 61 6e 74 69 2e 63 | 6f 6d 0a 0a 56 6f 6c 75 |rranti.c|om..Volu|
|00000970| 6d 65 2d 4e 75 6d 62 65 | 72 3a 20 56 6f 6c 75 6d |me-Numbe|r: Volum|
|00000980| 65 20 32 32 2c 20 4e 75 | 6d 62 65 72 20 36 38 0a |e 22, Nu|mber 68.|
|00000990| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+