SHMOP(2) HP Integral PC SHMOP(2) SHMOP(2) HP Integral PC SHMOP(2) SHMOP(2) HP Integral PC SHMOP(2) SHMOP(2) HP Integral PC SHMOP(2) NAME NAME NAME NAME shmop - shared memory operations SYNOPSIS SYNOPSIS SYNOPSIS SYNOPSIS #include #include char *shmat(shmid, shmaddr, shmflg) int shmid; char *shmaddr; int shmflg; int shmdt(shmid) char *shmid; HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY Level: HP-UX/RT Origin: UCB DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION Shmat attaches the shared memory segment associated with the shared memory identifier specified by shmid to the shared data segment of the calling process. Shmaddr must be 0, and the shared memory segment is attached at an address selected by the system. The segment is attached for reading and writing in all cases. Shmdt detaches from the calling process's data segment the shared memory segment specified by the shared memory identifier shmid. RETURN VALUES RETURN VALUES RETURN VALUES RETURN VALUES Upon successful completion, the return value of the shmat call is the user address at which the shared memory segment was attached. The return value of a successful shmdt call is 0. ERRORS ERRORS ERRORS ERRORS Shmat will not attach to a shared memory segment, will return -1, and will set errno if: Shmid is not a valid shared memory identifier [EINVAL]. Shmaddr is not equal to 0 [EINVAL]. Shmdt will fail, return -1, and set errno if: Shmid is not a valid shared memory identifier [EINVAL]. SEE ALSO SEE ALSO SEE ALSO SEE ALSO Hewlett-Packard - 1 - (printed 12/12/84) Hewlett-Packard - 1 - (printed 12/12/84) Hewlett-Packard - 1 - (printed 12/12/84) Hewlett-Packard - 1 - (printed 12/12/84) SHMOP(2) HP Integral PC SHMOP(2) SHMOP(2) HP Integral PC SHMOP(2) SHMOP(2) HP Integral PC SHMOP(2) SHMOP(2) HP Integral PC SHMOP(2) shmget(2), shmop(2), brk(2) NOTES NOTES NOTES NOTES The shared memory attach location (return value of shmat call) may no longer be valid following a call to brk(2) or sbrk(2). Hewlett-Packard - 2 - (printed 12/12/84)