Windows 7 – What Happens When Clicking in the CMD Window?

command linewindows 7

Suppose I run cmd.exe and ping localhost. After that I ping localhost again but I click into the window and the ping stops until I press enter.

What happens exactly when I click into the window? Does it suspend the process or something else? I attached a screenshot to clarify this issue.

Note: I do not actually click but drag using the mouse which creates a white box in the window as you can see on the screenshot.

Edit: further clarification: What I really wish to know is whether dragging the window halts the cmd process or not?

Edit: even more clarification: I know that I'm using Quick Edit and pressing enter copies the contents I selected. What I do not know is what happens in the background.

enter image description here

Best Answer

When you select some text in the cmd.exe window, the process will carry on in the background until the next time it writes to Standard Output (or STDOUT, the data stream which is shown in the cmd.exe window).

When you exit the selection mode, the process will resume as normal.

You can test this by typing ping www.google.com -t into your cmd.exe window, and selecting some area of the output. You'll see it pause, and when you deselect the output will resume.

Edit: As per Fran's comment, you can use a tool such as Wireshark to see that activity does still happen after the point when you made the selection, and then stops.