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-14 23:08:20 +0400
committerChristopher Faylor <me@cgf.cx>2012-02-14 23:08:20 +0400
commit4eb5175d905a233eea5651489a1f9698159b9c67 (patch)
tree89ed4c8efac9f1e5c12dc73791535702cef2749c /winsup/cygwin/pinfo.cc
parent5401796acfc2b971a2f2c62eb43dab4ba540b0e5 (diff)
* pinfo.cc (_pinfo::set_ctty): Revert 2012-02-07 change to skip function if tty
in question == our ctty. * syscalls.cc (setsid): Avoid two function calls. * dtable.cc (dtable::dup_worker): Remove debugging. * init.cc (search_for): Calculate for every new process rather than using shared value. (threadfunc_ix): Fill in for ever new process rather than sing shared value.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 04c6b64c8..2615e32ac 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -435,7 +435,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
{
tty_min& tc = *fh->tc ();
debug_printf ("old %s, ctty device number %p, tc.ntty device number %p flags & O_NOCTTY %p", __ctty (), ctty, tc.ntty, flags & O_NOCTTY);
- if (fh && &tc && (ctty <= 0 || ctty != tc.ntty) && !(flags & O_NOCTTY))
+ if (fh && &tc && (ctty <= 0 || ctty == tc.ntty) && !(flags & O_NOCTTY))
{
ctty = tc.ntty;
if (cygheap->ctty != fh->archetype)
@@ -463,9 +463,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
__ctty (), sid, pid, pgid, tc.getpgid (), tc.getsid ());
if (!cygwin_finished_initializing && !myself->cygstarted
&& pgid == pid && tc.getpgid () && tc.getsid ())
- {
- pgid = tc.getpgid ();
- }
+ pgid = tc.getpgid ();
/* May actually need to do this: