You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Press any key to close message gets written before process output is finished for background terminals #23051
I can a task and request the terminal to print the 'Press any key to close the terminal' message. However the message is printed to the terminal before the actual output of the task.
Press any key to close the terminal
Volume in drive C is OSDisk
Volume Serial Number is A63A-8EB4
Directory of c:\Users\dirkb\Projects\mseng\VSCode\Playgrounds\tasks\client
22-Mar-17 21:34 <DIR> .
22-Mar-17 21:34 <DIR> ..
22-Mar-17 22:17 34 client.js
22-Mar-17 22:17 97 client.js.map
17-Feb-17 18:29 0 client.ts
3 File(s) 131 bytes
2 Dir(s) 354,157,559,808 bytes free
I actually run two tasks in two terminal in parallel. The task in the terminal that is in front prints correctly to the terminal. The other not. In addition to the wrong placement of the message the terminal doesn't have a scroll bar either.
changed the title [-]Strange terminal behaviour[/-][+]Press any key to close message gets written before process output is finished for background terminals[/+]on Apr 3, 2017
Activity
Tyriar commentedon Mar 23, 2017
Scroll bar issue: #20505
Tyriar commentedon Apr 3, 2017
I can repro this by forcing
waitOnExitinTerminalInstanceand setting up the shell exe/args like this:Then creating 2 instances and waiting for the background one to finish.
[-]Strange terminal behaviour[/-][+]Press any key to close message gets written before process output is finished for background terminals[/+]Tyriar commentedon Apr 3, 2017
Similar repro works on Linux.
Looks like it's related to this https://github.com/Tyriar/node-pty/blob/884aa0b3e8ae548c69865d8631e5885bcdcd5fdd/src/unixTerminal.ts#L66
Ensure no data events occur after a terminal's exit event fires