I don't even play a UNIX expert on TV but doesn't FORK give the child a total clone of the parent's address space? If X (for any X, including a load module) was at address aaa before the FORK, will it not be at address aaa for both parent and child after the FORK?
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Thomas David Rivers Sent: Tuesday, July 10, 2018 10:09 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: load module loaded address between BPX LOAD (load_hfs) and ptrace+fork+exec? In a program, you can issue the BPX LOAD service to load a program into memory... and similar to the LOAD macro, this returns the address where the module was loaded, and the starting address. Now - is there any guarantee that if you then do a BPX FORK and then a BPX EXEC to execute the module, that the module will be loaded at the same address in the child? If the child that is doing the BPX EXEC is running under PTRACE, does that change things? If there is such a guarantee, I can't seem to find it documented anywhere; any pointers on that? - Thanks - - Dave Rivers - -- riv...@dignus.com Work: (919) 676-0847 Get your mainframe programming tools at http://www.dignus.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN