2786 } |
2786 } |
2787 return NULL; |
2787 return NULL; |
2788 } |
2788 } |
2789 |
2789 |
2790 // attach to the region |
2790 // attach to the region |
2791 addr = (char*)shmat(shmid, NULL, 0); |
2791 addr = (char*)shmat(shmid, req_addr, 0); |
2792 int err = errno; |
2792 int err = errno; |
2793 |
2793 |
2794 // Remove shmid. If shmat() is successful, the actual shared memory segment |
2794 // Remove shmid. If shmat() is successful, the actual shared memory segment |
2795 // will be deleted when it's detached by shmdt() or when the process |
2795 // will be deleted when it's detached by shmdt() or when the process |
2796 // terminates. If shmat() is not successful this will remove the shared |
2796 // terminates. If shmat() is not successful this will remove the shared |