|
��������
lseek - ������������ ��������� ������/������
���������
long lseek (fildes, offset, whence) int fildes; long offset; int whence;
��������
�������� fildes - ��� ���������� �����, ���������� ����� ���������� ��������� ������� creat, open, dup ���
fcntl. ��������� ����� lseek ������������� ���������
������� ������� �����, ���������������� � ������������
fildes, ��������� �������, � ����������� �� ��������
��������� whence:
0 | �������� ��������� ��������������� ������ offset ����. |
---|---|
1 | � �������� �������� ��������� ������������ �������� offset. |
2 | ��������� ��������� ���������� ������ ����� ���� offset. |
��� �������� ���������� ���������� ������ lseek ������������ ����� �������� ��������� ������� ������� (� ������) ������������ ������ �����. �������, ��� ���� fildes �������� ������������ ����� �� ��������� ���������� � �������� offset ������������, ����� lseek ���������� �������� ��������� ������� �������, ���� ���� ��� ������������.
��������� ����� lseek ����������� �������� � ��������� ������� ������� �� ����������, ���� ��������� ���� �� ���� �� ��������� �������:
��������� ���������� �� ������������ ������������ ��������� ������� �������. ��� ������, ��������������� � ������ ������������, �������� ��������� �� ����������.
��. �����
creat(2), dup(2), fcntl(2), open(2).
�����������
��� �������� ���������� ����������� ������ ��������������� ����� ����� - ��������� ������� ������� � �����; � ������ ������ ������������ -1, � ���������� errno
������������� ��� ������
|