Skip to content

Commit

Permalink
Expose full command-lines to other Win32 processes by default
Browse files Browse the repository at this point in the history
In the Cygwin project, it was decided that the command-line of Cygwin
processes, as shown in the output of `wmic process list`, would suffer
from being truncated to 32k (and is transmitted to the child process via
a different mechanism, anyway), and therefore only the absolute path of
the executable is shown by default.

Users who would like to see the full command-line (even if it is
truncated) are expected to set `CYGWIN=wincmdln` (or, in MSYS2's case,
`MSYS=wincmdln`).

Seeing as MSYS2 tries to integrate much better with the surrounding
Win32 ecosystem than Cygwin, it makes sense to turn this on by default.

Users who wish to suppress it can still set `MSYS=nowincmdln`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho authored and lazka committed Aug 25, 2024
1 parent 293731b commit 15ae7aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion winsup/cygwin/globals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bool allow_glob = true;
bool ignore_case_with_glob;
bool pipe_byte = true; /* Default to byte mode so that C# programs work. */
bool reset_com;
bool wincmdln;
bool wincmdln = true;
winsym_t allow_winsymlinks = WSYM_deepcopy;
bool disable_pcon;
bool winjitdebug = false;
Expand Down
2 changes: 1 addition & 1 deletion winsup/doc/cygwinenv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ time and when handles are inherited. Defaults to set.</para>
<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>
in addition to the normal UNIX argv list. Defaults to set.</para>
</listitem>

<listitem>
Expand Down

0 comments on commit 15ae7aa

Please sign in to comment.