delorie.com/archives/browse.cgi | search |
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:message-id:in-reply-to:references:date:subject | |
:from:to:cc:reply-to:mime-version:content-type | |
:content-transfer-encoding; q=dns; s=default; b=xdnH6+e4WLF4k2ci | |
Bq3hop8NNWuB8JyNdex63jEfvwnFTC467eMdS1Pl2YNAyv/FvWWkksRyAQGPX5Jl | |
VuUJcfDttxOT6DBEYNUgGwuAAC+LtKNcAugMmxw9JFSxFEgzQy1VWG2QRDb+89kz | |
bPkHBNtA1yLuj9/LZoWVbiVdAvU= | |
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:message-id:in-reply-to:references:date:subject | |
:from:to:cc:reply-to:mime-version:content-type | |
:content-transfer-encoding; s=default; bh=DyA/I1njK0KuHF0QxqJ0H3 | |
vyjeA=; b=cAgBJtAByzDB4Ymh0Q4zOFcXRax7pWGcxXgXlM0r4NjaFCKUmnTSN2 | |
eKJ2WgtW65Gi+gEHpQcDeu5bezMEM0IHitXBRJ7FgpEcWCe7/G2xi5ue9B9u5/RG | |
bgnSF+tsFvigmh5KwA/M4ze+aBKFjOfJIYp+E3hABxyWchR6xiysQ= | |
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=1.8 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*UA:SquirrelMail, H*M:squirrel, H*r:SquirrelMail, H*u:SquirrelMail |
X-HELO: | www.schneiderp.de |
Message-ID: | <ec89b6011aad4b68a294d3f1d462d40b.squirrel@mail.schneiderp.de> |
In-Reply-To: | <b4de479d-882e-4e61-2916-1b54f318d76c@gmail.com> |
References: | <baa3a4f84968dd6aa9869d2c9f58197f DOT squirrel AT mail DOT schneiderp DOT de> <b4de479d-882e-4e61-2916-1b54f318d76c AT gmail DOT com> |
Date: | Mon, 10 Jul 2017 14:01:55 +0200 |
Subject: | Re: Redirection to stderr |
From: | "cygwin-mailinglist" <cygwin-mailinglist AT schneiderp DOT de> |
To: | "Marco Atzeri" <marco DOT atzeri AT gmail DOT com> |
Cc: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
Reply-To: | cygwin-mailinglist AT schneiderp DOT de |
User-Agent: | SquirrelMail/1.4.23 [SVN] |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
On Mon, July 10, 2017 12:33, Marco Atzeri wrote: > > On 10/07/2017 11:06, cygwin-mailinglist wrote: [...] >> Rationale aside, it is a bug, isn't it? > > I guess a side effect of a lost race. Which race, exactly? > Redirecting something on itself it is not guarantee to work. I'm not sure it is on itself. Are these not two different streams? When "some-cmd 2> /dev/stderr" is interpreted by the shell I would expect that /dev/stderr points to a pipe or terminal *of that shell*. The fd 2 in "2>", on the other hand, should be the standard error stream *of some-cmd*. The redirection plugs the two together. Similar reasoning applies to the outer layers of the redirection onion. Each process has a /dev/stderr which stays (or, rather, should stay) valid until that process ends. If there is a redirection, the inner process (e.g. some-cmd) must not "free" or "delete" the pipe or whatever it is now attached to upon exit; that stream belongs to the caller, e.g. the shell. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |