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

Darwin SIGPIPE is not being ignored #255

Closed
gopherbot opened this issue Nov 18, 2009 · 2 comments
Closed

Darwin SIGPIPE is not being ignored #255

gopherbot opened this issue Nov 18, 2009 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by gduffy:

What steps will reproduce the problem?
1. Run go program on darwin/386
2. kill -SIGPIPE the process (or if using tcp code, "nc" to it and ctrl-c)
3. Program is killed

What is the expected output? What do you see instead?
Program should not be killed by SIGPIPE

What is your $GOOS?  $GOARCH?
GOOS=darwin, GOARCH=386

Which revision are you sync'ed to?  (hg log -l 1)
3975:b51fd2d6c160

Please provide any additional information below.
Attached a patch that uses sigprocmask to block the SIGPIPE. It seems like 
sigaction/signal don't work for SIGPIPE in threaded environments?

This issue likely affects 64-bit as well, but I don't have a machine to test it 
on.

Attachments:

  1. darwin_386_ignore_sigpipe.patch (1486 bytes)
@gopherbot
Copy link
Contributor Author

Comment 1 by gduffy:

patch (cleaned up first version)

Attachments:

  1. darwin_386_ignore_sigpipe.patch (1287 bytes)

@rsc
Copy link
Contributor

rsc commented Nov 18, 2009

Comment 2:

This is fixed as of  http://code.google.com/p/go/source/detail?r=c693dbab33.
The signal handlers were being installed improperly
so the usual path wasn't working.
You can revert your change and then run
"hg pull; hg update release" to get a working copy.

Owner changed to [email protected].

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
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