Server for Information Technologies óÅÒ×ÅÒ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ
ãÅÎÔÒÏÍ éÎÆÏÒÍÁÃÉÏÎÎÙÈ ôÅÈÎÏÌÏÇÉÊ
(095) 932-9212, 932-9213, 939-0783
E-mail: info@citforum.ru
óÅÒ×ÅÒ ÓÏÄÅÒÖÉÔ ÍÏÒÅ(!) ÁÎÁÌÉÔÉÞÅÓËÏÊ ÉÎÆÏÒÍÁÃÉÉ CIT Forum CD-ROM

RDCHK(3)
NIX System V (21 ÉÀÎÑ 1987)

éíñ
rdchk - Ðpo×epÑeÔ ÎaÌÉÞÉe ÄaÎÎÙx ÄÌÑ ÞÔeÎÉÑ

óéîôáëóéó

	int rdchk (fdes)
	int fdes;

ïðéóáîéå
rdchk Ðpo×epÑeÔ, ÂyÄeÔ ÌÉ ÐpoÃecc ÂÌoËÉpo×aÎ, ecÌÉ oÎ ÐoÐÙÔaeÔcÑ ÞÉÔaÔØ ÆaÊÌ c ÎoÍepoÍ fdes. rdchk ×oÚ×paÝaeÔ 1, ecÌÉ ecÔØ ÄaÎÎÙe ÄÌÑ ÞÔeÎÉÑ ÉÌÉ ÄocÔÉÇÎyÔ ËoÎeà ÆaÊÌa (EOF). OÂÙÞÎo, rdchk ÉcÐoÌØÚyeÔcÑ × ÔaËoÍ ËoÎÔeËcÔe:

     if(rdchk(fildes)>0)
          read(fildes,buffer,nbytes);

óí. ôáëöå
read(3)

äéáçîïóôéëá
rdchk ×oÚ×paÝaeÔ -1, ecÌÉ oÂÎapyÖeÎa oÛÉÂËa EBADF, 0, ecÌÉ ÐpoÃecc ÂyÄeÔ ÂÌoËÉpo×aÎ ÐocÌe ×ÙÚo×a read, É 1, ecÌÉ ÞÔeÎÉe ×oÚÍoÖÎo. OÛÉÂËa EBADF ×oÚÎÉËaeÔ, ecÌÉ ×ÙÚo× rdchk ÐpÉÍeÎeÎ Ë ceÍaÆopÎoÍy ÆaÊÌy ÉÌÉ yËaÚaÎÎÙÊ ÆaÊÌ Îe cyÝecÔ×yeÔ.

úAíEþAîéñ
ðpoÇpaÍÍa, ÉcÐoÌØÚyÀÝaÑ ÜÔy ÆyÎËÃÉÀ, ÄoÌÖÎa ËoÍÐoÎo×aÔØcÑ c ÆÌaÇoÍ -lx.
Comments: info@citmgu.ru
Designed by Andrey Novikov
Copyright © CIT