public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-patches@cygwin.com
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`
Date: Sat, 22 Oct 2022 10:36:39 +0900	[thread overview]
Message-ID: <20221022103639.0be6d01709fc99d06b3d0d41@nifty.ne.jp> (raw)
In-Reply-To: <8rqs6n82-0oq9-2200-944n-74s7o699385o@tzk.qr>

On Fri, 21 Oct 2022 23:37:35 +0200 (CEST)
Johannes Schindelin wrote:
> In 2b4f986e49 (Cygwin: pty: Treat *.bat and *.cmd as a non-cygwin
> console app., 2022-07-31), we introduced a bug fix that specifically
> looks for a suffix of the command's file name.
> 
> However, that file name might be set to `NULL`, namely when
> `null_app_name == true`, which is the case when we detected a
> command-line `cmd /c [...]`.

It seems that this is msys2 specific issue.
I also noticed that
cmd //c 'echo AAA' instead of cmd /c 'echo AAA' works in msys2.

In cygwin, filename is
C:\WINDOWS\system32\cmd.exe
for cmd /c 'echo AAA'.

Why the filename can be NULL in msys2 in the case of cmd /c 'echo AAA'?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  reply	other threads:[~2022-10-22  1:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 21:37 Johannes Schindelin
2022-10-22  1:36 ` Takashi Yano [this message]
2022-10-22  1:54   ` Takashi Yano
2022-10-22  5:37     ` Takashi Yano
2022-10-22  5:55       ` Johannes Schindelin
2022-10-22  6:07         ` Takashi Yano
2022-10-23 20:48           ` Johannes Schindelin

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20221022103639.0be6d01709fc99d06b3d0d41@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin-patches@cygwin.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).