From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116595 invoked by alias); 11 Jul 2017 23:24:53 -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 116581 invoked by uid 89); 11 Jul 2017 23:24:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.8 required=5.0 tests=AWL,BAYES_50,FORGED_YAHOO_RCVD,FREEMAIL_FROM,MISSING_MID,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_NEUTRAL autolearn=no version=3.3.2 spammy=puzzled, swear, intrusion, Hx-languages-length:2518 X-HELO: resqmta-po-08v.sys.comcast.net Received: from resqmta-po-08v.sys.comcast.net (HELO resqmta-po-08v.sys.comcast.net) (96.114.154.167) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Jul 2017 23:24:51 +0000 Received: from resomta-po-09v.sys.comcast.net ([96.114.154.233]) by resqmta-po-08v.sys.comcast.net with ESMTP id V4W6deu9AHlo1V4WPdhYFF; Tue, 11 Jul 2017 23:24:49 +0000 Received: from M6800.technologist.com ([192.82.102.253]) by resomta-po-09v.sys.comcast.net with SMTP id V4UJdry0WapZ8V4UMdgKni; Tue, 11 Jul 2017 23:22:47 +0000 Date: Tue, 11 Jul 2017 23:24:00 -0000 To: cygwin@cygwin.com From: "Richard Beels via cygwin" Reply-To: Richard Beels Subject: Re: Challenge: a VERY strange problem with command substitution in bash In-Reply-To: <93b0a4e1-78eb-798e-9946-cd38ab288cce@wagner.is> References: <93b0a4e1-78eb-798e-9946-cd38ab288cce@wagner.is> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4wfK+Fii08phzpvOdZ0gQs6rtzEK5ISVch7z1ltg52hyiSAQqyHKLzsxkbkWVrEGALXmc7dYUnF+HFBKzJNuFNyosUbPC+Wh69gNGmxqRm99qK1fzsSUei JXkxeFMXVyW9KaetsoZsulnyZNkP9AfdNmpNbAxfEOaaQf6zEBzdnyg9ao5XBk4EfUpls6GH2vdtTg== X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00197.txt.bz2 Message-ID: <20170711232400.huDrMSnJZcq3ErAsB5Es-at2ELAJYhcf7JlNx8TnxvM@z> At 07/11/2017 at 15:12, Shakespearean monkeys=20 danced on J=C3=BCrgen Wagner's keyboard and said: >... >Using backquotes instead of the command=20 >substitution with $(...) does not change the=20 >results. I could swear this did work in an=20 >earlier version of Cygwin on my Windows 7 machine. > >I tried this to see if the code in the parentheses is executed at all: > >$ value=3D"$( date 2> foo | cat )"; echo "$? <$value>" > >The file "foo" was not created, i.e., it seems=20 >the commands don't really get executed. > >$ value=3D"$( date && pwd )"; echo "$? <$value>" >0 /home/juergen> > >$ value=3D"$( date || pwd )"; echo "$? <$value>" >0 > >both work, so some control structures seem to be=20 >permissible... just not a pipe. > >What is going on? Some misconfiguration? A=20 >Cygwin bug? Some interaction with something=20 >weird in Windows 10? I am at loss to understand=20 >what could be wrong... and am now most curious=20 >whether anybody has an idea what is causing=20 >this. Does it work/not work in the same way in your Cygwin installation? > >I came across this effect because=20 >ssh-host-config did not recognize me as=20 >administrator anymore. It's due to a check for a=20 >certain user group that uses a command=20 >substitution with a pipe. Replacing this with an=20 >equivalent command works. The original line used=20 >"id -G" and then a "grep -Eq" to check whether a certain group is on that = list. > >I am VERY curious now! I've rarely been puzzled=20 >that much by such a very elementary shell=20 >expression (looking back at 34 years of Unix experience). Hi Jurgen. 90% chance it's what is called bloda in these=20 parts. It's in the FAQ on cygwin.com. I'll go=20 out on a limb and say you might have just=20 installed/changed your AV/Firewall software. And if I want to be super-psychic, can I guess=20 comodo? Because I just changed to comodo a=20 couple weeks ago and had the same=20 subshell/command substitution/pipeline errors you're mentioning. If so, you need to exclude your cygwin folder=20 from AV scanning. AND... if the software does=20 whitelisting or host intrusion protection (HIPS)=20 or "run unknown executables in a=20 container/sandbox" or something similar, you also=20 need to trust all the executables, too. Or=20 switch to something else that doesn't trip cygwin's trigger. After doing that and a rebaseall, I haven't had a=20 fork error in a week. I can't wait to run setup=20 and come up with an update process, though... Cheers! -- 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