From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-02.nifty.com (conssluserg-02.nifty.com [210.131.2.81]) by sourceware.org (Postfix) with ESMTPS id BB93B3858407 for ; Sat, 22 Oct 2022 01:54:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BB93B3858407 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from HP-Z230 (aj136180.dynamic.ppp.asahi-net.or.jp [220.150.136.180]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 29M1s6qh003396; Sat, 22 Oct 2022 10:54:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 29M1s6qh003396 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1666403646; bh=kdPvs0g6bBiVSV1r9iqJ7miPYWCBx2r89Zq4Py1XEdY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=25I67NhQnhcsFkAi/z17YmUeCgdGnEvhea6A3K8KCup1QeDosjwf47yCAmY8+z+Ok KLDjsp1JPkGcQOaflR5zXZPdtpArHTw0Uu9kJSfO8oi3yKOpx0kgTnxydW0jfByGhX 2mjnyo+kCwbFtOCIuEG/RtR/igrrlz5zh47+YWsayRvj8mkFXHojylaXStW9hTNSGS f6uLG17QvRNB94fEcjFaw9OiuUS+snA5eCteoIHhvmH3UqHhsHcHyX07dRo6l1exOv xYGpV2jdHsfgeRpQGSWG99qO4A+Dk4/grtsC75bF1fGa7VLCOstWkSYfXNQq3P3XUx XqqQQVi5k7J9w== X-Nifty-SrcIP: [220.150.136.180] Date: Sat, 22 Oct 2022 10:54:06 +0900 From: Takashi Yano To: cygwin-patches@cygwin.com Cc: Johannes Schindelin Subject: Re: [PATCH] Fix `Bad address` when running `cmd /c [...]` Message-Id: <20221022105406.12f2c65e497e80df4014a8fb@nifty.ne.jp> In-Reply-To: <20221022103639.0be6d01709fc99d06b3d0d41@nifty.ne.jp> References: <8rqs6n82-0oq9-2200-944n-74s7o699385o@tzk.qr> <20221022103639.0be6d01709fc99d06b3d0d41@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, 22 Oct 2022 10:36:39 +0900 Takashi Yano wrote: > 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'? I can reproduce the issue in cygwin with cmd.exe /c 'echo AAA' instead of cmd /c 'echo AAA'. -- Takashi Yano