I m developing an application in which I launch a fork to execute a child process.
In the child process I want to create a linked list with many nodes and each node should created with malloc() and then copy the linked list to the parent. because the linked list is created only in the child and it does not exist in the parent.
How to do it ?
You must use some inter-process communications method, like shared memory, pipes, files on disk, sockets, and so on. Since processes are typically isolated from each other, you can’t just pass the pointers around.