On Thu, 25 May 2017 11:46:20 -0500, John McKown <john.archie.mck...@gmail.com> wrote:
>On Thu, May 25, 2017 at 10:44 AM, Walt Farrell <walt.farr...@gmail.com> >wrote: >> execmvs() would be better than LINKX or ATTACHX for this scenario, in >> general, as it handles all the environmental cleanup and handles any >> necessary authorization issues. >> > >I was looking at both execmvs() and attach_execmvs(). execmvs() says that >it "replaces the previous process image". IIRC, that means that the child >process no longer has access to the point-in-time-of-original-fork copy of >the parent's key 8 storage. So, no passing "read only" type data in memory. >Which is possibly a good thing. UNIX likes to pass data using something >like environment variables or "shared memory" (which is what I'd likely use >if the child needs to update the original program's memory). >attach_execmvs() starts a new process __in the same address space__ and so >has the "plus" of retaining all the parent's memory. That is, the new >process which runs the requested child program will still have the copy of >the original parent's (grandparent's) key 8 storage. I don't know for sure, but I see issues with considering attach_execmvs() in this scenario. You can't end up with two processes in the same address space without dealing with authorization issues. For example, how will attach_execmvs() deal with an APF-authorized parent process trying to attach a non-authorized child process? I think that's a guaranteed S306 abend (or some equivalent UNIX error code). Therefor, I think the existing (parent) APF-authorized process would have to give up APF authorization before it could safely use attach_execmvs() in this scenario. However, once it's done that, what happens if attach_execmvs() determines that the new process needs to run APF-authorized? It could not do that in the same address space as the (now) unauthorized parent. Therefore, another failure. -- Walt ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN