|
̾??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
?????ꤹ?????å????????塼???Ф??????楪?ڥ졼?????????¹Ԥ??ޤ???
?ƥ??å????????塼?ˤϡ??????˴?Ϣ?????ǡ?????¤?Τ??????ޤ???
???ΰ????? 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 ???? */ };
???å????????塼???????ɹ??߸??????å????????塼?ؤν????߸? ( msgsnd(3) ?? msgrcv(3) ????) ?ϡ??ե???????Ʊ???褦?? ( chmod(2) ????)?? msg_perm.mode ?ե??????ɤˤ??äƷ??ޤ??ޤ????¸??桼?? ID ?ϡ? msg_perm.cuid ?ե??????ɤ? msg_perm.uid ?ե??????ɤȰ??פ????¸????롼?? ID ?ϡ? msg_perm.cgid ?? msg_perm.gid ?Ȱ??פ??ޤ??? ??????Themsgctl () 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 ()
?ϡ??ʲ??Τ褦?ʾ????˥??顼?Ȥʤ??ޤ???
??Ϣ????msgget(3), msgrcv(3), msgsnd(3)???????å????????塼?ϡ? AT&T System V UNIX ?κǽ??Υ???????ɲä????ޤ?????
Visit the GSP FreeBSD Man Page Interface. |