Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2001 15:06:30 +0100 (CET)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: read(2) on BLOCKED socket
Message-ID:  <200112111406.fBBE6UO91751@lurza.secnetix.de>
In-Reply-To: <20011211142317.A1245@bspu.secna.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
mitrohin a.s. <swp@uni-altai.ru> wrote:
 > Why socket blocked read(2) return big data by portions?

Because POSIX and SUSv2 say so:

<quote>

The value returned may be less than <nbyte> if the number
of bytes left in the file is less than <nbyte>, if the
read() request was interrupted by a signal, or if the file
is a pipe or FIFO or special file and has fewer than
<nbyte> bytes immediately available for reading.

</quote>

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112111406.fBBE6UO91751>