HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)

s
shmop(2) shmop(2)
[EINVAL] shmaddr is not the data segment start address of a shared memory segment.
EXAMPLES
The following call to
shmat() attaches the shared memory segment to the process. This example
assumes the process has a valid shmid, which can be obtained by calling shmget(2).
char *shmptr;
shmptr = (char *) shmat(myshmid, 0, 0);
The following call to shmdt() then detaches the shared memory segment.
shmdt (shmptr);
SEE ALSO
ipcs(1), exec(2), exit(2), fork(2), ftok(3C), shmctl(2), shmget(2).
STANDARDS CONFORMANCE
shmat(): SVID2, SVID3, XPG2, XPG3, XPG4
shmdt(): SVID2, SVID3, XPG2, XPG3, XPG4
Section 2352 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005