home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v22 / 039 < prev    next >
Mailbox/MIME Entity  |  1991-03-07  |  2.1 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 Wed Dec 26 14:23:58 1990", 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 | 57 65 64 20 44 65 63 20 |as.edu |Wed Dec |
|00000020| 32 36 20 31 34 3a 32 33 | 3a 35 38 20 31 39 39 30 |26 14:23|:58 1990|
|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 31 36 30 36 |MTP ..id| AA01606|
|00000080| 3b 20 57 65 64 2c 20 32 | 36 20 44 65 63 20 39 30 |; Wed, 2|6 Dec 90|
|00000090| 20 31 34 3a 32 33 3a 35 | 38 20 2d 30 35 30 30 0a | 14:23:5|8 -0500.|
|000000a0| 50 6f 73 74 65 64 2d 44 | 61 74 65 3a 20 32 34 20 |Posted-D|ate: 24 |
|000000b0| 44 65 63 20 39 30 20 31 | 36 3a 35 37 3a 34 34 20 |Dec 90 1|6:57:44 |
|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 | 32 29 20 0a 46 72 6f 6d |5.64/1.9|2) .From|
|000000f0| 3a 20 6a 61 73 6f 6e 40 | 63 6e 64 2e 68 70 2e 63 |: jason@|cnd.hp.c|
|00000100| 6f 6d 20 28 4a 61 73 6f | 6e 20 5a 69 6f 6e 73 29 |om (Jaso|n Zions)|
|00000110| 0a 4e 65 77 73 67 72 6f | 75 70 73 3a 20 63 6f 6d |.Newsgro|ups: com|
|00000120| 70 2e 73 74 64 2e 75 6e | 69 78 0a 53 75 62 6a 65 |p.std.un|ix.Subje|
|00000130| 63 74 3a 20 52 65 3a 20 | 71 66 6f 72 6b 28 29 0a |ct: Re: |qfork().|
|00000140| 4d 65 73 73 61 67 65 2d | 49 64 3a 20 3c 31 36 32 |Message-|Id: <162|
|00000150| 31 33 40 63 73 2e 75 74 | 65 78 61 73 2e 65 64 75 |13@cs.ut|exas.edu|
|00000160| 3e 0a 52 65 66 65 72 65 | 6e 63 65 73 3a 20 3c 31 |>.Refere|nces: <1|
|00000170| 36 30 36 36 40 63 73 2e | 75 74 65 78 61 73 2e 65 |6066@cs.|utexas.e|
|00000180| 64 75 3e 0a 53 65 6e 64 | 65 72 3a 20 6a 73 71 40 |du>.Send|er: jsq@|
|00000190| 63 73 2e 75 74 65 78 61 | 73 2e 65 64 75 0a 4f 72 |cs.utexa|s.edu.Or|
|000001a0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 48 65 77 6c |ganizati|on: Hewl|
|000001b0| 65 74 74 20 50 61 63 6b | 61 72 64 2c 20 49 6e 66 |ett Pack|ard, Inf|
|000001c0| 6f 72 6d 61 74 69 6f 6e | 20 4e 65 74 77 6f 72 6b |ormation| Network|
|000001d0| 73 20 47 72 6f 75 70 0a | 58 2d 53 75 62 6d 69 73 |s Group.|X-Submis|
|000001e0| 73 69 6f 6e 73 3a 20 73 | 74 64 2d 75 6e 69 78 40 |sions: s|td-unix@|
|000001f0| 75 75 6e 65 74 2e 75 75 | 2e 6e 65 74 0a 44 61 74 |uunet.uu|.net.Dat|
|00000200| 65 3a 20 32 34 20 44 65 | 63 20 39 30 20 31 36 3a |e: 24 De|c 90 16:|
|00000210| 35 37 3a 34 34 20 47 4d | 54 0a 52 65 70 6c 79 2d |57:44 GM|T.Reply-|
|00000220| 54 6f 3a 20 73 74 64 2d | 75 6e 69 78 40 75 75 6e |To: std-|unix@uun|
|00000230| 65 74 2e 55 55 2e 4e 45 | 54 0a 54 6f 3a 20 73 74 |et.UU.NE|T.To: st|
|00000240| 64 2d 75 6e 69 78 40 75 | 75 6e 65 74 2e 55 55 2e |d-unix@u|unet.UU.|
|00000250| 4e 45 54 0a 0a 53 75 62 | 6d 69 74 74 65 64 2d 62 |NET..Sub|mitted-b|
|00000260| 79 3a 20 6a 61 73 6f 6e | 40 63 6e 64 2e 68 70 2e |y: jason|@cnd.hp.|
|00000270| 63 6f 6d 20 28 4a 61 73 | 6f 6e 20 5a 69 6f 6e 73 |com (Jas|on Zions|
|00000280| 29 0a 0a 3e 22 54 68 65 | 20 71 66 6f 72 6b 28 29 |)..>"The| qfork()|
|00000290| 20 66 75 6e 63 74 69 6f | 6e 20 73 68 61 6c 6c 20 | functio|n shall |
|000002a0| 62 65 20 69 64 65 6e 74 | 69 63 61 6c 20 74 6f 20 |be ident|ical to |
|000002b0| 74 68 65 20 66 6f 72 6b | 28 29 20 66 75 6e 63 74 |the fork|() funct|
|000002c0| 69 6f 6e 20 77 69 74 68 | 0a 3e 20 74 68 65 20 66 |ion with|.> the f|
|000002d0| 6f 6c 6c 6f 77 69 6e 67 | 20 65 78 63 65 70 74 69 |ollowing| excepti|
|000002e0| 6f 6e 3a 20 62 65 68 61 | 76 69 6f 72 20 69 73 20 |on: beha|vior is |
|000002f0| 75 6e 64 65 66 69 6e 65 | 64 20 69 66 20 74 68 65 |undefine|d if the|
|00000300| 20 63 68 69 6c 64 20 70 | 72 6f 63 65 73 73 0a 3e | child p|rocess.>|
|00000310| 20 65 78 65 63 75 74 65 | 73 20 61 6e 79 20 63 6f | execute|s any co|
|00000320| 64 65 20 62 65 74 77 65 | 65 6e 20 74 68 65 20 72 |de betwe|en the r|
|00000330| 65 74 75 72 6e 20 66 72 | 6f 6d 20 71 66 6f 72 6b |eturn fr|om qfork|
|00000340| 28 29 20 61 6e 64 20 74 | 68 65 20 73 75 63 63 65 |() and t|he succe|
|00000350| 65 64 69 6e 67 0a 3e 20 | 63 61 6c 6c 20 74 6f 20 |eding.> |call to |
|00000360| 6f 6e 65 20 6f 66 20 74 | 68 65 20 65 78 65 63 20 |one of t|he exec |
|00000370| 66 75 6e 63 74 69 6f 6e | 73 20 6f 72 20 5f 65 78 |function|s or _ex|
|00000380| 69 74 28 29 2e 22 0a 3e | 0a 3e 54 68 69 73 20 73 |it().".>|.>This s|
|00000390| 65 65 6d 73 20 74 6f 20 | 62 65 20 61 20 76 65 72 |eems to |be a ver|
|000003a0| 79 20 68 61 72 73 68 20 | 72 65 73 74 72 69 63 74 |y harsh |restrict|
|000003b0| 69 6f 6e 2e 20 20 54 68 | 65 20 66 6f 6c 6c 6f 77 |ion. Th|e follow|
|000003c0| 69 6e 67 20 63 6f 64 65 | 20 73 65 65 6d 73 0a 3e |ing code| seems.>|
|000003d0| 6c 69 6b 65 20 69 74 20 | 77 6f 75 6c 64 20 62 65 |like it |would be|
|000003e0| 20 75 6e 64 65 66 69 6e | 65 64 3a 0a 3e 09 73 74 | undefin|ed:.>.st|
|000003f0| 61 74 75 73 20 3d 20 71 | 66 6f 72 6b 28 29 3b 0a |atus = q|fork();.|
|00000400| 3e 09 69 66 20 28 73 74 | 61 74 75 73 20 3d 3d 20 |>.if (st|atus == |
|00000410| 30 29 20 65 78 65 63 76 | 65 28 2e 2e 2e 29 3b 0a |0) execv|e(...);.|
|00000420| 3e 0a 3e 49 20 77 6f 75 | 6c 64 20 70 72 6f 70 6f |>.>I wou|ld propo|
|00000430| 73 65 20 72 65 70 6c 61 | 63 69 6e 67 20 74 68 65 |se repla|cing the|
|00000440| 20 70 68 72 61 73 65 3a | 20 22 65 78 65 63 75 74 | phrase:| "execut|
|00000450| 65 73 20 61 6e 79 20 63 | 6f 64 65 22 20 77 69 74 |es any c|ode" wit|
|00000460| 68 20 22 63 61 6c 6c 73 | 0a 3e 61 6e 79 20 66 75 |h "calls|.>any fu|
|00000470| 6e 63 74 69 6f 6e 20 64 | 65 66 69 6e 65 64 20 69 |nction d|efined i|
|00000480| 6e 20 74 68 69 73 20 73 | 74 61 6e 64 61 72 64 20 |n this s|tandard |
|00000490| 6f 72 20 74 68 65 20 43 | 20 73 74 61 6e 64 61 72 |or the C| standar|
|000004a0| 64 20 7b 38 7d 22 20 20 | 49 20 74 68 69 6e 6b 0a |d {8}" |I think.|
|000004b0| 3e 74 68 61 74 20 64 6f | 65 73 20 77 68 61 74 20 |>that do|es what |
|000004c0| 79 6f 75 20 6d 65 61 6e | 2e 0a 0a 49 20 74 68 69 |you mean|...I thi|
|000004d0| 6e 6b 20 74 68 61 74 20 | 6c 6f 6f 73 65 6e 73 20 |nk that |loosens |
|000004e0| 74 68 65 20 72 65 73 74 | 72 69 63 74 69 6f 6e 20 |the rest|riction |
|000004f0| 74 6f 6f 20 6d 75 63 68 | 2e 20 20 54 68 65 20 69 |too much|. The i|
|00000500| 6e 74 65 6e 74 20 6f 66 | 20 74 68 65 20 74 65 78 |ntent of| the tex|
|00000510| 74 2c 20 49 0a 62 65 6c | 69 65 76 65 2c 20 69 73 |t, I.bel|ieve, is|
|00000520| 20 74 68 61 74 20 2a 64 | 6f 69 6e 67 2a 20 61 6e | that *d|oing* an|
|00000530| 79 74 68 69 6e 67 20 62 | 65 74 77 65 65 6e 20 71 |ything b|etween q|
|00000540| 66 6f 72 6b 28 29 20 61 | 6e 64 20 65 78 65 63 2a |fork() a|nd exec*|
|00000550| 28 29 20 72 65 73 75 6c | 74 73 20 69 6e 0a 75 6e |() resul|ts in.un|
|00000560| 64 65 66 69 6e 65 64 20 | 62 65 68 61 76 69 6f 72 |defined |behavior|
|00000570| 2e 20 43 68 65 63 6b 69 | 6e 67 20 61 20 76 61 72 |. Checki|ng a var|
|00000580| 69 61 62 6c 65 20 64 6f | 65 73 6e 27 74 20 2a 64 |iable do|esn't *d|
|00000590| 6f 2a 20 61 6e 79 74 68 | 69 6e 67 20 69 6e 20 74 |o* anyth|ing in t|
|000005a0| 68 69 73 20 73 65 6e 73 | 65 2e 0a 54 68 65 20 74 |his sens|e..The t|
|000005b0| 65 78 74 20 74 72 69 65 | 73 20 74 6f 20 73 69 64 |ext trie|s to sid|
|000005c0| 65 73 74 65 70 20 74 68 | 65 20 69 73 73 75 65 20 |estep th|e issue |
|000005d0| 6f 66 20 22 69 73 20 71 | 66 6f 72 6b 28 29 20 61 |of "is q|fork() a|
|000005e0| 20 34 2e 32 42 53 44 2d | 73 74 79 6c 65 0a 73 68 | 4.2BSD-|style.sh|
|000005f0| 61 72 65 2d 6d 65 6d 6f | 72 79 20 70 73 65 75 64 |are-memo|ry pseud|
|00000600| 6f 2d 66 6f 72 6b 20 6f | 72 20 69 73 20 69 74 20 |o-fork o|r is it |
|00000610| 61 20 72 65 61 6c 20 66 | 6f 72 6b 20 6f 72 20 77 |a real f|ork or w|
|00000620| 68 61 74 3f 22 20 41 6e | 20 61 70 70 6c 69 63 61 |hat?" An| applica|
|00000630| 74 69 6f 6e 20 77 68 69 | 63 68 0a 74 61 6b 65 73 |tion whi|ch.takes|
|00000640| 20 61 6e 20 61 63 74 69 | 6f 6e 20 61 66 74 65 72 | an acti|on after|
|00000650| 20 71 66 6f 72 6b 28 29 | 20 61 6e 64 20 62 65 66 | qfork()| and bef|
|00000660| 6f 72 65 20 65 78 65 63 | 2a 28 29 20 74 68 61 74 |ore exec|*() that|
|00000670| 20 64 65 70 65 6e 64 73 | 20 75 70 6f 6e 20 74 68 | depends| upon th|
|00000680| 65 0a 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |e.implem|entation|
|00000690| 20 6f 66 20 71 66 6f 72 | 6b 28 29 20 62 65 69 6e | of qfor|k() bein|
|000006a0| 67 20 61 6e 79 20 6f 6e | 65 20 6f 66 20 74 68 6f |g any on|e of tho|
|000006b0| 73 65 20 74 68 69 6e 67 | 73 20 69 73 20 69 6e 68 |se thing|s is inh|
|000006c0| 65 72 65 6e 74 6c 79 0a | 75 6e 70 6f 72 74 61 62 |erently.|unportab|
|000006d0| 6c 65 2e 0a 0a 49 6e 73 | 74 65 61 64 20 6f 66 20 |le...Ins|tead of |
|000006e0| 72 65 70 6c 61 63 69 6e | 67 20 22 65 78 65 63 75 |replacin|g "execu|
|000006f0| 74 65 73 20 61 6e 79 20 | 63 6f 64 65 22 2c 20 49 |tes any |code", I|
|00000700| 20 74 68 69 6e 6b 20 79 | 6f 75 20 63 6f 75 6c 64 | think y|ou could|
|00000710| 20 6a 75 73 74 20 61 64 | 64 20 74 68 65 0a 70 68 | just ad|d the.ph|
|00000720| 72 61 73 65 20 22 77 68 | 69 63 68 20 6d 6f 64 69 |rase "wh|ich modi|
|00000730| 66 69 65 73 20 6d 65 6d | 6f 72 79 20 6f 72 20 63 |fies mem|ory or c|
|00000740| 61 6c 6c 73 20 61 6e 79 | 20 66 75 6e 63 74 69 6f |alls any| functio|
|00000750| 6e 22 20 61 6e 64 20 6d | 61 69 6e 74 61 69 6e 20 |n" and m|aintain |
|00000760| 74 68 65 0a 69 6e 74 65 | 6e 74 2e 20 45 78 61 6d |the.inte|nt. Exam|
|00000770| 69 6e 69 6e 67 20 76 61 | 72 69 61 62 6c 65 73 20 |ining va|riables |
|00000780| 64 6f 65 73 6e 27 74 20 | 64 65 70 65 6e 64 20 75 |doesn't |depend u|
|00000790| 70 6f 6e 20 74 68 65 20 | 76 69 72 74 75 61 6c 20 |pon the |virtual |
|000007a0| 6d 65 6d 6f 72 79 0a 72 | 65 6c 61 74 69 6f 6e 73 |memory.r|elations|
|000007b0| 68 69 70 20 62 65 74 77 | 65 65 6e 20 63 68 69 6c |hip betw|een chil|
|000007c0| 64 20 61 6e 64 20 70 61 | 72 65 6e 74 2c 20 62 75 |d and pa|rent, bu|
|000007d0| 74 20 6d 75 6e 67 69 6e | 67 20 61 20 73 74 61 63 |t mungin|g a stac|
|000007e0| 6b 20 66 6f 72 20 61 20 | 66 75 6e 63 74 69 6f 6e |k for a |function|
|000007f0| 0a 63 61 6c 6c 20 6d 69 | 67 68 74 20 62 65 68 61 |.call mi|ght beha|
|00000800| 76 65 20 64 69 66 66 65 | 72 65 6e 74 6c 79 20 61 |ve diffe|rently a|
|00000810| 6e 64 20 68 65 6e 63 65 | 20 6d 75 73 74 20 62 65 |nd hence| must be|
|00000820| 20 72 65 6e 64 65 72 65 | 64 20 75 6e 64 65 66 69 | rendere|d undefi|
|00000830| 6e 65 64 2e 0a 0a 4a 61 | 73 6f 6e 20 5a 69 6f 6e |ned...Ja|son Zion|
|00000840| 73 0a 0a 56 6f 6c 75 6d | 65 2d 4e 75 6d 62 65 72 |s..Volum|e-Number|
|00000850| 3a 20 56 6f 6c 75 6d 65 | 20 32 32 2c 20 4e 75 6d |: Volume| 22, Num|
|00000860| 62 65 72 20 33 39 0a 0a | |ber 39..| |
+--------+-------------------------+-------------------------+--------+--------+