Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
b94ae260
Commit
b94ae260
authored
Apr 30, 2010
by
Alex Brainman
Committed by
Russ Cox
Apr 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: handle EOF on pipe - special case on Windows
R=rsc CC=golang-dev
https://golang.org/cl/962046
parent
ac1d46a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
syscall_windows.go
src/pkg/syscall/syscall_windows.go
+4
-0
zerrors_windows_386.go
src/pkg/syscall/zerrors_windows_386.go
+1
-0
No files found.
src/pkg/syscall/syscall_windows.go
View file @
b94ae260
...
@@ -184,6 +184,10 @@ func Open(path string, mode int, perm int) (fd int, errno int) {
...
@@ -184,6 +184,10 @@ func Open(path string, mode int, perm int) (fd int, errno int) {
func
Read
(
fd
int
,
p
[]
byte
)
(
n
int
,
errno
int
)
{
func
Read
(
fd
int
,
p
[]
byte
)
(
n
int
,
errno
int
)
{
var
done
uint32
var
done
uint32
if
ok
,
e
:=
ReadFile
(
int32
(
fd
),
p
,
&
done
,
nil
);
!
ok
{
if
ok
,
e
:=
ReadFile
(
int32
(
fd
),
p
,
&
done
,
nil
);
!
ok
{
if
e
==
ERROR_BROKEN_PIPE
{
// BUG(brainman): work around ERROR_BROKEN_PIPE is returned on reading EOF from stdin
return
0
,
0
}
return
0
,
e
return
0
,
e
}
}
return
int
(
done
),
0
return
int
(
done
),
0
...
...
src/pkg/syscall/zerrors_windows_386.go
View file @
b94ae260
...
@@ -8,6 +8,7 @@ package syscall
...
@@ -8,6 +8,7 @@ package syscall
const
(
const
(
ERROR_FILE_NOT_FOUND
=
2
ERROR_FILE_NOT_FOUND
=
2
ERROR_NO_MORE_FILES
=
18
ERROR_NO_MORE_FILES
=
18
ERROR_BROKEN_PIPE
=
109
ERROR_INSUFFICIENT_BUFFER
=
122
ERROR_INSUFFICIENT_BUFFER
=
122
ERROR_MOD_NOT_FOUND
=
126
ERROR_MOD_NOT_FOUND
=
126
ERROR_PROC_NOT_FOUND
=
127
ERROR_PROC_NOT_FOUND
=
127
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment