undo CL 131750044 / 2d6d44ceb80e

Breaks reading from stdin in parent after exec with SysProcAttr{Setpgid: true}.

package main

import (
        "fmt"
        "os"
        "os/exec"
        "syscall"
)

func main() {
        cmd := exec.Command("true")
        cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
        cmd.Run()

        fmt.Printf("Hit enter:")
        os.Stdin.Read(make([]byte, 100))
        fmt.Printf("Bye\n")
}

In go1.3, I type enter at the prompt and the program exits.
With the CL being rolled back, the program wedges at the
prompt.

««« original CL description
syscall: SysProcAttr job control changes

Making the child's process group the foreground process group and
placing the child in a specific process group involves co-ordination
between the parent and child that must be done post-fork but pre-exec.

LGTM=iant
R=golang-codereviews, gobot, iant, mikioh.mikioh
CC=golang-codereviews
https://codereview.appspot.com/131750044

Committer: Ian Lance Taylor <iant@golang.org>
»»»

LGTM=minux, dneil
R=dneil, minux
CC=golang-codereviews, iant, michael.p.macinnis
https://codereview.appspot.com/174450043
runtime: remove assumption that noptrdata data bss noptrbss are ordered and contiguous

The assumption can be violated by external linkers reordering them or
inserting non-Go sections in between them. I looked briefly at trying
to write out the _go_.o in external linking mode in a way that forced
the ordering, but no matter what there's no way to force Go's data
and Go's bss to be next to each other. If there is any data or bss from
non-Go objects, it's very likely to get stuck in between them.

Instead, rewrite the two places we know about that make the assumption.
I grepped for noptrdata to look for more and didn't find any.

The added race test (os/exec in external linking mode) fails without
the changes in the runtime. It crashes with an invalid pointer dereference.

Fixes issue 9133.

LGTM=dneil
R=dneil
CC=dvyukov, golang-codereviews, iant
https://codereview.appspot.com/179980043
build: disable race external linking test on OS X 10.6 and earlier

External linking doesn't work there at all.

LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/176070043
runtime: fix atomic operations on non-heap addresses
Race detector runtime does not tolerate operations on addresses
that was not previously declared with __tsan_map_shadow
(namely, data, bss and heap). The corresponding address
checks for atomic operations were removed in
https://codereview.appspot.com/111310044
Restore these checks.
It's tricker than just not calling into race runtime,
because it is the race runtime that makes the atomic
operations themselves (if we do not call into race runtime
we skip the atomic operation itself as well). So instead we call
__tsan_go_ignore_sync_start/end around the atomic operation.
This forces race runtime to skip all other processing
except than doing the atomic operation itself.
Fixes issue 9136.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/179030043

Committer: Russ Cox <rsc@golang.org>
go/parser: Use test-specific filesets to avoid races.

Only affects test code.

Fixes issue 9025.
Fixes issue 9130.

LGTM=r, adonovan
R=adonovan, r
CC=golang-codereviews
https://codereview.appspot.com/180920043
cmd/go: fix running pprof on windows.

Fixes issue 9149.

LGTM=alex.brainman, rsc
R=rsc, dave, alex.brainman
CC=golang-codereviews
https://codereview.appspot.com/176170043

Committer: Russ Cox <rsc@golang.org>
image/jpeg: handle Read returning n > 0, err != nil in d.fill

Fixes issue 9127.

LGTM=r
R=bradfitz, r
CC=golang-codereviews, nigeltao
https://codereview.appspot.com/178120043
go/build: build $GOOS_test.go always

We decided to build $GOOS.go always
but forgot to test $GOOS_test.go.

Fixes issue 9159.

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/176290043
doc: tidy up "Projects" page; add Go 1.4

LGTM=r
R=r
CC=golang-codereviews
https://codereview.appspot.com/182750043