From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39497 invoked by alias); 12 Jul 2017 06:08:39 -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 109989 invoked by uid 89); 12 Jul 2017 06:07:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=puzzled, swear, rarely, intrusion X-HELO: mail-io0-f182.google.com Received: from mail-io0-f182.google.com (HELO mail-io0-f182.google.com) (209.85.223.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Jul 2017 06:07:13 +0000 Received: by mail-io0-f182.google.com with SMTP id h64so7206979iod.0 for ; Tue, 11 Jul 2017 23:07:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-transfer-encoding; bh=rO+3MP9Jf5kVd7R6UCJDGWFUHHTD+n6tyOOlfuTRDoo=; b=PWotM/t1nnQxMPbUe+JSviEQBAvHrR59+iFpR4H9azLdkf7aN3cWATbDC8pD/UMXFf g4EMHr7KnhLA390ZBoqhb92yjHxCx5AuXMivcYkRsRmFF37JHfccIRlmN2eUIbPMByju QzJ+k9DxWfGMK0LZbPXBAIfGZYVVrHLXPCZ9Fo84xzZwTHS3hdRPwh8rQ+6Ca6lVZiBc PHSFpDf5i4gxhTokrFfM4eWzIEDABqpgu4NfGKhA1BDeTxmqPS8f9cd6zJY7oTZk41FT qOqj56zoTax22a/LLVDTMZ1EV4T8y/hPbLzcVeQ/rNG+bl/t3FUvIO5nY4oM/QQSji72 mQ2g== X-Gm-Message-State: AIVw111buz9tebAAYaGtyXkJ/N1HX8v1iMpA8q9WqMYB14zzRWGuKqMH 9f+Fck12BnS+/qDbCpPYvX2uF07piA== X-Received: by 10.107.192.135 with SMTP id q129mr4157419iof.63.1499839632073; Tue, 11 Jul 2017 23:07:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.101.4 with HTTP; Tue, 11 Jul 2017 23:06:51 -0700 (PDT) In-Reply-To: <59655e58.d532240a.ae3d8.4253SMTPIN_ADDED_MISSING@mx.google.com> References: <93b0a4e1-78eb-798e-9946-cd38ab288cce@wagner.is> <59655e58.d532240a.ae3d8.4253SMTPIN_ADDED_MISSING@mx.google.com> From: Wouter van Doorn Date: Wed, 12 Jul 2017 06:08:00 -0000 Message-ID: Subject: Re: Challenge: a VERY strange problem with command substitution in bash To: Richard Beels , cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00202.txt.bz2 I bet Comodo is the golden tip. They have introduced whitelisting without telling anyone, and I have had very strange behaviour (strange until that whitelist explained it) too. Including that subshell thing. They call it 'auto-containment'. Just disable that, and done. Wouter On 12 July 2017 at 00:22, Richard Beels via cygwin wrot= e: > At 07/11/2017 at 15:12, Shakespearean monkeys danced on J=C3=83=C2=BCrgen= Wagner's > keyboard and said: >> >> ... >> Using backquotes instead of the command substitution with $(...) does not >> change the results. I could swear this did work in an 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 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 permissible... just not= a >> pipe. >> >> What is going on? Some misconfiguration? A Cygwin bug? Some interaction >> with something weird in Windows 10? I am at loss to understand what coul= d be >> wrong... and am now most curious whether anybody has an idea what is cau= sing >> this. Does it work/not work in the same way in your Cygwin installation? >> >> I came across this effect because ssh-host-config did not recognize me as >> administrator anymore. It's due to a check for a certain user group that >> uses a command substitution with a pipe. Replacing this with an equivale= nt >> command works. The original line used "id -G" and then a "grep -Eq" to c= heck >> whether a certain group is on that list. >> >> I am VERY curious now! I've rarely been puzzled that much by such a very >> elementary shell expression (looking back at 34 years of Unix experience= ). > > > > Hi Jurgen. > > 90% chance it's what is called bloda in these parts. It's in the FAQ on > cygwin.com. I'll go out on a limb and say you might have just > installed/changed your AV/Firewall software. > > And if I want to be super-psychic, can I guess comodo? Because I just > changed to comodo a couple weeks ago and had the same subshell/command > substitution/pipeline errors you're mentioning. > > If so, you need to exclude your cygwin folder from AV scanning. AND... if > the software does whitelisting or host intrusion protection (HIPS) or "run > unknown executables in a container/sandbox" or something similar, you also > need to trust all the executables, too. Or switch to something else that > doesn't trip cygwin's trigger. > > After doing that and a rebaseall, I haven't had a fork error in a week. I > can't wait to run setup 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 > -- 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