[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pexec mode 4 and 104



I have a couple questions about Pexec 4 and Pexec 104.

If the parent program passes an inheritable file handle to the child,
can the child make use of the handle, even if the file wasn't opened until
after the Pexec(104) took place?  So, does WHEN a file is opened have
any significance?  I would think that only file handles that were opened at
the time of Pexec(4/104) would be inheritable.  Is this so?

Does memory sharing work both ways?  According to the ATARI Compendium,
a the child (executed by Pexec 4/104) will share all of its parents memory.
I would assume that the parent can also access all of the child's memory 
too, especially since the parent owns the basepage :-)

What about GEM?  Can a child executed through Pexec 4 or 104 use its
parent's application id and make AES calls as if it was the parent since
it shares all its memory?  Or woudl the child have to open a new appl_id
with appl_init()?  This would be inconvienient for my purposes since I
would also need an evnt_multi() loop and I wanted to block waiting on
Pmsg() calls, not evnt_multi() - I'd have to poll for one or the other :-(

What about  malloc?  If the child app calls's the parent's malloc(), and
that malloc() requests more memory from teh OS, then it will be called from
the context of the new process.  Wouldn't this mess up the malloc() arena?

Thanks for any answers :-)

CYA,
Evan Langlois