Add failing repro for grandchild-pipe hang on sync Execute adds a failing test which demonstrates a problem:
- Use shellfish to launch a process (e.g. powershell)
- That process then launches a child process (e.g. a second powershell), which inherits the STDOUT/STDERR pipes
- The first process exits, but the child process keeps running, and holds the pipes open
- Cancel the cancellation token.
On the synchronous path, this waits indefinitely for the child process. If the child process is hung or otherwise runs for a long time, the Cancellation doesn't work.
The async path appears to be fine, possibly because it does not wait for the process to cancel.
This is not causing problems for any current uses of Shellfish that we are aware of; we found it in a different piece of code and reporting it against Shellfish for completeness. It would be nice to fix, ideally Shellfish is the best/de-facto tool for running processes for Octopus.
Add failing repro for grandchild-pipe hang on sync Execute adds a failing test which demonstrates a problem:
On the synchronous path, this waits indefinitely for the child process. If the child process is hung or otherwise runs for a long time, the Cancellation doesn't work.
The async path appears to be fine, possibly because it does not wait for the process to cancel.
This is not causing problems for any current uses of Shellfish that we are aware of; we found it in a different piece of code and reporting it against Shellfish for completeness. It would be nice to fix, ideally Shellfish is the best/de-facto tool for running processes for Octopus.