summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/proctor/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/runtimes/proctor/lib')
-rw-r--r--test/runtimes/proctor/lib/BUILD1
-rw-r--r--test/runtimes/proctor/lib/lib.go7
2 files changed, 5 insertions, 3 deletions
diff --git a/test/runtimes/proctor/lib/BUILD b/test/runtimes/proctor/lib/BUILD
index 0c8367dfe..f834f1b5a 100644
--- a/test/runtimes/proctor/lib/BUILD
+++ b/test/runtimes/proctor/lib/BUILD
@@ -13,6 +13,7 @@ go_library(
"python.go",
],
visibility = ["//test/runtimes/proctor:__pkg__"],
+ deps = ["@org_golang_x_sys//unix:go_default_library"],
)
go_test(
diff --git a/test/runtimes/proctor/lib/lib.go b/test/runtimes/proctor/lib/lib.go
index f2ba82498..36c60088a 100644
--- a/test/runtimes/proctor/lib/lib.go
+++ b/test/runtimes/proctor/lib/lib.go
@@ -22,7 +22,8 @@ import (
"os/signal"
"path/filepath"
"regexp"
- "syscall"
+
+ "golang.org/x/sys/unix"
)
// TestRunner is an interface that must be implemented for each runtime
@@ -59,7 +60,7 @@ func TestRunnerForRuntime(runtime string) (TestRunner, error) {
func PauseAndReap() {
// Get notified of any new children.
ch := make(chan os.Signal, 1)
- signal.Notify(ch, syscall.SIGCHLD)
+ signal.Notify(ch, unix.SIGCHLD)
for {
if _, ok := <-ch; !ok {
@@ -69,7 +70,7 @@ func PauseAndReap() {
// Reap the child.
for {
- if cpid, _ := syscall.Wait4(-1, nil, syscall.WNOHANG, nil); cpid < 1 {
+ if cpid, _ := unix.Wait4(-1, nil, unix.WNOHANG, nil); cpid < 1 {
break
}
}