home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17321 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  2.0 KB

  1. Path: sparky!uunet!cbmvax!jesup
  2. From: jesup@cbmvax.commodore.com (Randell Jesup)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: WShell: Hangning forbid!
  5. Message-ID: <37846@cbmvax.commodore.com>
  6. Date: 14 Dec 92 03:50:56 GMT
  7. References: <1992Dec12.143541.21468@sth.frontec.se> <1992Dec13.074137.188@jato.jpl.nasa.gov>
  8. Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
  9. Organization: Commodore, West Chester, PA
  10. Lines: 35
  11.  
  12. jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
  13. >In article <1992Dec12.143541.21468@sth.frontec.se> bjst@sth.frontec.se (Bjorn Stenberg) writes:
  14. >>A while ago there was some talk about process syncronization when
  15. >>multithreading, and Randell Jesup suggested doing:
  16.  
  17. >>   Forbid();
  18. >>   Signal(parent,sig);     // tell parent we exited
  19. >>}
  20. >>to make sure the child has exited before any other process gets a time slice.
  21. >>Well, I do this in a child of mine, but after the parent exits WShell
  22. >>complains with the message:
  23. >>
  24. >>***Hanging forbid!
  25.  
  26. >My guess is that you are mistakenly letting the forbid hang in the parent pro-
  27. >cess. When the shell runs a program, the same process is used. This explains
  28. >how Wshell could possibly know. Child processes are their own entities (task/
  29. >process). Wshell or any shell for that matter is totally oblivious of such.
  30.  
  31.     I think Jeff is correct here.  Are you certain you're running the 
  32. child process as an actual separate process?  I.e. CreateNewProc() or
  33. CreateProc()?  Note that RunCommand runs the child on _your_ process.  Also
  34. note that if you're starting it as another program with System(), then you
  35. might get such a message - however, since the program would be loaded by
  36. the new shell System() starts, there's no need for the Forbid().
  37.  
  38.     If you are running it as another process, then the bug must be
  39. elsewhere.
  40.  
  41. -- 
  42. To be or not to be = 0xff
  43. -
  44. Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
  45. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
  46. Disclaimer: Nothing I say is anything other than my personal opinion.
  47.