From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47192 invoked by alias); 31 Aug 2019 03:58:48 -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 47149 invoked by uid 89); 31 Aug 2019 03:58:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 31 Aug 2019 03:58:44 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id 3uXAiDzF2sAGk3uXBixhes; Fri, 30 Aug 2019 21:58:42 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: Command line processing in dcrt0.cc does not match Microsoft parsing rules To: "cygwin@cygwin.com" References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: Date: Sat, 31 Aug 2019 04:18:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00437.txt.bz2 On 2019-08-30 14:59, Stephen Provine wrote: >> Cygwin command line parsing has to match Unix shell command line processing, >> like argument splitting, joining within single or double quotes or after a >> backslash escaped white space characters, globbing, and other actions normally >> performed by a shell, when any Cygwin program is invoked from any Windows >> program e.g. cmd, without those Windows limitations which exclude any use of a >> backslash escape character except preceding another or a double quote. > I guess my assumption was that the "winshell" parameter would be used to determine > when a Cygwin process is called from a non-Cygwin process and that it would be more > appropriate to use standard Windows command line processing (as limiting as it may > be) in that case. Once in the Cygwin environment, calls from one process to another > should obviously process command lines according to Unix shell rules. Not being in the same Cygwin process group and lacking the appropriate interface info indicates that the invoker was not Cygwin. Cygwin command line file name globs can include any UTF-8 character excluding forward and backward (for Windows compatibility) oblique slashes and nulls, with non-Windows supported characters including leading and trailing spaces and dots, and result in thousands of file name arguments on the command line e.g. $ echo /var/log/* | wc -lwmcL 1 66858 2903078 2903078 2903077 shows I need to clean up my /var/log directory as it contains 64K+ files with names totalling 2234498 chars/bytes, plus 668579 for paths and spaces, plus a newline terminator. Some file names with non-Windows supported characters have them converted to the UTF-16LE BMP PUA by adding xf000, or for characters not supported by non-UTF-8 interface encodings, ^X CAN x18 followed by a BMP UTF-8 sequence, allowing conversion to UTF-16LE, at the cost of weird characters in the displayed names. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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