Commit 92776a7
authored
remove process cancelling goroutine (#190)
the goroutine is redundant, and blocks the actual return of the function
when the ctx is done.
```
Error: -19T14:46:26.742Z [ERROR] provider.terraform-provider-oci_v0.0.17: failed to kill process: @caller=github.com/chainguard-dev/terraform-provider-oci/internal/provider/exec_test_data_source.go:194 error="os: process already finished" tf_data_source_type=oci_exec_test tf_provider_addr=registry.terraform.io/chainguard-dev/oci tf_req_id=c0da7202-2dff-f56f-aebc-de6d70d42686 @module=oci tf_rpc=ReadDataSource timestamp=2024-12-19T14:46:26.741Z
```
by removing it, we remove the duplicate cancellation handling (the
timeout is already plumbed through the context), and the done signal is
already handled by `exec.CommandContext`.
additionally, the process.Kill() is already handled by
`exec.CommandContext`:
https://cs.opensource.google/go/go/+/master:src/os/exec/exec.go;l=4851 parent 0fae112 commit 92776a7
1 file changed
+1
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 190 | | |
203 | 191 | | |
| 192 | + | |
204 | 193 | | |
205 | 194 | | |
206 | 195 | | |
| |||
0 commit comments