<s>
In	O
modern	O
POSIX	O
compliant	O
operating	B-General_Concept
systems	I-General_Concept
,	O
a	O
program	O
that	O
needs	O
to	O
access	O
data	O
from	O
a	O
file	B-Operating_System
stored	O
in	O
a	O
file	B-Application
system	I-Application
uses	O
the	O
read	O
system	O
call	O
.	O
</s>
<s>
The	O
file	B-Operating_System
is	O
identified	O
by	O
a	O
file	B-Application
descriptor	I-Application
that	O
is	O
normally	O
obtained	O
from	O
a	O
previous	O
call	O
to	O
open	B-Language
.	O
</s>
<s>
This	O
system	O
call	O
reads	O
in	O
data	O
in	O
bytes	B-Application
,	O
the	O
number	O
of	O
which	O
is	O
specified	O
by	O
the	O
caller	O
,	O
from	O
the	O
file	B-Operating_System
and	O
stores	O
then	O
into	O
a	O
buffer	O
supplied	O
by	O
the	O
calling	O
process	O
.	O
</s>
<s>
The	O
file	B-Application
descriptor	I-Application
of	O
the	O
file	B-Operating_System
.	O
</s>
<s>
the	O
number	O
of	O
bytes	B-Application
to	O
be	O
read	O
from	O
the	O
file	B-Operating_System
.	O
</s>
<s>
Data	O
from	O
a	O
file	B-Operating_System
is	O
read	O
by	O
calling	O
the	O
read	O
function	O
:	O
</s>
<s>
The	O
value	O
returned	O
is	O
the	O
number	O
of	O
bytes	B-Application
read	O
(	O
zero	O
indicates	O
end	B-Language
of	I-Language
file	I-Language
)	O
and	O
the	O
file	B-Operating_System
position	O
is	O
advanced	O
by	O
this	O
number	O
.	O
</s>
<s>
It	O
is	O
not	O
an	O
error	O
if	O
this	O
number	O
is	O
smaller	O
than	O
the	O
number	O
of	O
bytes	B-Application
requested	O
;	O
this	O
may	O
happen	O
for	O
example	O
because	O
fewer	O
bytes	B-Application
are	O
actually	O
available	O
right	O
now	O
(	O
maybe	O
because	O
we	O
were	O
close	O
to	O
end-of-file	B-Language
,	O
or	O
because	O
we	O
are	O
reading	O
from	O
a	O
pipe	B-Operating_System
,	O
or	O
from	O
a	O
terminal	B-General_Concept
)	O
,	O
or	O
because	O
the	O
system	O
call	O
was	O
interrupted	O
by	O
a	O
signal	B-Operating_System
.	O
</s>
<s>
Alternatively	O
,	O
-1	O
is	O
returned	O
when	O
an	O
error	O
occurs	O
,	O
in	O
such	O
a	O
case	O
errno	B-Error_Name
is	O
set	O
appropriately	O
and	O
further	O
it	O
is	O
left	O
unspecified	O
whether	O
the	O
file	B-Operating_System
position	O
(	O
if	O
any	O
)	O
changes	O
.	O
</s>
