home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / openloo / 3553 < prev    next >
Encoding:
Text File  |  1992-08-21  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!mips!decwrl!csus.edu!netcom.com!kemnitz
  3. From: kemnitz@netcom.com (Greg Kemnitz)
  4. Subject: Re: Xview and process blocking?
  5. Message-ID: <45_nx0_.kemnitz@netcom.com>
  6. Date: Fri, 21 Aug 92 21:59:26 GMT
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  8. References: <3bbffny@openlook.Unify.Com>
  9. Lines: 27
  10.  
  11. In article <3bbffny@openlook.Unify.Com> fgreco@shearson.com (Frank Greco) writes:
  12. =Does anyone have any suggestions as to how to block the parent process
  13. =while the child runs in an XView environment?
  14. =
  15. =The parent process is an XView application which *must* wait until the
  16. =child process terminates (eg, a compile).  I need to have the same
  17. =behavior as system(); I need to fork()/exec() a shell that runs the
  18. =child and optionally waits/doesn't wait for the child to terminate (ie,
  19. =the appended '&').
  20. =
  21. =All of my current attempts have either gotten a no-waiting version,
  22. =or the notifier goes into an infinite loop ignoring all SIGTERM signals.
  23. =
  24. =I'm trying to be a good XView citizen and not use good 'ole system(),
  25. =which, btw, seems to work all the time...
  26. =
  27. =Thanks,
  28. =
  29. =Frank G.
  30. ==-=-=-=-=-=-=-=-=-=
  31. =
  32.  
  33. If my memory serves me right, it is something like this,
  34.  
  35. if((pid = fork()) == 0)
  36.    do something
  37.    wid = wait(&pid);
  38.