|
��������
timod - ������ ���������������� ��� �������������� �
������������ �����������
��������
Timod - ��� ������ ����������������, �������������� ������������� ������� ������������� ���������� ����������
������� �����. ������ timod ����������� ����� ���������
������� ioctl(2) � ��������� ���������������, �������
����� ���������� ������, ��������������� ������������
���������. ��� ����� ��������� ��������� ������� ������������� ���������� ��� ���������, ��������� ��������.
������ timod ������ �������������� � ������, ������� ����������� �������, �������������� ������������ ��������� [��. intro(2)].
������ timod �������� ���������� ������ ������ ��� ��������� ��� ��������� ���������������, ����� ������������� ����, ������������ �� ���������� ������ ioctl(2). ��������� �� ������������� ���� ������ ioctl ������������ � �������������� ������� timod. ������ ������ ioctl ���������:
#include <sys/stropts.h> struct strioctl strioctl; strioctl.ic_cmd = �������; strioctl.ic_timeout = INFTIM; strioctl.ic_len = ������; strioctl.ic_dp = (char *) �����; ioctl (fildes, I_STR, &strioctl);
� ���� ic_len ����������� ������ ���������, ������������� ������ ������������� ����������, ��� �������� ��� ���� �������� ������ ��������� ���������, ����������� �� ������ ������������� ����������. � ���� ic_dp ���������� ������ �� �����, ���������� ���������� ���������. ������ ������ ������ ���� ���������� ��� ������ ��������� ���������. ��������� ���� ��������� ���������� �� ���������� ����� <sys/tihdr.h>. ���� ����������� ���������� �������� ���� ic_cmd:
�����
<sys/timod.h> <sys/tiuser.h> <sys/tihdr.h> <sys/errno.h>
��. �����
tirdwr(7).
�����������
���� ��������� ����� ioctl ���������� ��������, �������
0, �� ������� 8 ��� ����� �������� �������� ��� ������
������������� ���������� (���� ������ ���������� ��
���������� ����� <sys/tiuser.h>). ���� ��� ������ �����
�������� TSYSERR, ��������� 8 ��� ������������� �������� �������� ��������� ��� ������ [��������� ���� ������ ���������� �� ���������� ����� <sys/errno.h>, ��.
intro(2)].
|