Use syscall consts, check for errors,

Also rename func for non-windows specific names.

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
This commit is contained in:
Sachin Joshi 2015-03-06 17:04:35 -08:00
parent c23a02e41a
commit 27c2a55648
5 changed files with 40 additions and 30 deletions

View file

@ -107,8 +107,8 @@ func MakeRaw(fd uintptr) (*State, error) {
return state, nil
}
// GetHandleInfo returns file descriptor and bool indicating whether the file is a terminal
func GetHandleInfo(in interface{}) (uintptr, bool) {
// GetFdInfo returns file descriptor and bool indicating whether the file is a terminal
func GetFdInfo(in interface{}) (uintptr, bool) {
return winconsole.GetHandleInfo(in)
}