You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. go tool 6l -a try.6 | head
What is the expected output?
Nothing to stderr, no error. Just exit when SIGPIPE arrives as a result of head closing
stdin.
What do you see instead?
go tool 6l: signal 13
Signal 13 is SIGPIPE, used by the OS to tell the writer that the reader isn't listening
anymore, so it might as well just stop writing. Well behaved programs die on SIGPIPE,
silently, because they understand that the later stages of the pipe are asking them to
quit early.
When you run 6l itself, it doesn't complain. The annoying message comes from "go
tool".
In src/cmd/go/tool.go:/^func runTool/ toolCmd.Run() returns an err describing the signal
that the child died from. Perhaps signal 13 should be a special case there? Yuck.
Which compiler are you using (5g, 6g, 8g, gccgo)?
the go cmd
Which operating system are you using?
Linux, 64 bit.
Which version are you using? (run 'go version')
$ hg id
f2cdaa74b232 tip
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
I'm not going to remove the SIGPIPE error, although I will do two things:
1. Remove that print for normal exits, even exit 1.
2. Change the error to print the signal description, as in:
go tool 6l: signal: broken pipe
Then at least you don't have to look up what 13 means.
by jeff.allen:
The text was updated successfully, but these errors were encountered: