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

os/signal: not all notifications about SIGCHLD are sent #15437

Closed
noxiouz opened this issue Apr 25, 2016 · 3 comments
Closed

os/signal: not all notifications about SIGCHLD are sent #15437

noxiouz opened this issue Apr 25, 2016 · 3 comments

Comments

@noxiouz
Copy link

noxiouz commented Apr 25, 2016

  1. What version of Go are you using (go version)?
go version go1.6.2 darwin/amd64

Also it's cross compiled and tested on Linux

  1. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/noxiouz/Go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
  1. What did you do?
    http://play.golang.org/p/lLTgaA8MRo
  2. What did you expect to see?
    Get notification about SIGCHLD from every child
  3. What did you see instead?
    Only 65-72 notifications are sent in average case
sigchld watcher is ready
10 sec without SIGCHLD. Got 72
@ianlancetaylor
Copy link
Contributor

I haven't checked yet, but doesn't the same thing happen in a C program? Except for the real time signals, Unix systems do not normally ensure that all instances of a signal are delivered. If a signal is raised twice before the program has a chance to handle the first raised signal, the signal handler is only invoked once.

@ianlancetaylor ianlancetaylor self-assigned this Apr 25, 2016
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Apr 25, 2016
@noxiouz
Copy link
Author

noxiouz commented Apr 25, 2016

Unfortunately, I am not an expert in Unix signals sphere. So if it's a planned behavior, the issue can be closed, of course.

@noxiouz
Copy link
Author

noxiouz commented Apr 25, 2016

Yes, I found http://www.gnu.org/software/libc/manual/html_node/Merged-Signals.html#Merged-Signals
Thanks! At least, now I know.

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

3 participants