-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
cURL "freezes" in Windows when drag scrollbar in console window #322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What does it do exactly to make curl fail? Does it prevent/pause the writing to stdout? Isn't this a bug in Windows rather than in curl? |
Windows console IO is blocking as far as I know though I recall there may be some workaround for reading. WriteConsole is unable to write to the console while you have mousedown on the scrollbar or are selecting text or have selected text but not yet copied it. It's not specifically documented that way from what I see but that's the way it has behaved forever. It should be considered expected behavior in Windows for any program that outputs to the console and should not be considered a bug in curl. |
But why not make a workaround - stop the output in the console , so that traffic is not interrupted ? the user uses a scrollbar to see the old records in the console. And after the user releases the scrollbar to bring the latest information ( progress ) . |
If we are able in some reliable way to check the console to see if it's ok to write before writing there's still the possibility that when It's conceivable we could do some limited version of what you are suggesting by writing some of the progress output to stderr from a separate thread. That's not a catch all but it would help at least. I'm not sure if it's worth the time though. I've reopened this as an enhancement, let's see if anyone else has an opinion. |
Isn't the current process (i.e. curl) suspended when you drag the scrollbar? (Check with WinDbg, Process Explorer for example). Hence it would be nearly impossible for curl to stop the output in the console. |
WinXPSP2 x32, curl 7.42.1.
Old bug. Open console - run cmd.exe, run curl.exe URL for download - if you pull the scrollbar, then curl freezes, traffic is interrupted, and then disconnects, if you hold for a while scrollbar to view the output in the console.
The text was updated successfully, but these errors were encountered: