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

  1. Submitted-by: addw@phcomp.co.uk (Alain Williams)
  2.  
  3. > There's a difference between:
  4. >     P1003 will not compromise the interface to accomodate
  5. >     layered implementations.
  6. > And:
  7. >     P1003 is for UNIX only.
  8. > And I fail to see how an extension that happens to make it easier to
  9. > write portable programs that remain reasonably efficient on layered
  10. > implementations compromises the interface. Nobody's saying "get rid
  11. > of fork()" this time.
  12. OK, so you are writing a program that you intend to port onto every Posix
  13. machine in the universe. Do you use fork()/exec() or do you use spawn() ?
  14.  
  15. If you are writing the system(3C) function the answer is easy, if your
  16. application does a little more work in between fork() & exec(), do you jump
  17. though hoops to use whatever spawn() turns out to be and ``damage'' your
  18. implementation on true UNIX boxes for a new non-UNIX ones ?
  19.  
  20. I guess that what you would do is to use good old #ifdef to get the best of
  21. both worlds. So I don't think that it really matters what we end up with
  22. as long as the fork()/exec() alternative is well defined so that we only have
  23. to do the non-UNIX posix port once.
  24.  
  25. What would be probably quite usefull is a
  26.     #define FORK_IS_PAINFULL
  27. that we can test and thus compile in the spawn() code.
  28.  
  29. You should not forget that these standards are supposed to make life
  30. easier for application writer. Also the (good) application writer takes a
  31. pragmatic approach and does the best job that he can in a given environment,
  32. the most important thing is to get it working reasonably well - and quickly.
  33.  
  34. Alain Williams
  35.  
  36. +44 734 461232
  37.  
  38. phLOGIN our Turnkey Security Login utility is available NOW - ask me for info.
  39.  
  40. Volume-Number: Volume 22, Number 81
  41.  
  42.