浏览代码

fixes for review

Yasuhiro Matsumoto 8 年之前
父节点
当前提交
928cf5943f
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      isatty_windows.go

+ 4 - 1
isatty_windows.go

@@ -36,6 +36,9 @@ func IsTerminal(fd uintptr) bool {
 	return r != 0 && e == 0
 }
 
+// Check pipe name is used for cygwin/msys2 pty.
+// Cygwin/MSYS2 PTY has a name like:
+//   \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master
 func isCygwinPipeName(name string) bool {
 	token := strings.Split(name, "-")
 	if len(token) < 5 {
@@ -66,7 +69,7 @@ func isCygwinPipeName(name string) bool {
 }
 
 // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
-// terminal. This is also always false on this environment.
+// terminal.
 func IsCygwinTerminal(fd uintptr) bool {
 	if procGetFileInformationByHandleEx == nil {
 		return false