/dev/fd/N not synonymous with file descriptor N; it is on Linux
Tue Jan 22 09:25:00 GMT 2019
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
>> 64-@@ ./stca /dev/fd/0 <<EOF
>> > bla
>> > EOF
>> fd1 = 0
>> argv = /dev/fd/0
>> fd2 = 3
>> id = writefd2, errno = 13, errstr = Permission denied
> 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
In short, I was merely testing the semantics of Linux.
> )$ ./stca /dev/fd/0 <<EOF
> ? bla
> ? EOF
> fd1 = 0
> argv = /dev/fd/0
> fd2 = 3
> buf = \
> Hello, world!
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin