summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2013-07-26 17:28:00 +0000
committerChristopher Faylor <me@cgf.cx>2013-07-26 17:28:00 +0000
commit033fe7d87f571555894c8d92a2c1f25c58c04c52 (patch)
tree43d0ca50df0b6ba472cb7e6f7a4632b510d62fa3
parenta30f955d286e38b570f5e2ab59d5f096213e0328 (diff)
downloadcygnal-033fe7d87f571555894c8d92a2c1f25c58c04c52.tar.gz
cygnal-033fe7d87f571555894c8d92a2c1f25c58c04c52.tar.bz2
cygnal-033fe7d87f571555894c8d92a2c1f25c58c04c52.zip
cygwin directory changes:
* environ.cc (tty_is_gone): Delete. (known): Delete tty, add wincmdln. * globals.cc: Reorganize list of environment bools, remove explicit = false for slight load time optimization. (wincmdln): New global. * spawn.cc (child_info_spawn::worker): Honor wincmdln. doc directory changes: * new-features.sgml (ov-new1.7.23): Add new section. Mention wincmdln. * cygwinenv.xml: Mention wincmdln.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/environ.cc15
-rw-r--r--winsup/cygwin/fhandler_tty.cc5
-rw-r--r--winsup/cygwin/globals.cc9
-rw-r--r--winsup/cygwin/release/1.7.233
-rw-r--r--winsup/cygwin/spawn.cc5
-rwxr-xr-xwinsup/cygwin/update-copyright4
-rw-r--r--winsup/doc/ChangeLog5
-rw-r--r--winsup/doc/cygwinenv.xml6
-rw-r--r--winsup/doc/new-features.xml13
10 files changed, 51 insertions, 23 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0d20106bc..bdabb21a4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+2013-07-26 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * environ.cc (tty_is_gone): Delete.
+ (known): Delete tty, add wincmdln.
+ * globals.cc: Reorganize list of environment bools, remove explicit =
+ false for slight load time optimization.
+ (wincmdln): New global.
+ * spawn.cc (child_info_spawn::worker): Honor wincmdln.
+
2013-07-23 Corinna Vinschen <corinna@vinschen.de>
* ntdll.h (struct _SEMAPHORE_BASIC_INFORMATION): Define.
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 71d15b63d..54b724286 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -77,19 +77,6 @@ set_proc_retry (const char *buf)
}
static void
-tty_is_gone (const char *buf)
-{
- if (!user_shared->warned_notty)
- {
- small_printf ("\"tty\" option detected in CYGWIN environment variable.\n"
- "CYGWIN=tty is no longer supported. Please remove it from your\n"
- "CYGWIN environment variable and use a terminal emulator like mintty,\n"
- "xterm, or rxvt.\n");
- user_shared->warned_notty = 1;
- }
-}
-
-static void
set_winsymlinks (const char *buf)
{
if (!buf || !*buf)
@@ -146,7 +133,7 @@ static struct parse_thing
{"pipe_byte", {&pipe_byte}, setbool, NULL, {{false}, {true}}},
{"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}},
{"reset_com", {&reset_com}, setbool, NULL, {{false}, {true}}},
- {"tty", {func: tty_is_gone}, isfunc, NULL, {{0}, {0}}},
+ {"wincmdln", {&wincmdln}, setbool, NULL, {{false}, {true}}},
{"winsymlinks", {func: set_winsymlinks}, isfunc, NULL, {{0}, {0}}},
{NULL, {0}, setdword, 0, {{0}, {0}}}
};
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 34c879503..5efbf4328 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -96,7 +96,7 @@ fhandler_pty_common::__acquire_output_mutex (const char *fn, int ln,
{
if (strace.active ())
strace.prntf (_STRACE_TERMIOS, fn, "(%d): pty output_mutex (%p): waiting %d ms", ln, output_mutex, ms);
- if (ms == INFINITE)
+ if (0 && ms == INFINITE)
ms = 100;
DWORD res = WaitForSingleObject (output_mutex, ms);
if (res == WAIT_OBJECT_0)
@@ -145,6 +145,9 @@ fhandler_pty_common::__release_output_mutex (const char *fn, int ln)
void
fhandler_pty_master::doecho (const void *str, DWORD len)
{
+ static char buf[128 * 1024];
+ int buflen = process_slave_output (buf, sizeof (buf), false);
+ puts_readahead (buf, buflen);
acquire_output_mutex (INFINITE);
if (!WriteFile (to_master, str, len, &len, NULL))
termios_printf ("Write to %p failed, %E", to_master);
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index 3cbf8f4c1..a39d5c908 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -67,12 +67,13 @@ int NO_COPY dynamically_loaded;
/* Some CYGWIN environment variable variables. */
bool allow_glob = true;
-bool ignore_case_with_glob = false;
+bool detect_bloda;
bool dos_file_warning = true;
+bool ignore_case_with_glob;
+bool pipe_byte;
+bool reset_com;
+bool wincmdln;
winsym_t allow_winsymlinks = WSYM_sysfile;
-bool reset_com = false;
-bool pipe_byte = false;
-bool detect_bloda = false;
bool NO_COPY in_forkee;
diff --git a/winsup/cygwin/release/1.7.23 b/winsup/cygwin/release/1.7.23
index f1087ca9f..959d8f67a 100644
--- a/winsup/cygwin/release/1.7.23
+++ b/winsup/cygwin/release/1.7.23
@@ -5,6 +5,9 @@ What's new:
What changed:
-----------
+- Added CYGWIN environment variable keyword which causes the full windows command
+ line (<=32K) to always be sent to subprocesses.
+ See: http://cygwin.com/ml/cygwin/2013-07/threads.html#00523
Bug fixes:
----------
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 7682c3b9e..74c5fa40c 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -407,8 +407,9 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
moreinfo->argc = newargv.argc;
moreinfo->argv = newargv;
}
- else if (!cmd.fromargv (newargv, real_path.get_win32 (),
- real_path.iscygexec ()))
+ if ((wincmdln || !real_path.iscygexec ())
+ && !cmd.fromargv (newargv, real_path.get_win32 (),
+ real_path.iscygexec ()))
{
res = -1;
goto out;
diff --git a/winsup/cygwin/update-copyright b/winsup/cygwin/update-copyright
index ad5eb2310..3677c6156 100755
--- a/winsup/cygwin/update-copyright
+++ b/winsup/cygwin/update-copyright
@@ -54,10 +54,10 @@ sub update_maybe($%) {
while (<>) {
if ($copyright) {
push @file, $_;
- } elsif (/^(?:dnl\s|[#\s]*)Copyright/o) {
+ } elsif (/^(?:dnl\s|.*"|[#\s]*)Copyright/o) {
$copyright = $_;
$copyright .= scalar <> while $copyright =~ /,\s*$/o;
- if ($copyright !~ /Red Hat, Inc\.\n/o) {
+ if ($copyright !~ /Red Hat, Inc\.(?: 1996\s*-\s*.*)?\n/so) {
push @file, $copyright;
next;
}
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index ab97e59a1..e91161b83 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-26 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * new-features.sgml (ov-new1.7.23): Add new section. Mention wincmdln.
+ * cygwinenv.xml: Mention wincmdln.
+
2013-07-25 Corinna Vinschen <corinna@vinschen.de>
* gcc.xml (gcc-64): Fix example.
diff --git a/winsup/doc/cygwinenv.xml b/winsup/doc/cygwinenv.xml
index 1d3400097..5a3e999b2 100644
--- a/winsup/doc/cygwinenv.xml
+++ b/winsup/doc/cygwinenv.xml
@@ -82,6 +82,12 @@ time and when handles are inherited. Defaults to set.</para>
</listitem>
<listitem>
+<para><envar>(no)wincmdln</envar> - if set, the windows complete command
+line (truncated to ~32K) will be passed on any processes that it creates
+in addition to the normal UNIX argv list. Defaults to not set.</para>
+</listitem>
+
+<listitem>
<para><envar>winsymlinks:{lnk,native,nativestrict}</envar> - if set to just
<literal>winsymlinks</literal> or <literal>winsymlinks:lnk</literal>,
Cygwin creates symlinks as Windows shortcuts with a special header and
diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml
index 5b7563973..4737c6426 100644
--- a/winsup/doc/new-features.xml
+++ b/winsup/doc/new-features.xml
@@ -4,6 +4,19 @@
<sect1 id="ov-new1.7"><title>What's new and what changed in Cygwin 1.7</title>
+<sect2 id="ov-new1.7.23"><title>What's new and what changed from 1.7.22 to 1.7.23</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Added CYGWIN environment variable keyword "wincmdln" which causes Cygwin to send the full
+windows command line to any subprocesses.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
<sect2 id="ov-new1.7.22"><title>What's new and what changed from 1.7.21 to 1.7.22</title>
<itemizedlist mark="bullet">