When the mouse is pressed 'down' on the prompt's scrollbar, say during a long command (dir /a /s c:\ for instance), output seems to be paused.

Not only that, but the CPU usage for cmd.exe drops to zero as long as the mouse stays down. When it is released, CPU usage returns to normal.

Does this mean terminal commands are suspended during mousedown in this manner? Or is the output merely paused? The lack of any CPU usage seems to point suspiciously towards a process suspension.

  • Say I do dir /s and hold mouse down in the middle of the scrollbar in xp, it continues to output, output continues to whiz passed. If you think about it with text, if you hold in the scroll bar it's like pageup. Well that's what it looks like with cmd prompt for me and my system anyway.. it looke a bit like the output is scrolling by, but the effect of holding the mouse down is tapping page up frequently.. while that happens. But it's scrolling down faster than the pageups are tapped. So the scrolling indicator thing is still at the bottom but you see activity in the scroll bar – barlop Oct 8 '11 at 5:22
  • I don't see output paused or cpu usage change, the cpu usage was non zero before i held mouse down in the scroll bar during dir /s, and is still non zero after. – barlop Oct 8 '11 at 5:25
  • I might've seen output paused with some commands though, i recall.. maybe , maybe, with wget i'm not sure, but even then, I don't think the cmd prompt cpu usage goes to 0, and I think scrolling down again one would see it continue. so can't reproduce what you describe. – barlop Oct 8 '11 at 5:27
  • also in the wget case i think i'm clicking not holding it down. – barlop Oct 8 '11 at 6:41

Technically, only displaying output is suspended while you hold the scrollbar: the console subsystem temporarily stops reading from the output buffer and displaying it. However, the process remains running, and said output buffer fills up very quickly, which makes all further write()'s "block" for as long as the buffer is full. This is what makes the process appear to pause.

(Note that there are two distinct components – the console window and the programs running inside. The "Command Prompt" is only the cmd.exe command interpreter, but the window along with scrollbars is displayed by CSRSS.


I would say yes the process is suspended while moving the scroll bar. When I do copying with robocopy, and I scroll the window up to see what file I noticed an error on the copy, robocopy waits where it is until I'm done scrolling and release the mouse button. There is no hard drive or network activity from robocopy while I have control of the scrollbar. Once I release the scroll bar, it jumps to the bottom and robocopy continues as it was.


We can be definitive:

ver|time > time1.txt && dir /s && ver|time > time2.txt

Run this with and without pausing output and you'll see the processing time takes longer. It isn't just the output being paused.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy