summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-03-03 14:23:59 -0800
committergVisor bot <gvisor-bot@google.com>2021-03-03 14:26:30 -0800
commitcfd2c31962a4358d7d05a4bd04dde271dc238339 (patch)
tree9e7c030bf771179e3076f277f5a848e3934003ec /pkg
parent9c80bcf32d8db3749a57ef104c5c9bab9f57d9c1 (diff)
Remove dependency on golang.org/x/sys/unix
(*os.PathError).Timeout does the same thing. PiperOrigin-RevId: 360756784
Diffstat (limited to 'pkg')
-rw-r--r--pkg/log/BUILD1
-rw-r--r--pkg/log/log.go3
2 files changed, 1 insertions, 3 deletions
diff --git a/pkg/log/BUILD b/pkg/log/BUILD
index 23ef7ea8d..3ed6aba5c 100644
--- a/pkg/log/BUILD
+++ b/pkg/log/BUILD
@@ -18,7 +18,6 @@ go_library(
deps = [
"//pkg/linewriter",
"//pkg/sync",
- "@org_golang_x_sys//unix:go_default_library",
],
)
diff --git a/pkg/log/log.go b/pkg/log/log.go
index d39af3bf4..073cf6238 100644
--- a/pkg/log/log.go
+++ b/pkg/log/log.go
@@ -40,7 +40,6 @@ import (
"sync/atomic"
"time"
- "golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/linewriter"
"gvisor.dev/gvisor/pkg/sync"
)
@@ -105,7 +104,7 @@ func (l *Writer) Write(data []byte) (int, error) {
n += w
// Is it a non-blocking socket?
- if pathErr, ok := err.(*os.PathError); ok && pathErr.Err == unix.EAGAIN {
+ if pathErr, ok := err.(*os.PathError); ok && pathErr.Timeout() {
runtime.Gosched()
continue
}