go/src/os
Alex Brainman 3b84a3c9ac os: make Stdin.Stat() return ModeCharDevice if Stdin is console
CL 20845 changed Stdin.Stat() so it returns ModeNamedPipe.
But introduced TestStatStdin does not test what Stdin.Stat()
returns when Stdin is console.

This CL adjusts both TestStatStdin and Stdin.Stat
implementations to handle console. Return ModeCharDevice
from Stdin.Stat() when Stdin is console on windows,
just like it does on unix.

Fixes #14853.

Change-Id: I54d73caee2aea45a99618d11600d8e82fe20d0c0
Reviewed-on: https://go-review.googlesource.com/34090
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-07 23:59:31 +00:00
..
exec os/exec: fix race in TestStdinCloseRace 2016-12-13 01:56:36 +00:00
signal runtime: handle SIGPIPE in c-archive and c-shared programs 2017-02-03 20:07:36 +00:00
user os/user: cache the result of user.Current 2017-02-06 18:49:52 +00:00
dir.go os: consolidate files 2016-08-16 00:15:36 +00:00
dir_plan9.go
dir_unix.go os: fix typo in comment (Readir -> Readdir) 2016-08-30 01:24:57 +00:00
dir_windows.go os: consolidate files 2016-08-16 00:15:36 +00:00
env.go os: make ExpandEnv recognize '-' as a special shell parameter 2016-08-21 18:32:57 +00:00
env_test.go syscall: Clearenv now unsets env vars on Windows 2016-11-14 00:04:03 +00:00
env_unix_test.go os: make ExpandEnv recognize '-' as a special shell parameter 2016-08-21 18:32:57 +00:00
error.go os: add ErrClosed, return for use of closed File 2016-10-24 16:41:29 +00:00
error_plan9.go os: delete code duplications in error files 2016-09-10 17:04:21 +00:00
error_test.go os: add ErrClosed, return for use of closed File 2016-10-24 16:41:29 +00:00
error_unix.go os: delete code duplications in error files 2016-09-10 17:04:21 +00:00
error_unix_test.go
error_windows.go os: make IsExist report true on ERROR_DIR_NOT_EMPTY on Windows 2016-09-25 02:38:11 +00:00
error_windows_test.go os: make IsExist report true on ERROR_DIR_NOT_EMPTY on Windows 2016-09-25 02:38:11 +00:00
example_test.go os: add examples of environment functions 2016-10-12 14:04:30 +00:00
exec.go os: consolidate files 2016-08-16 00:15:36 +00:00
exec_plan9.go
exec_posix.go
exec_unix.go os: on GNU/Linux use waitid to avoid wait/kill race 2016-06-10 18:10:14 +00:00
exec_windows.go os: use runtime.Keepalive for *Process values 2016-08-24 16:57:09 +00:00
executable.go os: add Executable() (string, error) 2016-11-07 22:34:48 +00:00
executable_darwin.go os: add Executable() (string, error) 2016-11-07 22:34:48 +00:00
executable_freebsd.go os: add Executable() (string, error) 2016-11-07 22:34:48 +00:00
executable_plan9.go os: add Executable() (string, error) 2016-11-07 22:34:48 +00:00
executable_procfs.go os: Executable can use /proc/self/exe on android 2016-11-29 00:24:22 +00:00
executable_solaris.go os: add Executable() (string, error) 2016-11-07 22:34:48 +00:00
executable_test.go os: add Executable() (string, error) 2016-11-07 22:34:48 +00:00
executable_windows.go os: add Executable() (string, error) 2016-11-07 22:34:48 +00:00
export_test.go
export_windows_test.go os: fix handling of Windows Unicode console input and ^Z 2016-11-29 02:13:03 +00:00
file.go os: document that Rename does not replace an existing directory 2016-12-08 01:36:44 +00:00
file_plan9.go os: use extended-length paths on Windows when possible 2016-11-07 20:31:02 +00:00
file_posix.go os: use extended-length paths on Windows when possible 2016-11-07 20:31:02 +00:00
file_unix.go os: use extended-length paths on Windows when possible 2016-11-07 20:31:02 +00:00
file_windows.go os: fix handling of Windows Unicode console input and ^Z 2016-11-29 02:13:03 +00:00
getwd.go
getwd_darwin.go
os_test.go os: make Stdin.Stat() return ModeCharDevice if Stdin is console 2017-02-07 23:59:31 +00:00
os_unix_test.go os: don't let File.Readdir return an empty slice and nil error 2016-08-29 23:59:42 +00:00
os_windows_test.go os: fix handling of Windows Unicode console input and ^Z 2016-11-29 02:13:03 +00:00
path.go
path_plan9.go
path_test.go os: use testenv.MustHaveSymlink to simplify symlink tests 2016-08-23 14:46:46 +00:00
path_unix.go os: consolidate files 2016-08-16 00:15:36 +00:00
path_windows.go os: must fixup path when 248 bytes long 2016-12-13 03:21:00 +00:00
path_windows_test.go os: on Windows, don't fix long paths that aren't long 2016-11-08 23:06:17 +00:00
pipe_bsd.go
pipe_linux.go
pipe_test.go
proc.go
stat_darwin.go
stat_dragonfly.go
stat_freebsd.go
stat_linux.go
stat_nacl.go
stat_netbsd.go
stat_openbsd.go
stat_plan9.go os: consider only files from #M as regular on Plan 9 2016-10-26 16:18:00 +00:00
stat_solaris.go
stat_unix.go os: consolidate files 2016-08-16 00:15:36 +00:00
stat_windows.go os: make Stdin.Stat() return ModeCharDevice if Stdin is console 2017-02-07 23:59:31 +00:00
sticky_bsd.go
sticky_notbsd.go
str.go
sys.go os: consolidate files 2016-08-16 00:15:36 +00:00
sys_bsd.go
sys_darwin.go
sys_freebsd.go
sys_linux.go
sys_nacl.go
sys_plan9.go
sys_solaris.go
sys_unix.go
sys_windows.go
types.go os: deduplicate File definition 2016-09-05 21:21:05 +00:00
types_plan9.go os: add ErrClosed, return for use of closed File 2016-10-24 16:41:29 +00:00
types_unix.go os: add ErrClosed, return for use of closed File 2016-10-24 16:41:29 +00:00
types_windows.go os: make Stdin.Stat() return ModeCharDevice if Stdin is console 2017-02-07 23:59:31 +00:00
wait_unimp.go os: use wait6 to avoid wait/kill race on freebsd 2016-06-13 22:13:56 +00:00
wait_wait6.go os: use runtime.Keepalive for *Process values 2016-08-24 16:57:09 +00:00
wait_waitid.go os: use runtime.Keepalive for *Process values 2016-08-24 16:57:09 +00:00