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

BrowserUk: Sounds like something simple enough for me to do. I will check that, definitely. Thanks.

Mind if I ask what does that mean? How do I simulate such a condition whereby "Select" appears as the first word on the titlebar?

Just to add:
After pressing any key, I don't have to follow up with a Return key, unlike in <STDIN>. It's just one hit on the keyboard and that's it, the program resumes. Pressing Shift or Ctrl alone won't do, but it accepts Backspace. Pressing Ctrl+C will not terminate the program with a "Terminating on signal SIGINT(2)" message like you would normally see. Instead, it resumes the program too just like most of the other keys.
  • Comment on Re^2: Perl suddenly pauses for key input

Replies are listed 'Best First'.
Re^3: Perl suddenly pauses for key input
by BrowserUk (Patriarch) on Apr 18, 2009 at 04:55 UTC

    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.
      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.