rev 281 - trunk/modules/File
SVN User <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bcollins Date: 2004-04-04 20:36:40 -0400 (Sun, 04 Apr 2004) New Revision: 281 Modified: trunk/modules/File/File.c Log: Fix deadlock in File.__init__ Modified: trunk/modules/File/File.c =================================================================== --- trunk/modules/File/File.c 2004-04-04 20:00:07 UTC (rev 280) +++ trunk/modules/File/File.c 2004-04-05 00:36:40 UTC (rev 281) @@ -185,7 +185,13 @@ apr_pool_destroy(subpool); return NULL; } + + /* set_file_obj() modified the object, and thus calls write_lock. + * We need to unlock in order to avoid a deadlock */ + read_unlock(ist, self); set_file_obj(self, parms[1], parms[3], f, (int)(parms[5]->data.i64), flags); + read_lock(ist, self); + return NULL; }