aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorHiroshi Ioka <hirochachacha@gmail.com>2017-04-21 17:10:58 +0900
committerIan Lance Taylor <iant@golang.org>2017-04-22 01:06:09 +0000
commitffd7cfce4b6113280783136b6580f5bca55e27e2 (patch)
tree95587ae67d3699ca563fd2bddb40537ba80b581b /src/syscall
parentc202d4d303d797146a58ef00dd6951af005166e5 (diff)
downloadgo-ffd7cfce4b6113280783136b6580f5bca55e27e2.tar.xz
os, syscall: fix errno in Seek on windows
Current implementation use EPIPE as an error for Seek on pipes. According to http://pubs.opengroup.org/onlinepubs/009695399/functions/lseek.html, it should use ESPIPE instead. Fixes #20066 Change-Id: I24c3b95be946bc19a287d6b10f447b034a9a1283 Reviewed-on: https://go-review.googlesource.com/41311 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/syscall_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syscall/syscall_windows.go b/src/syscall/syscall_windows.go
index 19a7deb230..7f92bf7ca4 100644
--- a/src/syscall/syscall_windows.go
+++ b/src/syscall/syscall_windows.go
@@ -348,7 +348,7 @@ func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
// use GetFileType to check pipe, pipe can't do seek
ft, _ := GetFileType(fd)
if ft == FILE_TYPE_PIPE {
- return 0, EPIPE
+ return 0, ESPIPE
}
rlo, e := SetFilePointer(fd, lo, &hi, w)
if e != nil {