Re: fork()

From: Kilkenny (gjerde@plains.nodak.edu)
Date: 12/19/95


In message <199512190953.AA170416795@elektron.et.tudelft.nl> you said:
> If fork() copies all memory from the parent proces to the child 
> proces how are pointers handled?
> Would they still point to the parents memory?

Probably not with fork(), but if you are running a fairly new version of 
linux (1.3.3x+, not sure), it has something similar called clone().  If 
given the right parameters, the child will have shared memory with it's 
parent.  According to the man page it doesn't work yet, but that's old, 
and supposedly it works fine.  I haven't tried it yet.
I've looked around on a couple of sun machines, but I couldn't find 
something similar, but I just looked real quick.

***************************************************************************
*  Ole Gjerde                                   | Computer Science major  *
*                                               |    at  North Dakota     *
*  Homepage: http://www.winternet.com/~gjerde   |    State University     *
*  Email:    Gjerde@plains.NoDak.edu            |-------------------------*
*            Gjerde@winternet.com               |   Proud user of Linux   *
***************************************************************************



This archive was generated by hypermail 2b30 : 12/07/00 PST