TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jonathan de Boyne Pollar
from: David Noon
date: 1996-11-14 21:15:08
subject: blockreading from a pipe

On Wednesday, 96/11/13, Jonathan de Boyne Pollard wrote to Udo van den
Heuvel about "blockreading from a pipe" as follows:

JP>    *However*, when reading from a pipe the maximum number of bytes that
JP>    you can read depends from the size of the pipe buffer specified in the
JP>    call to DosCreatePipe.

Hi Jonathan,

On a blocking call to DosRead() the size of the pipe management buffer
should be irrelevant. The thread reading the pipe should block until
the requested number of bytes has been obtained or the pipe is
disconnected. The buffer size should only be for memory management
within the pipe support API's.

JP>    This is because once a process *writes* that number of bytes into the
JP>    pipe, further writes will be blocked until the data have been read from
JP>    the other end.

The thread writing the data to the pipe and the thread reading it
should be totally asynchronous. The write thread being blocked due to
full buffers should not cause the reading thread to be resumed
prematurely.

While I don't doubt that what you say is the likely cause of what Udo
is seeing, it seems to me like a design flaw in OS/2's pipe support.

Regards

Dave


 * KWQ/2 1.2i * Bugs come in through open Windows.

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1
@PATH: 440/4 141/209 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.