BARMSTRO@carleton.EDU (Pod Stolom Consulting) (03/15/88)
>> I am looking for a system service or run-time library routine that >> will allow me to execute a second image. I want to do this in such a >> way that the flow of control will pass entirely to the second image, >> and will return to the first image at the calling point after the >> second image completes. Neither CREPRC nor LIB$SPAWN seem to do this, >> which makes sense since their purpose is to create another process >> altogether. I just want the SAME process to start executing a second >> image. I'm sure I'm overlooking something obvious... > >LIB$DO_COMMAND >LIB$RUN_PROGRAM > -- Jerry While I shouldn't be correcting my elders, Mary Malmros wants to "return to the first image at the calling point after the second image completes". Page RTL-97 (volume 8B, VAX/VMS System Routines) states that: During the call to LIB$DO_COMMAND, the current image exits and control cannot return to it. The section for LIB$RUN_PROGRAM (page RTL-254) reads much like this: The calling program cannot regain control. If you could split the original image into pieces which all call each other, you could make your VAX look like a PDP. However, I suspect that the reason for the original question was not due to limited address space, but rather for greater flexibility of design or because source for one of these programs is not available to add RTL calls to (anything in SYS$SYSTEM, for example). Disclaimer: I may not have the _vaguest_ idea of what I am talking about. +-----------------------------------------------------------------------+ | Borden Armstrong Computer Center | | System Manager and Carleton College | | Academic Programmer/Analyst 1 North College Street | | Northfield, MN 55057 | | barmstro@carleton.edu U. S. A. | | ...!umn-cs!stolaf!agnes!ccnfld!barmstro (507)663-4277 | +-----------------------------------------------------------------------+
dhesi@bsu-cs.UUCP (Rahul Dhesi) (03/23/88)
>>> I am looking for a system service or run-time library routine that >>> will allow me to execute a second image. I want to do this in such a >>> way that the flow of control will pass entirely to the second image, >>> and will return to the first image at the calling point after the >>> second image completes. Neither CREPRC nor LIB$SPAWN seem to do this, >>> which makes sense since their purpose is to create another process >>> altogether. This is a contradictory request. If you want control to return to the first image after the call, you are effectively asking that the context of the first image be saved. This means that you wish to create a new context for the second image. This means that you wish to create a new process. This means that you wish to use CREPRC or LIB$SPAWN. -- Rahul Dhesi UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi