From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54922 invoked by alias); 9 May 2016 10:06:38 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 54899 invoked by uid 89); 9 May 2016 10:06:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:9679549, H*f:sk:006301d, H*f:sk:6e1f2ba, H*i:sk:6e1f2ba X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 09 May 2016 10:06:31 +0000 Received: by mail-wm0-f48.google.com with SMTP id g17so177405065wme.1 for ; Mon, 09 May 2016 03:06:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=EqqMz3ijBNcxhWIlCsmI1ha4UJDzfSEWRkChMwxIuOg=; b=g7OQMOSeyGvwJBiL3wW5oOMEaQ3aB2XcfkvavFiXdbw6pEwt7Vi0jyFnmFaPM5CaCM XtNQT3/QR1FSXNs6DVbgdEO+s2EQi5dV+lZ22FLAw/Vmjz+RPbuPmD5sEW06nwi+v9FF NryhErrGEG1EsoZjP9CUC79iicIVPgR4SKZDSLGwsY3GIQ5gl5g1ZYU/dA0vCd6OtbkB 82MzofEbgSa3bnuemLeIIDDWj0EM05ve/uMuulUzIXw5w16rc3QiHspT/fdxNonW2ME/ wEA604e/dwxdUiiy//wRIiJHSlrMbfTp8EVt9lqq59Qqan9wUqippQFs2KxKlK9raKEJ ahJA== X-Gm-Message-State: AOPr4FVlyI/9hzQjjtc3GZkyGGDuA37N4bUAI4XMh9x2L5l+mU1f3F+G6cTMnq1x79wHFw== X-Received: by 10.28.2.67 with SMTP id 64mr9924294wmc.70.1462788388309; Mon, 09 May 2016 03:06:28 -0700 (PDT) Received: from [172.21.188.188] ([62.154.173.198]) by smtp.googlemail.com with ESMTPSA id q125sm23679155wmd.19.2016.05.09.03.06.27 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 May 2016 03:06:27 -0700 (PDT) Subject: Re: Formatting command line arguments when starting a Cygwin process from a native process To: cygwin@cygwin.com References: <005c01d1a6e2$30270ba0$907522e0$@metastack.com> <000101d1a76d$c37c6b80$4a754280$@metastack.com> <967954968.20160506172040@yandex.ru> <006301d1a834$6ccd1380$46673a80$@cantab.net> <6e1f2ba2-0c8e-4659-4c5a-d748e90c1ced@lysator.liu.se> From: Marco Atzeri Message-ID: <8d8fe966-caeb-491c-32e7-fc48ccd56d74@gmail.com> Date: Mon, 09 May 2016 10:06:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <6e1f2ba2-0c8e-4659-4c5a-d748e90c1ced@lysator.liu.se> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00083.txt.bz2 On 09/05/2016 11:43, Peter Rosin wrote: > Hi! >> >>>> I'm not using cmd, or any shell for that matter (that's actually the >>>> point) - I am in a native Win32 process invoking a Cygwin process >>>> directly using the Windows API's CreateProcess call. As it happens, >>>> the program I have already has the arguments for the Cygwin process >>>> in an array, but Windows internally requires a single command line >>>> string (which is not in any related to Cmd). Ultimate overview of MS escape howto : https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ Regards Marco -- 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