Not certain if this is the right place to ask this. I need to get two processes to use the same data. Process 1 reads text files, parses them and creates linked lists (structures).before this process terminates it display all the lists to prove the data has been loaded correctly. This works, After process 1 exits, process 2 starts. It attaches to the shared memory segment still in memory. The problem is how to get the segment to always attach at the same address used by process 1, ever time process 2 starts. Reason is that the head of each linked list is a fixed offset from the start of shared memory segment. When p2 walks the chain by setting current value pointer to the next, it points to junk.
The original (c 1990) code (in C) still runs fine on SCO but bombs out on Debian. I have already tried to use mmap in a test rig but get same results. either way I cannot list my data in the second process.
There is more than one process 2 but only one is active at a time so the basic stripped down problem is as I describe it. Any suggestions please?