[P&AM Lab] ��������� �������

Grigoriy A. Sitkarev sitkarev �� komitex.ru
�� ��� 15 21:09:12 MSK 2011


� man-� ��������:

gets() and fgets() return s on success, and NULL on error or when end of 
file occurs while no characters have been read.

����� �������� �� NULL, �����������.

������ ������� ������? ��������� ��� ��� �������� ��� ��� ���������� 
��������� ��������������� �����-������, �.�. ��� �� ���� ���� �£���� 
��� �������������� ������/�������. � ��� ������ ��� �ӣ ��� ����� 
��������� � read(2), write(2) ����� ��������� � � fgets(3). �� ����� 
������ �������� ��� � ������ � fgets(3) ��� ��� �� ����� �� ����� 
������� -- ��� ���� ������ ��� �� ����. ���� ��� ��� ������, �� errno 
����� ��������������� ������� ����������� � �ӣ.

����� �������� �� �������. ������������� � ��������� ��� ��� ��������� 
�� �������� � ����� ��������� ����� �����������:

1. ������ ����� ������ ������� Ctrl+D;
2. ������� �������� ������ SIGUSR1.

� ������ �������, ������ ��� ������. �� ����� ������ ���� ��� ��������� 
��� ������ fgets(3) ����� �����������.

--
�.�.

15.02.2011 19:38, ���������� ������� �����:
> ��� ���� �������� �� ������ � fgets. � ����� � ���� ������-�� ����� ����? � ���� �� ��������.


----------- �������� ����� -----------
A non-text attachment was scrubbed...
Name: stdioerr.c
Type: text/x-csrc
Size: 733 bytes
Desc: �����������
URL: <http://amplab.syktsu.ru/pipermail/lab/attachments/20110215/12579ac9/attachment.c>


��������� ���������� � ������ �������� Lab