| |
� ���������� ������ msgctl ��������� ������� ���������� ������ ������ ���:
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
int msgctl (msqid, cmd, buf)
int msqid, cmd;
struct msqid_ds *buf;
��� �������� ���������� ��������� ����� ����; � ������ �������
������������ -1.
� �������� ��������� msqid ������ ��������� ������������� ������� ���������, �������������� ���������� ��� ������ ���������� ������ msgget.
����������� �������� ������������ ��������� ��������� cmd. ���������� �������� ���:
IPC_STAT
��������� ���������� � ��������� �������, ������������ � ��������� ������, ��������������� � ��������������� msqid, � ���������������� ���������, �� ������� ��������� �������� buf.
IPC_SET
� ��������� ������, ��������������� � ��������������� msqid, �������������� �������� ����������� ��������������� ������������ � ������, ���� �� ��������, ����������� ����������� ����� ���� � �������.
IPC_RMID
������� �� ������� ������������� msqid, ������������� ������ ��������� � ��������������� � ��� ��������� ������.