> > If the parent is activating the child with a non-zero
> 'allow' parameter to
> > ACTIVATE, you need to change that last call to pass zero
> for 'allow' (or
> > omit it).
>
> Thanks for sending me that direction. I had wondered (but
> never tried it) what
> would be the use in calling Activate with a zero (or missing)
> allow parameter.
> If I've understood it correctly, it makes the process active,
> but it won't
> actually start doing anything until the parent process
> terminates.
No, that isn't what it means; ACTIVATE(x, 0) simply means (not in OS
specifics, but in concepts) "move process x from the suspended list to the
runnable list". Execution of the caller continues normally until it reaches
the end of its quantum, initiates I/O, or does something else to cause the
scheduler to run some other process. Eventually, that "other process" will
be "x".
You may be thinking of a parent process that creates/activates a child and
indicates in a CREATEPROCESS, ACTIVATE, or SUSPEND call that it wants to be
suspended until the child activates it; such a parent will be activated when
the child terminates, even if the child does nothing to activate the parent.
> I'm needing
> the child process to do its cleanup and get out of the way
> prior to the parent
> process ending, so that doesn't happen to solve my needs
Actually it does: just call ACTIVATE(childpin, 0). The child will
(eventually) wake up, do its cleanup, and terminate. If the parent needs to
wait until the child finishes its cleanup, use ACTIVATE(childpin, 2) and
have the child call ACTIVATE(0, 0) just before it exits.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|