GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MSGCTL(3) FreeBSD Library Functions Manual MSGCTL(3)

msgctl
???å????????楪?ڥ졼??????

Standard C Library (libc, -lc)

<sys/types.h> <sys/ipc.h> <sys/msg.h> int msgctl(int msqid, int cmd, struct msqid_ds *buf)

msgctl() ?????ƥॳ?????ϡ? msqid ?????ꤹ?????å????????塼???Ф??????楪?ڥ졼?????????¹Ԥ??ޤ???

?ƥ??å????????塼?ˤϡ??????˴?Ϣ?????ǡ?????¤?Τ??????ޤ??? ???ΰ????? msgctl() ???ѹ??Ǥ??ޤ??? msgctl() ?Υ??????????????????ǡ?????¤?⤢???ޤ??????Υǡ?????¤?Τ? ⟨sys/msg.h⟩ ?????????졢?ʲ??Τ褦?ʥ????Ф??ޤޤ??Ƥ??ޤ? (????¾?Υ????Ф? ?????ޤ?)??

struct msqid_ds {
        struct  ipc_perm msg_perm; /* ???å????????塼?Υѡ??ߥå??????ӥå? */
        struct  msg *msg_first; /* ???塼?κǽ??Υ??å????? */
        struct  msg *msg_last; /* ???塼?κǸ??Υ??å????? */
        u_long  msg_cbytes; /* ???塼?ǻ??Ѥ??Ƥ????Х??ȿ? */
        u_long  msg_qnum; /* ???塼?ǻ??Ѥ??Ƥ??????å??????? */
        u_long  msg_qbytes; /* ???塼?ǻ??Ѥ????????Х??ȿ? */
        pid_t   msg_lspid; /* ?Ǹ??? msgsnd ?Υץ?????ID  */
        pid_t   msg_lrpid; /* ?Ǹ??? msgrcv ?Υץ?????ID  */
        time_t  msg_stime; /* ?Ǹ??? msgsnd ?λ???  */
        long    msg_pad1;
        time_t  msg_rtime; /* ?Ǹ??? msgrcv ?λ???  */
        long    msg_pad2;
        time_t  msg_ctime; /* ?Ǹ??? msgctl ?λ???  */
        long    msg_pad3;
        long    msg_pad4[4];
    };

shmid_ds ??¤?Τ????ǻ??Ѥ????? ipc_perm ??¤?Τϡ? ⟨sys/ipc.h⟩ ?ǰʲ??Τ褦???????????Ƥ??ޤ???

struct ipc_perm {
        ushort  cuid;   /* ?????ԤΥ桼??ID */
        ushort  cgid;   /* ?????ԤΥ??롼??ID */
        ushort  uid;    /* ?桼??ID */
        ushort  gid;    /* ???롼??ID */
        ushort  mode;   /* r/w ?ѡ??ߥå????? */
        ushort  seq;    /* ???????????ֹ? (???դ????????줿 msg/sem/shm ID) */
        key_t   key;    /* ?桼???????ꤷ?? msg/sem/shm ???? */
};

msgctl() ???¹Ԥ??륪?ڥ졼???????ϡ??ʲ??Τ????? 1 ?Ĥ? cmd ?ǻ??ꤵ???ޤ???

???å????????塼?ξ????򽸤ᡢ buf ???ؤ???¤?Τ????֤??ޤ???
msqid ?˴?Ϣ???빽¤?Τ? msg_perm.uid ?ե??????ɡ? msg_perm.gid ?ե??????ɡ? msg_perm.mode ?ե??????ɡ? msg_qbytes ?ե??????ɤ??ͤ????ꤷ?ޤ????????ͤϡ? buf ???ؤ???¤?Τ??б??????ե??????ɤ??????????ޤ??????Υ??ڥ졼???????? ?¹ԤǤ????Τϡ??????ѥ桼?????ޤ??ϥ??å????????塼?˴?Ϣ???? ?ǡ?????¤?Τ? msg_perm.cuid ?? msg_perm.uid ?????????¸??桼?? ID ?????ĥץ??????ΤߤǤ??? msg_qbytes ???ͤ????䤻???Τϡ??????ѥ桼???ΤߤǤ????????ƥ????? ( ⟨sys/msg.h⟩ ?? MSGMNB) ???ۤ??? msg_qbytes ???ͤϡ????????¤??ڤ??ΤƤ????ޤ???
msqid ?????ꤹ?????å????????塼?????????? msqid ?˴?Ϣ???? ?ǡ??????˲????ޤ????????ѥ桼?????ޤ??ϡ????塼?? ??Ϣ?????ǡ?????¤?Τ? msg_perm.cuid ?ޤ??? msg_perm.uid ???ͤ????¸??桼?? ID ?????????ץ??????Τߤ??????????¹ԤǤ??ޤ???

???å????????塼???????ɹ??߸??????å????????塼?ؤν????߸? ( msgsnd(3) ?? msgrcv(3) ????) ?ϡ??ե???????Ʊ???褦?? ( chmod(2) ????)?? msg_perm.mode ?ե??????ɤˤ??äƷ??ޤ??ޤ????¸??桼?? ID ?ϡ? msg_perm.cuid ?ե??????ɤ? msg_perm.uid ?ե??????ɤȰ??פ????¸????롼?? ID ?ϡ? msg_perm.cgid ?? msg_perm.gid ?Ȱ??פ??ޤ???

The msgctl() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

msgctl() ?ϡ??ʲ??Τ褦?ʾ????˥??顼?Ȥʤ??ޤ???
[EPERM]
cmd ?? IPC_SET ?? IPC_RMID ???????????ƽФ?¦???????ѥ桼???ǤϤʤ????硣 ?ޤ??ϼ¸??桼?? ID ?????å????????塼?˴?Ϣ?????ǡ?????¤?? msg_perm.uid ?ե??????ɤ? msg_perm.cuid ?ե??????ɤȰ??פ??ʤ????硣

IPC_SET ???Ѥ??? msg_qbytes ???ͤ??夲?褦?Ȥ????????ƽФ?¦???????ѥ桼???Ǥʤ????硣

[EACCES]
???ޥ??ɤ? IPC_STAT ?Ǥ??뤬?????Υ??å????????塼?? ?ɹ??߸????ƽФ?¦?ˤʤ????硣
[EINVAL]
msqid ???????????å????????塼 ID ?Ǥʤ????硣

cmd ???????????ޥ??ɤǤʤ????硣

[EFAULT]
buf ???????????ɥ쥹?????ꤷ?Ƥ??ʤ????硣

msgget(3), msgrcv(3), msgsnd(3)

???å????????塼?ϡ? AT&T System V UNIX ?κǽ??Υ??꡼?????ɲä????ޤ?????
November 24, 1997 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.