HP OpenVMS Systems

ask the wizard
Content starts here

Process Control Middleware?

» close window

The Question is:

I have process which spawns a subprocess. The subprocess executes DCL in a
 forever loop to periodically transfer some files using FTP.
The subprocess is spawned by a process calling LIB$SPAWN() with no wait
If the process exits the image and has nothing else to return to then OpenVMS
 deletes the subprocess (and the process).
If on the other hand the process has a DCL to return to then OpenVMS does not
 delete the subprocess. However if I then run the program again then I get
 another but now unwanted subprocess. Is there a way to specify deletion (or
 forcex) of a subprocess as
a result of the master process exiting the image from where the subprocess was
 created? The flags argument of LIB$SPAWN() does not appear to support this.
 Maybe because it does not make sense.
Thank you very much.

The Answer is :

  The present design is unfortunately flawed, as there is no notification
  made to the subprocess when the parent process image is run down, and
  there is no such (transparent) notification mechanism available.
  Alternative approaches include the use of a pool of server processes,
  and mechanisms to create, connect to, and to time out the server
  processes as required.  Or the use of a DECnet or IP task-to-task
  connection to the server process, a connection that -- when broken
  -- will cause the server process to run itself down.  Or the use of
  other tracking and other communications mechanisms, such as shared
  Alternatively, find and directly use APIs for the required operations,
  rather than using DCL.  (If such APIs are available.  Without specifics
  of the DCL invoked in the subprocess, this may or may not be feasible.)
  The existing discussions (159), (1910), (3530), (3531), (3365) and
  (3791) appear potentially relevent here, you will want to review those
  You are quite clearly designing and writing your own application
  middleware environment.  Accordingly, you will also want to evaluate
  the available commercial alternatives.

answer written or last revised on ( 24-AUG-2001 )

» close window