[PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin, stdout, stderr} symlinks

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Feb 28 09:24:18 GMT 2022


On Feb 25 16:46, Johannes Schindelin wrote:
> Hi Corinna,
> 
> On Tue, 22 Feb 2022, Corinna Vinschen wrote:
> 
> > On Feb 21 14:36, Johannes Schindelin wrote:
> > > These symbolic links are crucial e.g. to support process substitution (Bash's
> > > very nice `<(SOME-COMMAND)` feature).
> > >
> > > For various reasons, it is a bit cumbersome (or impossible) to generate these
> > > symbolic links in all circumstances where Git for Windows wants to use its
> > > close fork of the Cygwin runtime.
> > >
> > > Therefore, let's just handle these symbolic links as implicit, virtual ones.
> > >
> > > If there is appetite for it, I wonder whether we should do something similar
> > > for `/dev/shm` and `/dev/mqueue`? Are these even still used in Cygwin?
> >
> > "still used"?  These are the dirs to store POSIX semaphors, message
> > queues and shared mem objects.
> 
> Okay. I guess we do not really use them in Git for Windows ;-)

Probably not.  I'm not aware that git uses POSIX IPC objects.

> > These have to be real on-disk dirs.
> 
> Could I ask you to help me understand why? Do they have to be writable? Or
> do the things that are written into them have to be persisted between
> Cygwin sessions?

Cygwin uses ordinary on-disk files to emulate the objects, and
they have to persist over process exits.  Unfortunately I don't
see any other way to create persistent objects from user space.


Corinna


More information about the Cygwin-patches mailing list