apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject apr_file_gets()/apr_file_read() locking problem
Date Thu, 22 Mar 2007 02:15:21 GMT
I just bumped into this today with 1.2.x, but the code is more or less
the same in trunk. I opened a temporary file with apr_file_mktemp(),
which in turn opened an APR file with a mutex (not sure why, but that's
what happened on FC6 ). So far, so good.

If apr_file_gets() is called on that file, mutex is locked (line 340 in
trunk of readwrite.c) in this function. However, this function then
calls apr_file_read(), which attempts to lock the same mutex again (line
45 in trunk of readwrite.c), which hangs the program.

Did anyone see this?


View raw message