http://bugs.winehq.org/show_bug.cgi?id=29076
Bug #: 29076 Summary: Critical section deadlock occurs when windows application receives SIGINT during reading from stdin Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: Chaos.A.D88@gmail.com Classification: Unclassified
Critical section deadlock occurs when windows application receives SIGINT during reading from stdin.
It is very strange, but the more complex my tests are - the easier to reproduce the hangup.
Example 1 hangs in ~10% of cases when I press Ctrl+C in terminal: #include <iostream> int main() { char c; std::cin >> c; }
Example 2 hangs more often, but also only when i press Ctrl+C: #include <string> #include <iostream> int main() { std::string s; std::getline(std::cin, s); }
Example 3 hangs almost always when pressing Ctrl+C, and in ~50% of cases when I simply pass SIGINT to the application #include <string> #include <iostream> int main() { std::string s; std::getline(std::cin, s); std::cout << s << std::endl; }
All examples compiled by Visual Studio 2010. Running just with `wine test.exe`