www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/12/15/06:58:03

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5BFBw15J3049769
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5BFBw15J3049769
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=OlzesPzW
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 891554BA23CF
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1765799880;
bh=Ic04zvK1ZFvbN7X7k7VFqcpug3hIwv2tKdmmVI4XP8k=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=OlzesPzW48dOuoJQDllTkDgFfUyNoQIZ/wh7Brj9jvSyzY/tAdSPnXUxcUd9fLj2d
mQyHOsppm0/VxVwrObANoDE9Um82gFY04YkU9JHj21qqdJFBedjODGlF3NBNHqERnc
j6tWsq3sthC/GcJ83DRKtwpf6Y4hxJlOCqtDOwKY=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 003B44BA2E1E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 003B44BA2E1E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765799833; cv=none;
b=n+2OXnRPfRQ3kwTy4bCZ2ZLkp/I8mJnFuRvGjuYUQ3XICT1Bqg0/0I6TguNM5IQgDAN9Gd31mgQEWp83QY5QQ3AIokH/fxaDlWedgJZ/qitemoC6xeA5190041ykCq9nK2uFWyBAMROnYPeN9gj36JDc3DQDMtLX8MSgRdShn+8=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1765799833; c=relaxed/simple;
bh=M+tJLam8fLf4UDZe6jyF3mBQseoScVBmsiI1+LBJ3do=;
h=Subject:To:From:Message-ID:Date:MIME-Version;
b=Hr/MDhNKXKO9hf+OcClH6g/c5NhxLGcd4hzeaR4SIoxOxJFYzCSpeixbGrprwn09o4NV5ODbmAb0BsXASg5cqKJdbpYCWVjhQ8SCpD3hNH8IkP9yK0IzH1dzDTYKZoOi1k4w4Sd7pEfdQYDVlh0Lbv6bstufX/QXDs+OjERBW/4=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 003B44BA2E1E
Subject: Re: Something wrong with cygstart
To: cygwin AT cygwin DOT com
References: <5010206948 DOT 20251214121509 AT yandex DOT ru>
<4d8b5ba9-ee94-9ca2-4eac-8f0aaab16ef3 AT t-online DOT de>
<1025745816 DOT 20251215140614 AT yandex DOT ru>
Message-ID: <9108e709-c118-bab3-8119-0279f7c4caa2@t-online.de>
Date: Mon, 15 Dec 2025 12:56:56 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101
SeaMonkey/2.53.22
MIME-Version: 1.0
In-Reply-To: <1025745816.20251215140614@yandex.ru>
X-TOI-EXPURGATEID: 150726::1765799816-0E7FA41A-C7EBFCA4/0/0 CLEAN NORMAL
X-TOI-MSGID: 853d8d2f-8e42-461b-a524-6994adf28268
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Christian Franke via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Andrey Repin via Cygwin wrote:
> Greetings, Christian Franke via Cygwin!
>
>> Andrey Repin via Cygwin wrote:
>>> I'm using a wrapper script to comfortably start VS Code from file manager.
>>>
>>> The last line of it is
>>>
>>> cygstart --hide -- "/proc/cygdrive/c/Program Files/Microsoft VS Code/bin/code.cmd" "$(cygpath -alw "$_arg")"
>>>
>>> It works well up to the point where there are no spaces in the $_arg. But on
>>> the first seen space it break the arguments list into pieces.
>>> I have to double-quote the argument to maintain the consistency, like
>>>
>>> cygstart --hide -- "/proc/cygdrive/c/Program Files/Microsoft VS Code/bin/code.cmd" "\"$(cygpath -alw "$_arg")\""
>>>
>>> but that's a questionable solution at best.
>> This is as expected. Unlike Cygwin's exec() emulation, cygstart does not
>> add any quoting during conversion of the argv[] array to the plain argument
>> string required for Windows process creation API.
> Which is rather surprising, considering I've had these scripts for years.
> Guess I was just TOO lucky to not stumble upon the issue sooner.

Yes, as this behavior of cygstart has never changed since its early days 
(v1.0.0 from 2002-03-16):
https://sourceware.org/git/?p=cygwin-apps/cygutils.git;a=tree;f=src/cygstart


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019