Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-28 Thread Corinna Vinschen
On Jan 28 15:15, Houder wrote: > On Sun, 27 Jan 2019 22:57:21, Corinna Vinschen wrote: > > > > On Jan 27 19:39, Houder wrote: > > > NO BLODA. > > > > > > Ok, for the record (as this is W7, i.e. pre-pre-W10 :-) > > > > > > Using my original STC again: (source code included below) > > > > > > -

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-28 Thread Houder
On Sun, 27 Jan 2019 22:57:21, Corinna Vinschen wrote: > > On Jan 27 19:39, Houder wrote: > > NO BLODA. > > > > Ok, for the record (as this is W7, i.e. pre-pre-W10 :-) > > > > Using my original STC again: (source code included below) > > > > - create file (in /tmp) write-only, write "Hello,

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-27 Thread Corinna Vinschen
On Jan 27 22:57, Corinna Vinschen wrote: > On Jan 27 19:39, Houder wrote: > > On Tue, 22 Jan 2019 11:39:28, Corinna Vinschen wrote: > > > > > > On Jan 22 11:20, Houder wrote: > > > > On Tue, 22 Jan 2019 10:41:57, Corinna Vinschen wrote: > > > > > On Jan 22 10:25, Houder wrote: > > > > [snip] >

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-27 Thread Corinna Vinschen
On Jan 27 19:39, Houder wrote: > On Tue, 22 Jan 2019 11:39:28, Corinna Vinschen wrote: > > > > On Jan 22 11:20, Houder wrote: > > > On Tue, 22 Jan 2019 10:41:57, Corinna Vinschen wrote: > > > > On Jan 22 10:25, Houder wrote: > > > [snip] > > > > > > > > Curious! It fails (for me) on W7 ... > >

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-27 Thread Houder
On Tue, 22 Jan 2019 11:39:28, Corinna Vinschen wrote: > > On Jan 22 11:20, Houder wrote: > > On Tue, 22 Jan 2019 10:41:57, Corinna Vinschen wrote: > > > On Jan 22 10:25, Houder wrote: > > [snip] > > > > > > Curious! It fails (for me) on W7 ... > > > > > > It works for me just as well on W7:

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Corinna Vinschen
On Jan 22 11:20, Houder wrote: > On Tue, 22 Jan 2019 10:41:57, Corinna Vinschen wrote: > > On Jan 22 10:25, Houder wrote: > [snip] > > > > Curious! It fails (for me) on W7 ... > > > > It works for me just as well on W7: > > > > $ uname -a > > CYGWIN_NT-6.1 vmbert764 2.12.0(0.333/5/3)

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Houder
On Tue, 22 Jan 2019 10:41:57, Corinna Vinschen wrote: > On Jan 22 10:25, Houder wrote: [snip] > > Curious! It fails (for me) on W7 ... > > It works for me just as well on W7: > > $ uname -a > CYGWIN_NT-6.1 vmbert764 2.12.0(0.333/5/3) 2019-01-21 22:47 x86_64 Cygwin > $ ./stca /dev/fd/0 < ? bla

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Corinna Vinschen
On Jan 22 10:25, Houder wrote: > 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 > > > > >

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Houder
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,

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Corinna Vinschen
On Jan 22 10:02, Corinna Vinschen wrote: > On Jan 22 09:50, Houder wrote: > > On Sun, 6 Jan 2019 21:19:50, Corinna Vinschen wrote: > > > > Also see: > > > > > > > > https://cygwin.com/ml/cygwin/2018-12/msg00028.html > > > > ( Bash heredoc on FD 3 ) > > > > > > > > Based on the output of

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Corinna Vinschen
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

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Corinna Vinschen
On Jan 22 09:50, Houder wrote: > On Sun, 6 Jan 2019 21:19:50, Corinna Vinschen wrote: > > > Also see: > > > > > > https://cygwin.com/ml/cygwin/2018-12/msg00028.html > > > ( Bash heredoc on FD 3 ) > > > > > > Based on the output of strace on Linux, I composed an STC, that duplicates > > >

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Houder
On 2019-01-22 09:50, Houder wrote: On Sun, 6 Jan 2019 21:19:50, Corinna Vinschen wrote: On Dec 16 17:31, Houder wrote: > L.S., > > /dev/fd/N not synonymous with file descriptor N; it is on Linux > > 64-@@ cat /dev/fd/0 <<\EOF > > Hi > > EOF > cat: /dev/fd/0: No such file or directory > >

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-22 Thread Houder
On Sun, 6 Jan 2019 21:19:50, Corinna Vinschen wrote: > > On Dec 16 17:31, Houder wrote: > > L.S., > > > > /dev/fd/N not synonymous with file descriptor N; it is on Linux > > > > 64-@@ cat /dev/fd/0 <<\EOF > > > Hi > > > EOF > > cat: /dev/fd/0: No such file or directory > > > > fails on Cygwin;

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-06 Thread Corinna Vinschen
On Dec 16 17:31, Houder wrote: > L.S., > > /dev/fd/N not synonymous with file descriptor N; it is on Linux > > 64-@@ cat /dev/fd/0 <<\EOF > > Hi > > EOF > cat: /dev/fd/0: No such file or directory > > fails on Cygwin; not on Linux. > > Also see: > >

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2019-01-02 Thread Houder
On 2018-12-17 12:26, Corinna Vinschen wrote: On Dec 17 10:25, Corinna Vinschen wrote: On Dec 17 05:30, Houder wrote: > On 2018-12-16 22:55, Corinna Vinschen wrote: > [snip] > > > I'm mulling over adding some hack to open(). It could try to recognize > > the special case of opening a processes'

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-17 Thread Corinna Vinschen
On Dec 17 10:25, Corinna Vinschen wrote: > On Dec 17 05:30, Houder wrote: > > On 2018-12-16 22:55, Corinna Vinschen wrote: > > [snip] > > > > > I'm mulling over adding some hack to open(). It could try to recognize > > > the special case of opening a processes' own descriptor symlink within > >

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-17 Thread Corinna Vinschen
On Dec 17 05:30, Houder wrote: > On 2018-12-16 22:55, Corinna Vinschen wrote: > [snip] > > > I'm mulling over adding some hack to open(). It could try to recognize > > the special case of opening a processes' own descriptor symlink within > > /proc and then warp the open() call into dup(). No

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-16 Thread Houder
On 2018-12-16 22:55, Corinna Vinschen wrote: [snip] I'm mulling over adding some hack to open(). It could try to recognize the special case of opening a processes' own descriptor symlink within /proc and then warp the open() call into dup(). No idea how tricky or even feasible that is,

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-16 Thread Houder
On 2018-12-16 21:28, Corinna Vinschen wrote: On Dec 16 17:31, Houder wrote: L.S., /dev/fd/N not synonymous with file descriptor N; it is on Linux Yes, it is. Most of the time. Try this: $ echo foo | cat /dev/fd/0 The problem is that some of the concepts don't work as desired: 64-@@ cat

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-16 Thread Corinna Vinschen
On Dec 16 13:36, Wayne Davison wrote: > On Sun, Dec 16, 2018 at 12:29 PM Corinna Vinschen wrote: > > In contrast to Linux the symlinks are not just faked symlinks with the > > underlying OS having direct access to the file descriptors. > > Yeah, Linux is more like a fuse where the open

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-16 Thread Wayne Davison
On Sun, Dec 16, 2018 at 12:29 PM Corinna Vinschen wrote: > In contrast to Linux the symlinks are not just faked symlinks with the > underlying OS having direct access to the file descriptors. Yeah, Linux is more like a fuse where the open filehandles are used directly on open, and the stat calls

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-16 Thread Corinna Vinschen
On Dec 16 21:28, Corinna Vinschen wrote: > On Dec 16 17:31, Houder wrote: > > L.S., > > > > /dev/fd/N not synonymous with file descriptor N; it is on Linux > > Yes, it is. Most of the time. Try this: > > $ echo foo | cat /dev/fd/0 > > The problem is that some of the concepts don't work as

Re: /dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-16 Thread Corinna Vinschen
On Dec 16 17:31, Houder wrote: > L.S., > > /dev/fd/N not synonymous with file descriptor N; it is on Linux Yes, it is. Most of the time. Try this: $ echo foo | cat /dev/fd/0 The problem is that some of the concepts don't work as desired: > 64-@@ cat /dev/fd/0 <<\EOF If you observe what

/dev/fd/N not synonymous with file descriptor N; it is on Linux

2018-12-16 Thread Houder
L.S., /dev/fd/N not synonymous with file descriptor N; it is on Linux 64-@@ cat /dev/fd/0 <<\EOF Hi EOF cat: /dev/fd/0: No such file or directory fails on Cygwin; not on Linux. Also see: https://cygwin.com/ml/cygwin/2018-12/msg00028.html ( Bash heredoc on FD 3 ) Based on the