Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Why hadn't I read #595601 in detail, it has an explanation:
[quoting Jeremy Hylton] The universal newline code is squirrels the FILE * in a local variable, which is worse. If it happens that another thread closes the file, at best the local points to a closed FILE *. But that memory could get recycled and then there's no way to know what it points to. [/quoting] Even with careful coding, there's a small window between releasing the GIL on our side, and acquiring the FILE-specific lock in the glibc, during which the fclose() function can be invoked and release the FILE just before we invoke another function (e.g. fseek()) on it. ____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue815646> ____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com