home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5175 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.0 KB

  1. Path: sparky!uunet!wupost!psuvax1!psuvm!mkk2
  2. Organization: Penn State University
  3. Date: Wed, 22 Jul 1992 10:33:26 EDT
  4. From: <MKK2@psuvm.psu.edu>
  5. Message-ID: <92204.103326MKK2@psuvm.psu.edu>
  6. Newsgroups: comp.sys.next.programmer
  7. Subject: Re: launching shell commands
  8. References:  <92203.164622MKK2@psuvm.psu.edu>
  9. Lines: 16
  10.  
  11. I've answered my own question.  (John Immordino at NeXT answered it too, and
  12. it didn't cost me $225---yet 8-) 8-)
  13.  
  14. At first, I had given up on the Examples, but then I remembered that they
  15. might use vfork instead of fork. Sure enough, a DL search on vfork() turned
  16. up Subprocess.m, which does just what I needed.
  17.  
  18. It's in Examples/Subprocess.  You send it a shell command, and it vfork()'s,
  19. execs the command in a /bin/sh, sets up a DPSAddFD(), and then sends a
  20. message containing stdout each time appears.
  21.  
  22. It seems like a pretty nice solution.  If someone has added a lot of
  23. functionality to Subprocess, it'd be a good candidate to the archives.
  24.  
  25. Thanks to everyone who emailed me suggestions.  Thanks again nets, just
  26. for being there.
  27.