aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-01-20 13:36:00 -0500
committerRuss Cox <rsc@golang.org>2011-01-20 13:36:00 -0500
commit3c7104479c3d25db85705ddc6bdc01c19be0a54e (patch)
treec9d4dde991af0ed1ba9c65dced670e4fff85c228 /src/pkg/runtime
parent32a8f5a8742daeb8c292f40d556c78f792207599 (diff)
downloadgo-3c7104479c3d25db85705ddc6bdc01c19be0a54e.tar.xz
runtime: drop CLONE_PARENT
The functionality we want (shared ppid) is implied by CLONE_THREAD already, and CLONE_PARENT causes problems if the Go program is pid 1 (init). See issue 1406 for more details. Fixes #1406. R=adg, iant CC=golang-dev https://golang.org/cl/3971044
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/linux/thread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pkg/runtime/linux/thread.c b/src/pkg/runtime/linux/thread.c
index 979260ba1d..d5f9a8fb0e 100644
--- a/src/pkg/runtime/linux/thread.c
+++ b/src/pkg/runtime/linux/thread.c
@@ -238,8 +238,7 @@ runtime·newosproc(M *m, G *g, void *stk, void (*fn)(void))
/*
* note: strace gets confused if we use CLONE_PTRACE here.
*/
- flags = CLONE_PARENT /* getppid doesn't change in child */
- | CLONE_VM /* share memory */
+ flags = CLONE_VM /* share memory */
| CLONE_FS /* share cwd, etc */
| CLONE_FILES /* share fd table */
| CLONE_SIGHAND /* share sig handler table */