Skip to content

Commit

Permalink
Merge pull request #6 from johanneswuerbach/patch-1
Browse files Browse the repository at this point in the history
Print error during getTermios to stderr
  • Loading branch information
c4milo committed Jan 7, 2016
2 parents 9622b31 + 7b17b36 commit ca8322c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xhyve.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package xhyve
import "C"
import (
"fmt"
"os"
"runtime"
"syscall"
"unsafe"
Expand All @@ -21,7 +22,7 @@ var termios syscall.Termios
func getTermios() syscall.Termios {
var state syscall.Termios
if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(0), uintptr(syscall.TIOCGETA), uintptr(unsafe.Pointer(&state)), 0, 0, 0); err != 0 {
fmt.Println(err)
fmt.Fprintln(os.Stderr, err)
}
return state
}
Expand Down

0 comments on commit ca8322c

Please sign in to comment.