HP3000-L Archives

November 1995, Week 2

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:
"<Elbert E Silbaugh>" <[log in to unmask]>
Reply To:
Date:
Thu, 9 Nov 1995 07:29:24 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (57 lines)
I am not sure what you mean exactly about not being able to poll...
I would think you either have interrupts or you have to poll. But here
is one simple thing that we do:
 
Use the GETPROCINFO(pinnbr) intrinsic. This tells you some basic info
about the pinnbr. If you only need info of direct descendants, this can
get you the required info without any PM.
 
Another alternative: IF EACH PROCESS has their own message file they are
writing to (which the father reads), then you can call an intrinsic to
determine if there is a writer opened on that file.  This will not work
if more than one process can write to it (concurrently?).
This can be done without a wait happening.
 
Another alternative: Another post already indicated the judicious use of
message IDs. A bit more complicated because father has to keep track of
them and the son/father have to have an initial transaction to help each
other out on who is who. But it can work.
 
Summary: The easiest is GETPROCINFO
 
Elbert
 
>>>>>
Dan Hollis asks:
 
 
I have a parent process which has a bunch of child processes running
asynchronously. The parent process creates a bunch of child processes, and
then goes off into mainline code processing, with all the child processes
running asynchronously in the background.
 
The parent process is waiting for a bunch of nowait I/O reads to complete on
message files and sockets.
 
Is there any way for the parent process to be notified upon child process
termination?
 
Here are the restrictions:
 
1) The child process _cannot_ write to any of the files that the parent
process is waiting on. Yes, it would complete the parent processes' read,
but this is not an option.
 
2) The parent process cannot set a timeout on the reads, because the parent
process _must not poll_.
 
In Unix the solution is simple - using the SIGCHLD signal. Does MPE have a
 
 
 
 
 
 
 
similar signal passing facility?

ATOM RSS1 RSS2