HP3000-L Archives

June 2008, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Lars Appel <[log in to unmask]>
Reply To:
Date:
Wed, 25 Jun 2008 20:42:45 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
Daniel,

to activate the child process you may call the ACTIVATE intrinsic
and use the "allow" parameter to specify that you wish to suspend
your own process until the child process wakes you up again...

I'd have to check the manual, but believe that this wake-up can
be an explicit "activate parent" call in the child or the child
process termination.

I seem to recall that the CREATEPROCESS intrinsic also has some
option that is equivalent to the explicit ACTIVATE call, i.e. it
creates the child, activates it and suspends itself to waiting.

Regarding the return status of the process, you may want to check
the manuals regarding the so called "job control words", which are
a special kind of "job/session variable" (32bit unsigned int) that
are visible to all processes of a job/session (much unlike process
local environment variables in Posix, which can only be inherited
as a copy during fork).

One special job control word is named JCW and typically used by
programs to report their "return status" or "result". See SETJCW
and GETJCW intrinsics as well one of the following manuals...

  Process Management Programmer's Guide
  Interprocess Communication Programmer's Guide
  Command Interpreter Access and Variables Programmer's Guide

The system JCW typically starts with value 0 and is set by those
programs that need to report an error condition, typically by not
exiting gracefully with TERMINATE, but by calling QUIT with some
error code. Different value ranges of JCW even influence whether
a batch job continues or terminates (try SETJCW JCW,FATAL ;-)


Hope this helps or at least gives a starter.

Regards, Lars.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2