Cygwin is not passing arguments to Windows apps

Eliot Moss moss@cs.umass.edu
Sun Dec 17 12:29:19 GMT 2023


On 12/16/2023 10:55 PM, Karl Crary via Cygwin wrote:
> Dear all,
> 
> I am encountering a bug wherein Cygwin is not passing arguments to most Windows programs (although Cygwin programs are 
> doing fine).
> 
> For example, the following command ought to be dumping a lot of usage information, but instead it starts a command 
> prompt, which is what it does when not passed any argument.
> 
> 
> $ cmd /?
> Microsoft Windows [Version 10.0.22621.2715]
> (c) Microsoft Corporation. All rights reserved.
> 
> C:\crary>
> 
> 
> I am experiencing the same behavior with bash, tcsh, zsh, and also make.  In addition to cmd, I've also confirmed that 
> arguments are not being passed to wsl, explorer, and (Miktex's) latex.  Some third-party apps are getting their 
> arguments, including Standard ML of New Jersey.
> 
> This is a brand-new install on a brand-new Windows 11 machine.  (A Dell Precision 3660 tower, if that matters.)  I also 
> tried varying the cygwin dll version (a little, not exhaustively) to no effect.
> 
> Any theory as to what could be going on would be most appreciated.
> 
> My cygcheck output (lightly redacted) follows.
> 
> Karl Crary

Cygwin's shell (generally bash) will try to pattern match ("glob") the /?
because of the ? .  I get intended results if I type:

cmd '/?'

Because what is in the root directory / may vary from system to system,
behavior without the quotes will may vary.

HTH -- EM


More information about the Cygwin mailing list