]> Cypherpunks repositories - gostls13.git/commit
libmach: fix new thread race with Linux
authorRuss Cox <rsc@golang.org>
Sun, 12 Sep 2010 03:42:04 +0000 (23:42 -0400)
committerRuss Cox <rsc@golang.org>
Sun, 12 Sep 2010 03:42:04 +0000 (23:42 -0400)
commit323a116fd041b93368fbc96de372127d2977e85c
tree85e0c192e3d408e7263cb26037034ab42208a9c4
parentca9d3f3463d8015c1650bf7e9535e4d495d06ffd
libmach: fix new thread race with Linux

If you look at the sequence of values returned
by waitpid, it simply tells us about the child of
clone before it tells us that the parent called clone.
There's nothing we can do but assume unexpected
tids are newly cloned children.

Tested with 6prof on godoc.

Fixes #251.

R=r
CC=golang-dev
https://golang.org/cl/2167045
src/libmach/linux.c