Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-02-10 20:33:53 +0400
committerChristopher Faylor <me@cgf.cx>2012-02-10 20:33:53 +0400
commit93b18fd23229c9d8e50ad778f8069af9a3425e90 (patch)
tree6dc4585eca57abdc2af97b3b262efe26a59a2570 /winsup/cygwin/syscalls.cc
parent833630b85933b9cdcdfe0e4af97fec93f775b3b6 (diff)
* syscalls.cc (open): Semi-revert (?) to allowing open of a tty to become
controlling tty if there is no controlling tty.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index e392220c3..27063ec23 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1275,7 +1275,7 @@ open (const char *unix_path, int flags, ...)
tty for the process. */
int opt = PC_OPEN | ((flags & (O_NOFOLLOW | O_EXCL))
? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW);
- if (!(flags & O_NOCTTY) && fd > 2)
+ if (!(flags & O_NOCTTY) && fd > 2 && myself->ctty > 0)
{
flags |= O_NOCTTY;
opt |= PC_CTTY; /* flag that, if opened, this fhandler could