Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: remove error about exit status #4074

Closed
gopherbot opened this issue Sep 13, 2012 · 5 comments
Closed

cmd/go: remove error about exit status #4074

gopherbot opened this issue Sep 13, 2012 · 5 comments
Milestone

Comments

@gopherbot
Copy link

by jeff.allen:

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.
@rsc
Copy link
Contributor

rsc commented Sep 13, 2012

Comment 1:

I am not convinced this is the right thing to do. 
6l exited with an unsuccessful status and the go tool is reporting that.

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Oct 6, 2012

Comment 2:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 3:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Jan 31, 2013

Comment 4:

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.

@rsc
Copy link
Contributor

rsc commented Jan 31, 2013

Comment 5:

This issue was closed by revision 8b6534b.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants