summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-11-14 14:15:51 +0000
committerChristopher Faylor <me@cgf.cx>2005-11-14 14:15:51 +0000
commit548d0080af5f7740bbf667051e7e5cdea5c28071 (patch)
tree838b3dccdb7c70e7328c4d85345732fb10de395a
parent5a0826c3f84178498d91cd703d97791a691f6b30 (diff)
downloadcygnal-548d0080af5f7740bbf667051e7e5cdea5c28071.tar.gz
cygnal-548d0080af5f7740bbf667051e7e5cdea5c28071.tar.bz2
cygnal-548d0080af5f7740bbf667051e7e5cdea5c28071.zip
* fhandler.h (fhandler_console::fixup_after_fork_exec): Define with additional
bool parameter. (fhandler_console::fixup_after_exec): Accommodate fixup_after_fork_exec's parameter. (fhandler_console::fixup_after_fork): Ditto. * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Avoid opening new console only when close_on_exec AND execing.
-rw-r--r--winsup/cygwin/ChangeLog19
-rw-r--r--winsup/cygwin/fhandler.h6
-rw-r--r--winsup/cygwin/fhandler_console.cc4
3 files changed, 20 insertions, 9 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 52d169477..6b24a8ce7 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,14 @@
+2005-11-14 Corinna Vinschen <corinna@vinschen.de>
+ Christopher Faylor <cgf@timesys.com>
+
+ * fhandler.h (fhandler_console::fixup_after_fork_exec): Define with
+ additional bool parameter.
+ (fhandler_console::fixup_after_exec): Accommodate
+ fixup_after_fork_exec's parameter.
+ (fhandler_console::fixup_after_fork): Ditto.
+ * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Avoid
+ opening new console only when close_on_exec AND execing.
+
2005-11-14 Christopher Faylor <cgf@timesys.com>
* fhandler.h (fhandler_console::fixup_after_fork_exec): Declare new function.
@@ -384,7 +395,7 @@
(load_wsock32): Remove.
(WSACleanup): Remove.
* fhandler_socket.cc: Drop Winsock 1 accommodations throughout.
- (fhandler_socket::readv): Accomodate new POSIX style struct msghdr.
+ (fhandler_socket::readv): Accommodate new POSIX style struct msghdr.
(fhandler_socket::writev): Ditto.
(fhandler_socket::recvmsg): Ditto. Handle "old" applications using
former struct msghdr correctly.
@@ -1920,7 +1931,7 @@
* security.cc (get_initgroups_sidlist): Drop special_pgrp parameter.
(get_setgroups_sidlist): Avoid duplicate groups in group list.
- (create_token): Remove special_pgrp local variable. Accomodate
+ (create_token): Remove special_pgrp local variable. Accommodate
change to get_initgroups_sidlist call.
2005-06-21 Corinna Vinschen <corinna@vinschen.de>
@@ -2361,7 +2372,7 @@
2005-05-19 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/in.h: Define IPPROTO_xxx values as macros to
- accomodate SUSv3.
+ accommodate SUSv3.
2005-05-19 Christopher Faylor <cgf@timesys.com>
@@ -2970,7 +2981,7 @@
* syscalls.cc (sync): Use renamed has_get_volume_pathnames wincap.
* wincap.h (wincaps::has_get_volume_pathnames): Rename from
has_guid_volumes
- * wincap.cc: Accomodate above rename throughout. Set to false on
+ * wincap.cc: Accommodate above rename throughout. Set to false on
Windows 2000.
2005-04-08 Christopher Faylor <cgf@timesys.com>
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 3e61f8297..5cfc44b2d 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -909,9 +909,9 @@ class fhandler_console: public fhandler_termios
select_record *select_read (select_record *s);
select_record *select_write (select_record *s);
select_record *select_except (select_record *s);
- void fixup_after_fork_exec ();
- void fixup_after_exec () {fixup_after_fork_exec ();}
- void fixup_after_fork (HANDLE) {fixup_after_fork_exec ();}
+ void fixup_after_fork_exec (bool);
+ void fixup_after_exec () {fixup_after_fork_exec (true);}
+ void fixup_after_fork (HANDLE) {fixup_after_fork_exec (false);}
void set_close_on_exec (bool val);
void set_input_state ();
void send_winch_maybe ();
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 3c812ce33..496abfd75 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1769,12 +1769,12 @@ set_console_title (char *title)
}
void
-fhandler_console::fixup_after_fork_exec ()
+fhandler_console::fixup_after_fork_exec (bool execing)
{
HANDLE h = get_handle ();
HANDLE oh = get_output_handle ();
- if (close_on_exec () || open (O_NOCTTY | get_flags (), 0))
+ if ((execing && close_on_exec ()) || open (O_NOCTTY | get_flags (), 0))
cygheap->manage_console_count ("fhandler_console::fixup_after_fork_exec", -1);
else
{