apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Nicholls <gnicho...@bellsouth.net>
Subject apr_file_lock on WIN32 - possible bug ?
Date Wed, 14 Mar 2007 16:42:01 GMT
    My understanding of apr_file_lock() says that a second lock for the 
same process will not suspend.
I opened a new file on WIN32 with the following:

Next I locked it with apr_file_lock(fd,APR_FLOCK_EXCLUSIVE);

An attempt to write to the file with 
apr_file_write_full(fd,ptr,len,&written); suspended.

 Looking in the apr code for file_write_full, it also grabs an exclusive 
A quick test with 2 successive calls to 
apr_file_lock(fd,APR_FLOCK_EXCLUSIVE) shows the same behaviour, the 
second lock suspends.
    Have I misunderstood something or is there a bug here ?

View raw message