msvcrt: Don't hold FILE critical section in some functions
Alexandre Julliard
julliard at winehq.org
Tue Nov 15 10:24:57 CST 2011
Piotr Caban <piotr at codeweavers.com> writes:
> This function is not safe under Windows 7. I was testing it with
> following program:
>
> static DWORD WINAPI block_stdin(void *arg)
> {
> _lock_file(stdout);
> return 0;
> }
>
> int main( )
> {
> DWORD thread_id;
>
> CreateThread(NULL, 0, block_stdin, NULL, 0, &thread_id);
> Sleep(500);
> _flsbuf(32, stdout);
> return 0;
> }
>
> It terminates in Windows 7. It never ends with Wine both with and
> without my patch (because of locks in fputc and fwrite).
OK then. Are you planning to add test cases for this?
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list