summaryrefslogtreecommitdiff
path: root/src/syscall/exec_unix_test.go
diff options
context:
space:
mode:
authorAram Hăvărneanu <aram@mgk.ro>2015-03-24 18:33:37 +0100
committerAram Hăvărneanu <aram@mgk.ro>2015-03-24 19:51:21 +0000
commit41f9c430f3cc8c991981e5c6daa63f8718c800b9 (patch)
tree0094098003e1a50534b56cc418f522dd2e893615 /src/syscall/exec_unix_test.go
parent75447d0623e3e7614a9cf9cdd5ece23d18028cab (diff)
downloadgo-git-41f9c430f3cc8c991981e5c6daa63f8718c800b9.tar.gz
runtime, syscall: fix Solaris exec tests
Also fixes a long-existing problem in the fork/exec path. Change-Id: Idec40b1cee0cfb1625fe107db3eafdc0d71798f2 Reviewed-on: https://go-review.googlesource.com/8030 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/syscall/exec_unix_test.go')
-rw-r--r--src/syscall/exec_unix_test.go15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/syscall/exec_unix_test.go b/src/syscall/exec_unix_test.go
index 954d9aa26f..ff8261111e 100644
--- a/src/syscall/exec_unix_test.go
+++ b/src/syscall/exec_unix_test.go
@@ -167,17 +167,12 @@ func TestForeground(t *testing.T) {
tty, err := os.OpenFile("/dev/tty", os.O_RDWR, 0)
if err != nil {
- t.Skipf("Can't test Foreground. Couldn't open /dev/tty: %s",
- err)
+ t.Skipf("Can't test Foreground. Couldn't open /dev/tty: %s", err)
}
fpgrp := 0
- _, _, errno := syscall.Syscall(syscall.SYS_IOCTL,
- tty.Fd(),
- syscall.TIOCGPGRP,
- uintptr(unsafe.Pointer(&fpgrp)))
-
+ errno := syscall.Ioctl(tty.Fd(), syscall.TIOCGPGRP, uintptr(unsafe.Pointer(&fpgrp)))
if errno != 0 {
t.Fatalf("TIOCGPGRP failed with error code: %s", errno)
}
@@ -212,11 +207,7 @@ func TestForeground(t *testing.T) {
cmd.Stop()
- _, _, errno = syscall.Syscall(syscall.SYS_IOCTL,
- tty.Fd(),
- syscall.TIOCSPGRP,
- uintptr(unsafe.Pointer(&fpgrp)))
-
+ errno = syscall.Ioctl(tty.Fd(), syscall.TIOCSPGRP, uintptr(unsafe.Pointer(&fpgrp)))
if errno != 0 {
t.Fatalf("TIOCSPGRP failed with error code: %s", errno)
}