public inbox for
 help / color / mirror / Atom feed
From: Brian Inglis <>
Subject: Re: Fails to launch batch script in some directories
Date: Sat, 21 Apr 2018 15:39:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2018-04-20 07:11, Corinna Vinschen wrote:
> On Apr 20 14:33, David Macek wrote:
>> Whoa, an interesting bug. I'm forwarding this to the Cygwin mailing list 
>> for reference. I might take a deeper look over the weekend if no-one beats
>> me to it.
>> It seems like running batch files (.bat, .cmd) inside a directory with an 
>> at sign and a space (such as '@ x' or 'x @') fails.
>> /w/temp/@ x$ ./hello.bat
>> 'W:\temp\@' is not recognized as an internal or external command, operable
>> program or batch file.
> Funny. That's very likely a bug in the @file handling in function 
> insert_file() in This is basically stone-age old code to pamper
> starting Cygwin tools with too long commandl ines from cmd.
> I'm looking forward with what you're coming up with.

See my other post in this thread where strace shows @ handling is not involved,
as the script directory and name are normalized and converted to a win32 path
correctly, but child_info_spawn::worker does not appear to quote args with
spaces (or apostrophes) when building the command line, despite the comment near
the top of the function.
It is not clear where this quoting is expected to be done: it looks like
child_info_spawn::worker may do this itself when a script is invoked as
"cmd|command /c script" with argc == 3, but may be expecting a called function
to do this for other cases, as for a cmd script with no args and argc == 1.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

Problem reports:
Unsubscribe info:

  reply	other threads:[~2018-04-21 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Alexpux/MSYS2-packages/issues/>
2018-04-20 12:33 ` David Macek
2018-04-20 13:11   ` Corinna Vinschen
2018-04-21 15:39     ` Brian Inglis [this message]
2018-04-23  6:43       ` David Macek
2018-04-23  8:45         ` Corinna Vinschen
2018-04-23 17:20           ` Brian Inglis
2018-04-24  7:55             ` Corinna Vinschen
2018-04-20 13:11   ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).