syscall: add tty support to StartProcess
syscall: add tty support to StartProcess

These changes add a Ctty int field to the Unix syscall.ProcAttr which,
if set >= 0 in conjuction with Setsid=true, will be used by
forkAndExecInChild as the file descriptor for the new child's
controlling terminal.

Necessary changes have been made to mkerrors.sh to generate defs for
TIOC*, though changes to its output files are not included here.
The changes made should support Linux, FreeBSD and Darwin, at least.

R=iant, bradfitz, r, rsc, borman
CC=golang-dev
http://codereview.appspot.com/4532075

Committer: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

tv42/old-go,ssrl/go,tv42/old-go,apparentlymart/golang,gnanderson/go,tv42/old-go,ssrl/go,dsriram/golang,ssrl/go,ssrl/go,tv42/old-go,dsriram/golang,apparentlymart/golang,gnanderson/go,pombredanne/go-deleteme,apparentlymart/golang,pombredanne/go-deleteme,gnanderson/go,apparentlymart/golang,apparentlymart/golang,pombredanne/go-deleteme,dsriram/golang,dsriram/golang,apparentlymart/golang,dsriram/golang,gnanderson/go,pombredanne/go-deleteme,ssrl/go,pombredanne/go-deleteme,pombredanne/go-deleteme,tv42/old-go,gnanderson/go,pombredanne/go-deleteme,ssrl/go,tv42/old-go,gnanderson/go,tv42/old-go,gnanderson/go,dsriram/golang,apparentlymart/golang,ssrl/go,dsriram/golang