delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/27/00:03:59

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:mime-version:from:date:message-id:subject:to
:content-type; q=dns; s=default; b=ebbDd8t6uHaQy14vHGzx0txeOYEjh
cjMok4imjZk+iL5muG8Emr1pA9Mfi9rVYh9HI8LoPKJg5l+cDN/RLLQv8fyteGCW
5qOJek14hGpQuhAhx+AycYJGFJV6ujpJHyWDRn+dOId/pkF4tXO4br9ZRgyXd45B
3XglEuSxUug2wc=
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:mime-version:from:date:message-id:subject:to
:content-type; s=default; bh=y+tgd3Ln3EIYVBsXJE1UOmqJ19k=; b=gNX
HWQ7ECdJouEXCB7sBrWu/HaI4zirIEfsOX8X4Myi0i7ApLbg339+z/KTYiow2Ivp
dX254EKJpvcasytgnsctr6IORZOSvHRV2Rk19Mx6TatiLcED2RzOMKLcIUodYd57
ZfdasFHGicGV9OLP3v/hptUajIxSDceXFsdYqqz8=
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=4.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2
X-HELO: mail-la0-f44.google.com
X-Received: by 10.152.207.12 with SMTP id ls12mr5640146lac.14.1425013412624; Thu, 26 Feb 2015 21:03:32 -0800 (PST)
MIME-Version: 1.0
From: A L <al20878 AT gmail DOT com>
Date: Fri, 27 Feb 2015 00:03:12 -0500
Message-ID: <CAKVG1_qOJ2W4f8F_Sz7xh_Ee0uqo3odWr=iSmTzOg+R_Pi5t-A@mail.gmail.com>
Subject: Re: Why does CYGWIN double the backslash in execvp()?
To: cygwin AT cygwin DOT com

Thank you for your response.  It may sound plausible but:

> you tell Cygwin that you want posix semantics

I can't remember seeing that posix semantics require a C library call
to modify arguments in the way the shell does;  since when cygwin a
shell?

> split arg 2 into two args: "DIR" and "C:\\"

and why does it make a difference, all of a sudden?  (posix rules no
longer apply to more than 2 arguments?)  also, if "\\" is followed by
an additional space, "DIR C:\\ ", then it begins to work as well.

> Cygwin cannot make exceptions for individual applications

right!  because cygwin does already know a lot about cmd.exe and
command.com and treats them very specially in case of a "/c" switch
followed by exactly one argument!  take a look at spawn.cc.

btw, on linux, strace for execl() shows no substitution of a lone
backslash passed in an argument... not posix complying, too?

--
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