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
I am spawning a powershell process via win32CreateProcess as well using ConPTYCreatePseudoConsole.
I would assume that the raw output must be the same on each command call. But it isn't.
To show the issue I spawn powershell and run hostname command 4 times in a row.
And run this a couple of times and here are the results.
OUT "\u{1b}[25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\u{1b}[7;27H\u{1b}[?25h\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\nDESKTOP-NNSSIDQ\r\n\u{1b}[25lEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[10;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\n\u{1b}[?25hD\u{1b}[25l\rDESKTOP-NNSSIDQ \r\nEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[13;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostna\u{1b}[m\r\n>> \u{1b}[21X\u{1b}[13;25H\u{1b}[?25h\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\nD\u{1b}[25l\rDESKTOP-NNSSIDQ \r\nEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[16;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\n\u{1b}[?25hD\u{1b}[25l\rDESKTOP-NNSSIDQ \r\nEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[19;19H\u{1b}[?25h"
OUT "\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\nD\u{1b}[25l\rDESKTOP-NNSSIDQ \r\nEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[10;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\u{1b}[23C\r\n\u{1b}[?25hDESKTOP-NNSSIDQ\r\nEXPECTED_PROMPT> \u{1b}[25l\rEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[13;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\n\u{1b}[?25hD\rDESKTOP-NNSSIDQ \r\nEXPECTED_PROMPT> \u{1b}[25l\r\n>> \u{1b}[16;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\n\u{1b}[?25hDESKTOP-NNSSIDQ\u{1b}[25l\r\nEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[19;19H\u{1b}[?25h"
OUT "\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\nD\rDESKTOP-NNSSIDQ \r\nEXPECTED_PROMPT> \u{1b}[25l\r\n>> \u{1b}[10;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\u{1b}[23C\r\n\u{1b}[?25hD\rDESKTOP-NNSSIDQ \r\nEXPECTED_PROMPT> \u{1b}[25l\r\n>> \u{1b}[13;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\n\u{1b}[?25hDESKTOP-NNSSIDQ\r\n\u{1b}[25lEXPECTED_PROMPT> \r\n>>\u{1b}[16X\u{1b}[16;19H\u{1b}[?25h"
OUT "\u{1b}[?25l\rEXPECTED_PROMPT> \u{1b}[93mhostname\u{1b}[m\r\n>> \u{1b}[23X\r\n\u{1b}[?25hDESKTOP-NNSSIDQ\r\nEXPECTED_PROMPT> \u{1b}[K\u{1b}[?25l\u{1b}[165C\r\n>>\u{1b}[17;19H\u{1b}[?25h"
Note:
In most cases I see that it repeats command several times in output. Like more then 4 times sometimes + prompt.
But sometimes on some command it repeats output all from first command to this one.
And as I noticed sometimes the output differs from performance resources.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey there.
I am spawning a
powershell
process viawin32
CreateProcess
as well usingConPTY
CreatePseudoConsole
.I would assume that the raw output must be the same on each command call. But it isn't.
To show the issue I spawn
powershell
and runhostname
command 4 times in a row.And run this a couple of times and here are the results.
Note:
In most cases I see that it repeats command several times in output. Like more then 4 times sometimes + prompt.
But sometimes on some command it repeats output all from first command to this one.
And as I noticed sometimes the output differs from performance resources.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions