´ÙÀ½ À§·Î ÀÌÀü ¸ñÂ÷ ¸®´ª½º ÇÁ·Î±×·¡¸Ó¸¦ À§ÇÑ °¡À̵å

½Ã½ºÅÛ È£Ãâ:shmctl() (SYSTEM CALL:shmctl())


  SYSTEM CALL: shmctl();
  PROTOTYPE: int shmctl ( int shmqid, int cmd, struct shmid_ds *buf );
    RETURNS: 0 on success
             -1 on error: errno = EACCES (No read permission and cmd is IPC_STAT)
                                  EFAULT (Address pointed to by buf is invalid with IPC_SET and
                                          IPC_STAT commands)
                                  EIDRM  (Segment was removed during retrieval)
                                  EINVAL (shmqid invalid)
                                  EPERM  (IPC_SET or IPC_RMID command was issued, but
                                          calling process does not have write (alter)
                                          access to the segment)
      NOTES:

ÀÌ Æ¯º°ÇÑ È£ÃâÀº ¸Þ¼¼Áö Å¥ÀÇ msgctl È£Ãâ ÀÌÈÄ Á÷Á¢ÀûÀ¸·Î ¸ðµ¨ÀÌ µÈ´Ù. ÀÌ·¯ÇÑ »ç½Ç¿¡ ºñÃß¾î, ³Ê¹« »ó¼¼ÇÏ°Ô ¾ð±ÞÇÏÁö´Â ¾ÊÀ» °ÍÀÌ´Ù. À¯È¿ÇÑ ¸í·É¾î °ªµéÀº ´ÙÀ½°ú °°´Ù.:

IPC_STAT

¼¼±×¸ÕÆ®ÀÇ shmid_ds ±¸Á¶Ã¼¸¦ Á¶È¸ÇÏ°í buf ¾Æ±Ô¸ÕÆ®ÀÇ ÁּҾȿ¡ ±×°ÍÀ» ÀúÀåÇÑ´Ù.

IPC_SET

¼¼±×¸ÕÆ®ÀÇ shmid_ds ±¸Á¶Ã³ÀÇ ipc_perm ¸â¹öÀÇ °ªÀ» ÁöÁ¤ÇÑ´Ù. buf ¾Æ±Ô¸ÕÆ®·Î ºÎÅÍ ±× °ªÀ» °¡Á®¿Â´Ù.

IPC_RMID

Á¦°ÅÇϱâ À§ÇØ ¼¼±×¸ÕÆ®¿¡ Ç¥½ÃÇÑ´Ù.

IPC_RMID ¸í·É¾î´Â ½ÇÁ¦·Î Ä¿³Î·Î ºÎÅÍ ¼¼±×¸ÕÆ®¸¦ Á¦°ÅÇÏ´Â °ÍÀº ¾Æ´Ï´Ù. Á¦°ÅÇϱâ À§ÇØ ¼¼±×¸ÕÆ®¿¡ Ç¥½Ã¸¦ ÇصдÙ. ½ÇÁ¦ÀûÀÎ Á¦°Å ÀÚü´Â ÇöÀç ¼¼±×¸ÕÆ®¿¡ ºÙ¾î ÀÖ´Â(attached) ¸¶Áö¸· ÇÁ·Î¼¼½º°¡ ÀûÀýÈ÷ ºÐ¸®µÆÀ»(detached) ¶§ ÀϾ´Ù. ¹°·Ð, ÇöÀç ¼¼±×¸ÕÆ®¿¡ ºÙ¾îÀÖ´Â (attached) ÇÁ·Î¼¼½º°¡ ¾øÀ¸¸é, Á¦°Å´Â Áï½Ã ÀÌ·ç¾î Áø´Ù.

ÀûÀýÇÏ°Ô °øÀ¯ ¸Þ¸ð¸® ¼¼±×¸ÕÆ®¿¡¼­ ¶³¾îÁö±â(detach) À§ÇØ, ÇÁ·Î¼¼½º´Â shmdt ½Ã½ºÅÛ È£ÃâÀ» È£ÃâÇÑ´Ù.


ÀÌÀü:½Ã½ºÅÛ È£Ãâ:shmat() ´ÙÀ½:½Ã½ºÅÛ È£Ãâ:shmdt()

Copyright (c) 1996,1997 by Euibeom.Hwang & SangEun.Oh All Rights Reserved

Email To:Webmaster , Another address
LAST UPDATE Nov 28,1997
Created Nov 28,1997