̾??
shmat
, shmdt
—
??ͭ?????????å??ޤ??ϥǥ??å?????
Standard C Library (libc, -lc)
shmat
()
?????ƥॳ?????ϡ? shmid
?ˤ??äƼ??̤??줿??ͭ?????ꥻ???????Ȥ??ƤӽФ??ץ???????
???ɥ쥹???֤˥????å????ޤ???
?????????Ȥ??????å??????륢?ɥ쥹?ϼ??Τ褦?˷??ꤵ???ޤ?:
- addr ?? 0
?ξ??硢?????????Ȥϡ??????ͥ뤬???????ɥ쥹?˥????å??????ޤ???
- addr ?? 0 ?Ǥʤ????????? SHM_RND ??
flag
?ǻ??ꤵ???ʤ????硢?????????Ȥϻ????Υ??ɥ쥹?˥????å??????ޤ???
- addr ?????ꤵ???Ƥ??ꡢ??????
SHM_RND ?????ꤵ???Ƥ??????硢 addr
?ϺǤ??ᤤ SHMLBA
???ܿ????ڼΤƤ????ޤ???
shmdt
()
?ϡ? addr
?ǻ??ꤵ???륢?ɥ쥹?ˤ??붦ͭ?????ꥻ???????ȤƤӽФ??ץ???????
???ɥ쥹???֤????ǥ??å????ޤ???
?????˴?λ?????ȡ?
shmat
()
?ϥ????????Ȥ??????å??????Ƥ??륢?ɥ쥹???֤??ޤ???
?????Ǥʤ??????? -1
???֤??졢???顼????????
errno ?????ꤵ???ޤ???
The shmdt
() function returns the value 0 if
successful; otherwise the value -1 is returned and the global
variable errno is set to indicate the error.
shmat
()
?????ƥॳ?????ϼ??ξ????˽????????Ԥ??ޤ?:
- [
EINVAL
]
- shmid
???б????붦ͭ?????ꥻ???????Ȥ????Ĥ????ޤ????Ǥ?????
- [
EINVAL
]
- addr
??????ͭ???ʥ??ɥ쥹?ǤϤ????ޤ????Ǥ?????
shmdt
()
?????ƥॳ?????ϼ??ξ????˽????˼??Ԥ??ޤ?:
- [
EINVAL
]
- addr
?????϶?ͭ?????ꥻ???????Ȥ??ؤ??Ƥ??ޤ?????