When running InstallPackageLocal and an error occurs in the process, it locks on p.WaitForExit(). This is because stdError is being redirected, and read after waiting for process exit. When an error occurs in the process (causing it to write to stdError), the process doesn't exit, as the redirected buffer gets full, and cannot be added to as it is only read after process exit.
How to replicate:
Not very easy to replicate, needs an error that is large enough to fill the buffer. This was found by using a bad pip install and trying to install a local package.
Expected behaviour:
To fix, stdError should be read to end before waiting for the process to exit. This should apply to every case where stdError or stdOutput is being redirected.
Description:
When running
InstallPackageLocal
and an error occurs in the process, it locks onp.WaitForExit()
. This is because stdError is being redirected, and read after waiting for process exit. When an error occurs in the process (causing it to write to stdError), the process doesn't exit, as the redirected buffer gets full, and cannot be added to as it is only read after process exit.How to replicate:
Not very easy to replicate, needs an error that is large enough to fill the buffer. This was found by using a bad pip install and trying to install a local package.
Expected behaviour:
To fix, stdError should be read to end before waiting for the process to exit. This should apply to every case where stdError or stdOutput is being redirected.
Test file(s):