in reply to Re^2: Perl suddenly pauses for key input
in thread Perl suddenly pauses for key input

If your cmd.exe windows have "Quick edit" mode enabled, then if you (or somebody) left-clicks in the window (say to bring it to the top of the window stack), then it can select (highlight for copy & paste), one or more characters. A side effect of this is that output to the screen is suspended until the C&P is completed by right-clicking.

And if the program is regularly outputting to the screen, then undisplayed output will accumulate until the internal buffer fills, at which point the next write attempt will block until the select state is ended. Effectively suspending the program. The select state can be ended by right-clicking in the window so completing the copy & paste operation.

It can also be ended by typing any key, which abandons the C&P and allow the blocked write to succeed and the program to continue. Ie. Exactly the symptoms you've described.

The Quick-edit mode is very useful, but it can be confusing if you are not aware of it, or its affects.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^3: Perl suddenly pauses for key input

Replies are listed 'Best First'.
Re^4: Perl suddenly pauses for key input
by KHLeow (Novice) on Apr 18, 2009 at 05:22 UTC
    Bingo! Just like you said, the QuickEdit mode is giving the exact symptoms!

    But I'll have to wait another 10 hours before it's my turn to use the remote PC and check to see if it really has QuickEdit mode enabled over there. Let's hope this is the case. I remember clicking on the command prompt window too right before this strange problem occurred.

    Anyhow, thanks a bunch BrowserUK. You've been a great help.