apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garrett Rooney <roo...@electricjellyfish.net>
Subject Re: [PATCH] win32 - dropped data in read_with_timeout
Date Sun, 22 Jan 2006 04:57:37 GMT
On 1/19/06, Norris Leong <mpleong@clustertech.com> wrote:
> Hi All,
>
> I suspect that read_with_timeout (in file_io/win32/readwrite.c) may drop
> data if
>
> (i) WaitForSingleObject (line 82) returns WAIT_TIMEOUT, and
> (ii) Data arrived before the execution arrives at CancelIo (line 105).
>
> Tried the attached patch and the problem seems solved.  I'm a novice of
> Windows' file mgmt API and would appreciate if somebody can validate
> this patch.

This seems reasonable to me, although I'm not anywhere close to a
win32 expert, so I can't say for sure.  Have you actually seen this
race in practice, or is it just a theoretical possibility?  I'm only
asking because I'd be much more comfortable applying a patch if the
contributor can say "this actually fixes a reproducable problem" ;-)

-garrett

Mime
View raw message