Related to this discussion: http://sourceware.org/ml/gdb/2007-04/msg00063.html It appeared that we should not use WaitForMultipleObjects on a file handle. Here is a patch (inspired from the way GDB deals with pipes on mingw32) to fix this issue. OK to apply? 2007-04-19 Jerome Guitton * ser-mingw.c (fd_is_file): New function. (file_select_thread): New function. (ser_console_wait_handle): Add special handling for files.