aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Rockot <ken@oz.gs>2011-06-22 18:07:20 -0400
committerRuss Cox <rsc@golang.org>2011-06-22 18:07:20 -0400
commitc8443d72429a9b3439f309512ae90a37c1235829 (patch)
tree41fbc7fb8af706c34bfad148a5685420cf874d30
parent8a4acd53f12014ba29de7fb12ab4e6d4c6ca7d9b (diff)
downloadgo-c8443d72429a9b3439f309512ae90a37c1235829.tar.gz
go-c8443d72429a9b3439f309512ae90a37c1235829.zip
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 https://golang.org/cl/4532075
-rwxr-xr-xsrc/pkg/syscall/mkerrors.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/syscall/mkerrors.sh b/src/pkg/syscall/mkerrors.sh
index 51ac3356ff..21583603fe 100755
--- a/src/pkg/syscall/mkerrors.sh
+++ b/src/pkg/syscall/mkerrors.sh
@@ -62,6 +62,7 @@ includes_Darwin='
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_mroute.h>
+#include <termios.h>
'
includes_FreeBSD='
@@ -71,6 +72,7 @@ includes_FreeBSD='
#include <sys/sockio.h>
#include <sys/sysctl.h>
#include <sys/wait.h>
+#include <sys/ioctl.h>
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -145,6 +147,7 @@ done
$2 !~ "NLA_TYPE_MASK" &&
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|RTM|RTN|RTPROT|RTA|RTAX|RTNH|ARPHRD|ETH_P)_/ ||
$2 ~ /^SIOC/ ||
+ $2 ~ /^TIOC/ ||
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
$2 ~ /^BIOC/ ||
$2 !~ /^(BPF_TIMEVAL)$/ &&