native/proc/linux: wait for the target process to be killed in kill (#2280)

Waits for the target process to have received the kill signal in
native.nativeProcess.kill. Fixes an infrequent error in TestKill.
This commit is contained in:
Alessandro Arzilli
2020-12-28 18:08:47 +01:00
committed by GitHub
parent 0ae77bd6c5
commit 8462d5c7d4
2 changed files with 20 additions and 6 deletions

View File

@ -54,6 +54,8 @@ func TestIssue419(t *testing.T) {
for i := 0; i < 2; i++ {
err := <-errChan
t.Logf("error %T %#v\n", err, err)
if v, ok := err.(errIssue419); ok {
assertNoError(v.err, t, "syscall.Kill")
continue