diff options
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 54d75d0e9..162825442 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1130,6 +1130,12 @@ open (const char *unix_path, int flags, ...) if (fd >= 0) { + /* This is a temporary kludge until all utilities can catch up with + a change in behavior that implements linux functionality: opening + a tty should not automatically cause it to become the controlling + tty for the process. */ + if (fd > 2) + flags |= O_NOCTTY; if (!(fh = build_fh_name (unix_path, (flags & (O_NOFOLLOW | O_EXCL)) ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW, |