home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jato!jdickson
- From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
- Subject: Re: WShell: Hangning forbid!
- Message-ID: <1992Dec13.074137.188@jato.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory
- References: <1992Dec12.143541.21468@sth.frontec.se>
- Date: Sun, 13 Dec 1992 07:41:37 GMT
- Lines: 35
-
- In article <1992Dec12.143541.21468@sth.frontec.se> bjst@sth.frontec.se (Bjorn Stenberg) writes:
- >
- >A while ago there was some talk about process syncronization when
- >multithreading, and Randell Jesup suggested doing:
- >
- > ...
- > Forbid();
- > Signal(parent,sig); // tell parent we exited
- >}
- >
- >to make sure the child has exited before any other process gets a time slice.
- >
- >Well, I do this in a child of mine, but after the parent exits WShell
- >complains with the message:
- >
- >***Hanging forbid!
- >
- >Is WShell just being paranoid or am I doing something wrong? (I'm not supposed
- >to Permit() or anything in the parent, am I?)
- >
- >Any hints are appreciated.
- >
- > -- Bjorn
- >
- >---------------------------------------------------------------------------
- >Bjorn Stenberg, Stockholm, Sweden bjst@sth.frontec.se
- >---------------------------------------------------------------------------
-
-
- My guess is that you are mistakenly letting the forbid hang in the parent pro-
- cess. When the shell runs a program, the same process is used. This explains
- how Wshell could possibly know. Child processes are their own entities (task/
- process). Wshell or any shell for that matter is totally oblivious of such.
-
- Jeff
-