home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cbmvax!jesup
- From: jesup@cbmvax.commodore.com (Randell Jesup)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: WShell: Hangning forbid!
- Message-ID: <37846@cbmvax.commodore.com>
- Date: 14 Dec 92 03:50:56 GMT
- References: <1992Dec12.143541.21468@sth.frontec.se> <1992Dec13.074137.188@jato.jpl.nasa.gov>
- Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
- Organization: Commodore, West Chester, PA
- Lines: 35
-
- jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
- >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!
-
- >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.
-
- I think Jeff is correct here. Are you certain you're running the
- child process as an actual separate process? I.e. CreateNewProc() or
- CreateProc()? Note that RunCommand runs the child on _your_ process. Also
- note that if you're starting it as another program with System(), then you
- might get such a message - however, since the program would be loaded by
- the new shell System() starts, there's no need for the Forbid().
-
- If you are running it as another process, then the bug must be
- elsewhere.
-
- --
- To be or not to be = 0xff
- -
- Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
- {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup
- Disclaimer: Nothing I say is anything other than my personal opinion.
-