vfork() doesn't work like that. vfork() does *not* copy the address space of the old process, and is typically used when you wan't to exec() another program which will replace the memory.

Top quote the manpage "The vfork() function creates a new process without fully copying the address space of the old process"

What you want is plain old fork()

Paul

Abhijit wrote:
Hi,

I have this issue with a sample program that I run on solaris 5.8 using vfork(). What I found is the memory of the main process is not shared with the vforked process. Any changes (stack/data) which is done in the child should get reflected in the parent.
Any help in this is hghly appreciated.

Sorry for putting up this issue in the Open Solaris Board!
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to