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
You've got a race condition. The child process is writing data to the pty while the parent process is reading it. How quickly they happen will determine how much data there is for the parent to read.
This is expected behaviour, because the ptyproc.read() doesn't have the common Python convenience feature that calling it with no arguments waits for all the data before returning. It behaves more like the standard C read() function, in that it returns as soon as any data is available.
To read all the output until the child process finishes, you need to do something like this:
This is a very severe bug. When calling Ptyprocess.read() the value returned is different almost every time:
ptyprocess.PtyProcess.spawn(['openssl', "ec", '-noout', '-text', '-in', '/opt/key/s128r1.key']).read()
The output:
And again with the same params:
And again:
I don't know what is causing this but this is very weird.
The text was updated successfully, but these errors were encountered: