home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.22 / text0096.txt < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.8 KB  |  56 lines

  1. Submitted-by: mohta@necom830.cc.titech.ac.jp (Masataka Ohta)
  2.  
  3. In article <17527@cs.utexas.edu> domo@tsa.co.uk writes:
  4.  
  5. >The problem -- one problem -- is in coming up with a ``portable''
  6. >definition of ``data space''. 
  7.  
  8. These are 'problems' (actually, not a problem) of C, not UNIX.
  9.  
  10. There is no problem about data space. C has clear and portable notion
  11. of what is data space: register and memory. That's all.
  12.  
  13. It has very little to do with UNIX nor vfork().
  14.  
  15. >On what we currently assume to be
  16. >``vanilla flavour'' architectures such as that of the 68000 which you
  17. >cite, it's fairly obvious.  But on others, it's not.  What about
  18. >registers?  Are they data space?  No?  Even on architectures with
  19. >register windows which may or may not map onto main memory addresses?
  20. >Bear in mind that such exotica are not so exotic any more: RISCs use
  21. >them widely.
  22.  
  23. Clearly, on exotic architectures, a C (not UNIX) pointer may point
  24. to a register. It may be an exotic feature of C. But, it never is a
  25. problem of C nor UNIX nor vfork().
  26.  
  27. >It seems that any definition which is safe on all architectures is
  28. >liable to constrain what one may do between [qv]fork() and exec() so
  29. >greatly
  30.  
  31. No.
  32.  
  33. First, list every operations which is safe between fork() and exec()
  34. *and* between BSD vfork() and exec().
  35.  
  36. Then, those are the safe operations of POSIX vfork() on *all* architectures.
  37.  
  38. >that it turns out to be better to define a combined spwan()
  39. >function.
  40.  
  41. Most (perhaps, more than 90%) of cases where fork/exec is necessary
  42. is covered by system(). spawn() is not necessary.
  43.  
  44. Rest are special cases, where combined spawn() can help very little
  45. and separate [v]fork() and exec() is really necessary.
  46.  
  47. Is it a role of POSIX to define unnecessary and totaly alien functions
  48. and badly modify UNIX?
  49.  
  50. Don't try to reinvent wheels.
  51.  
  52.                     Masataka Ohta
  53.  
  54. Volume-Number: Volume 22, Number 100
  55.  
  56.