delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/05/09/10:57:46

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:content-type:in-reply-to:from:date:cc:to
:mime-version:message-id:subject:content-transfer-encoding; q=
dns; s=default; b=wjoXT+f+1sVrH0Vplc38hWYRb1MLyxXKFi8V2PGkGgTOD8
AWUi9fliRkFAsb2PZsqmV10Y+eGwGCLBvoy/8WHdYkwADkiYcyXdqWSLqjRa7chD
Oy3SZr4WPljxqgT2qHp6R0CfTVLl3J6mQ3qiCK9gdVTuBuysC/5vOh1PzFJw0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:content-type:in-reply-to:from:date:cc:to
:mime-version:message-id:subject:content-transfer-encoding; s=
default; bh=6w26NhYZVoFBKlnjQDO14C89kcc=; b=ZG9W++UHK8tgLAMHW3gO
3q+x1mfTP9Xr98J69ClJBTVRgyUZufoQ3/MhAo7gmyvuKERydChzdd0SQuogNPu+
YV+eA9Ab4DORGnq/CX75Fs8CwbP+HVp3yBKmIOUoXtJBJXf3zk67YMlWJgCaEopl
Zdrn06++KoCsYFDV/JHbwI8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=quotes!, universe, D*cantab.net, dra27 AT cantab DOT net
X-HELO: mail.hepe.com
content-type: text/plain; charset="utf-8"
in-reply-to: <006301d1a834$6ccd1380$46673a80$@cantab.net>
from: "Aaron Digulla" <digulla AT hepe DOT com>
X-Forward: 46.140.173.26
date: Mon, 09 May 2016 16:57:16 +0200
cc: cygwin AT cygwin DOT com
to: "David Allsopp" <dra27 AT cantab DOT net>
MIME-Version: 1.0
message-id: <5ba8-5730a580-3b-2319ce00@26574710>
subject: =?utf-8?q?RE=3A?= Formatting command line arguments when starting a Cygwin process from a native process
User-Agent: SOGoMail 2.3.10
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u49Evhpx022512

Am Samstag, 07. Mai 2016 09:45 CEST, "David Allsopp" <dra27 AT cantab DOT net> schrieb:


> > Then all you need is a rudimentary quoting.
>
> Yes, but the question still remains what that rudimentary quoting is - i.e.
> I can see how to quote spaces which appear in elements of argv, but I cannot
> see how to quote double quotes!

This should help: https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/

My line of thought is that Cygwin can't get anything which Windows can't send it. So the first step to solve this mess is to make sure the arguments which you send to CreateProcess() are correct.

The next step would be to write a small C utility which dumps it's arguments, so you can properly debug all kinds of characters.

PS: I always point people to string list/array type methods to create processes which fix all the problems with spaces and odd characters (quotes, umlauts, etc). It seems that Windows doesn't have such a method to create processes. Which kind of makes sense; Windows is very, very mouse centered.

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://blog.pdark.de/


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


- Raw text -


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