www.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:mime-version:content-type | |
:content-transfer-encoding:date:from:to:subject:in-reply-to | |
:references:message-id; q=dns; s=default; b=nRZ39f6OJBXYB70BGt5U | |
e+yqduUa7XYmtkE5WuzPycfLeIzSDKobbzhbRbRSC/cXC9E29cXCOdsTbB84wMDe | |
wrJ8g2D2pzSiNowa/SQuTpsasRzoEPD1BAQ6sMb5VkxhG8S+306EfFuahKHOE7yO | |
023G0mOIlYs+l0ndEDw9DsI= | |
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:content-type | |
:content-transfer-encoding:date:from:to:subject:in-reply-to | |
:references:message-id; s=default; bh=xeLhhOwPyTTMJcAR+JIwns2Gkm | |
Q=; b=k8Xiv+XzZ3+uF3lhLbGgZHuwBrTDyLCTmfGjjfai0/7pii5OL329YBktO2 | |
dM+P15V5R+Q5iqBxI8N+ZwqqdiH2HpDK0b2jCtRTVggMv8RGEreW78mh3IIDo8ZD | |
bqMosaHFuplgwCm04w0EykBMAcDQaiI88ISGn8eDnJHpN1DDY= | |
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-Spam-SWARE-Status: | No, score=-2.6 required=5.0 tests=BAYES_00,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=opening, H*F:D*nl, Hx-spam-relays-external:sk:webmail, H*RU:sk:webmail |
X-HELO: | lb1-smtp-cloud7.xs4all.net |
MIME-Version: | 1.0 |
Date: | Tue, 22 Jan 2019 10:25:53 +0100 |
From: | Houder <houder AT xs4all DOT nl> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux |
In-Reply-To: | <20190122090633.GK2802@calimero.vinschen.de> |
References: | <0f030e809f063f5a5e64ff7a7a0c3227 AT xs4all DOT nl> <20190106201950 DOT GC4430 AT calimero DOT vinschen DOT de> <d6431739e2801a80d73e7cb68b4fcc19 AT smtp-cloud8 DOT xs4all DOT net> <1c60402837d6510667357257b5e96e88 AT xs4all DOT nl> <20190122090633 DOT GK2802 AT calimero DOT vinschen DOT de> |
Message-ID: | <151898514e462bd76cda8a227d4baa16@xs4all.nl> |
X-Sender: | houder AT xs4all DOT nl |
User-Agent: | XS4ALL Webmail |
X-IsSubscribed: | yes |
On 2019-01-22 10:06, Corinna Vinschen wrote: > On Jan 22 09:57, Houder wrote: >> On 2019-01-22 09:50, Houder wrote: >> > On Sun, 6 Jan 2019 21:19:50, Corinna Vinschen wrote: >> > > This should work in the latest developer snapshot uploaded to >> > > https://cygwin.com/snapshots/ Please give it a try. >> > So, for the record only: >> >> and as another example, this STC succeeds on Linux ..., but fails on >> Cygwin. >> >> 64-@@ ./stca /dev/fd/0 <<EOF >> > bla >> > EOF >> fd1 = 0 >> argv[1] = /dev/fd/0 >> fd2 = 3 >> id = writefd2, errno = 13, errstr = Permission denied >> 64-@@ > > Not sure what you're testing. This is the result for me on both, > Windows 8.1 and Windows 10 1809: Curious! It fails (for me) on W7 ... > Not sure what you're testing. STC inherits a "read-only" open file descriptor from bash. On Linux the file can be opened read-write (via procfs), because a new entry is created in the open file table. (opening the file read-write (via fdescfs) on FreeBSD would fail) For this reason the output does not show what has been entered via the here-doc. In short, I was merely testing the semantics of Linux. > )$ ./stca /dev/fd/0 <<EOF > ? bla > ? EOF > fd1 = 0 > argv[1] = /dev/fd/0 > fd2 = 3 > buf = \ > Hello, world! > > > Corinna -- 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 |