home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17302 < prev    next >
Encoding:
Text File  |  1992-12-13  |  1.6 KB  |  46 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jato!jdickson
  3. From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
  4. Subject: Re: WShell: Hangning forbid!
  5. Message-ID: <1992Dec13.074137.188@jato.jpl.nasa.gov>
  6. Organization: Jet Propulsion Laboratory
  7. References: <1992Dec12.143541.21468@sth.frontec.se>
  8. Date: Sun, 13 Dec 1992 07:41:37 GMT
  9. Lines: 35
  10.  
  11. In article <1992Dec12.143541.21468@sth.frontec.se> bjst@sth.frontec.se (Bjorn Stenberg) writes:
  12. >
  13. >A while ago there was some talk about process syncronization when
  14. >multithreading, and Randell Jesup suggested doing:
  15. >
  16. >   ...
  17. >   Forbid();
  18. >   Signal(parent,sig);     // tell parent we exited
  19. >}
  20. >
  21. >to make sure the child has exited before any other process gets a time slice.
  22. >
  23. >Well, I do this in a child of mine, but after the parent exits WShell
  24. >complains with the message:
  25. >
  26. >***Hanging forbid!
  27. >
  28. >Is WShell just being paranoid or am I doing something wrong? (I'm not supposed 
  29. >to Permit() or anything in the parent, am I?)
  30. >
  31. >Any hints are appreciated.
  32. >
  33. >        -- Bjorn
  34. >
  35. >---------------------------------------------------------------------------
  36. >Bjorn Stenberg, Stockholm, Sweden                       bjst@sth.frontec.se
  37. >---------------------------------------------------------------------------
  38.  
  39.  
  40. My guess is that you are mistakenly letting the forbid hang in the parent pro-
  41. cess. When the shell runs a program, the same process is used. This explains
  42. how Wshell could possibly know. Child processes are their own entities (task/
  43. process). Wshell or any shell for that matter is totally oblivious of such.
  44.  
  45. Jeff
  46.