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

Re: Pfork()



Jo Even Skarstein <joska@nuts.edu> writes:

|> On 17 Aug 1998, Andreas Schwab wrote:
|> 
|> > Jo Even Skarstein <joska@nuts.edu> writes:
|> > 
|> > |> I guess this is a stupid question, but if it's so that Pfork gives the new
|> > |> process a *copy* of the DATA and BSS segments, why doesn't the
|> > |> AES/VDI-bindings get a new copy of their global arrays?
|> > 
|> > They do, but the AES/VDI still does not know anything about the split.
|> > Thus they will behave as if the two forked processes are one and the same.
|> 
|> I'm afraid I don't understand this. If the new process indeed has new
|> AES/VDI global arrays, *and* the bindings know about them, how can AES/VDI
|> be confused? The bindings pass pointers to their global arrays in d1
|> (IIRC), so when you create a new application in the thread with
|> appl_init() then everything should be ok?

Yes, that should work, but only if the AES is multiprocess aware.  The VDI
should not have a problem with this, but don't forget to call v_opnvwk
in the new process, too.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org