I am trying to create a shared memory between two processes using mmap()
. The child process is written in a sperate c file, and executed using execve()
.
Q1: Is there any way to share the shared memory address int *shmem
with the child process other than the pipe?
Q2: I successfully could get the shared memory address on the child process but, I cannot access the data "array of int" stored by the parent process in the shared memory segment, is it related to some restrictions on mmap()
or what?