* Fix for : read()
@ 2004-03-02 1:38 Jason Winter
0 siblings, 0 replies; only message in thread
From: Jason Winter @ 2004-03-02 1:38 UTC (permalink / raw)
To: cygwin
Hi Corinna,
(For continued reference:)
>The Tape Block Length information is in MSDN, within the document Q161338
>in the
>knowledge base.
The CygWin read() function calls ReadFile() repeatedly while the programmers
read buffer-length parameter value "#of bytes" hasn't been read from the
handle. Under Unix, low-level IO read() doesn't always return 100 bytes in
this call:
rc = read (h, buf, 100);
In fact, if h refers to a tape, which also has a vaiable-block of data ready
to be read at the current tape position.. You may only get, say, 80 bytes
returned if it's a 80 byte block record. In CygWin, since it continues to
call ReadFile() in the cygwin1.dll read() function, the programmer, me
actually, loses all record of the tapes original data-block-length - with
CygWin read() you might think the block was 100 bytes long - having started
to read the next block on the tape. (20 bytes of it in this example.)
Jason.
_________________________________________________________________
SEEK: Now with over 50,000 dream jobs! Click here
http://ninemsn.seek.com.au/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-02 1:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-02 1:38 Fix for : read() Jason Winter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).