public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin,stdout,stderr} symlinks
Date: Tue, 28 Mar 2023 10:36:27 +0200 (CEST)	[thread overview]
Message-ID: <c0814aec-3f82-673b-37b7-e7b20c9c1f15@gmx.de> (raw)
In-Reply-To: <2526762f-71f0-2341-03cc-27f18c0c30f3@SystematicSw.ab.ca>

Hi Brian,

On Fri, 25 Feb 2022, Brian Inglis wrote:

> On 2022-02-21 06: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?
>
> Looks like that would make sense, as Cygwin appears to create all of those
> only on first startup (and probably rechecks if they need created every
> startup) e.g.
>
> Cygwin-32 $ ls -Fglot /dev/ | tail -6
> lrwxrwxrwx  1       13 Apr 29  2012 fd -> /proc/self/fd/
> lrwxrwxrwx  1       15 Apr 29  2012 stderr -> /proc/self/fd/2
> lrwxrwxrwx  1       15 Apr 29  2012 stdout -> /proc/self/fd/1|
> lrwxrwxrwx  1       15 Apr 29  2012 stdin -> /proc/self/fd/0
> drwxr-xr-x+ 1        0 Apr 29  2012 mqueue/
> drwxr-xr-x+ 1        0 Apr 29  2012 shm/
>
> Cygwin-64 $ ls -Fglot /dev/ | tail -6
> drwxrwxrwt+ 1        0 Dec  2  2017 shm/
> lrwxrwxrwx  1       13 May 14  2013 fd -> /proc/self/fd/
> lrwxrwxrwx  1       15 May 14  2013 stderr -> /proc/self/fd/2
> lrwxrwxrwx  1       15 May 14  2013 stdout -> /proc/self/fd/1|
> lrwxrwxrwx  1       15 May 14  2013 stdin -> /proc/self/fd/0
> drwxrwxrwt+ 1        0 May 14  2013 mqueue/
>
> so they would all get 2006-12-01 00:00:00+0000 birth time.
>
> [Looks like I ran something using shm in 2017!]

Thank you for that additional context!

As Corinna pointed out, the directories currently need to exist on disk
(so that mmap()able files can be created in them), though, and even if
there _might_ be a way to avoid this (which would be good, in Git for
Windows' context, where the runtime's pseudo root directory is inside
`C:\Program Files`, i.e. read-only) it looks like a bit too much of a
challenge for me to take on, at least for now.

Ciao,
Johannes

      reply	other threads:[~2023-03-28  8:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 13:36 Johannes Schindelin
2022-02-21 13:36 ` [PATCH 1/2] Implicitly support the /dev/fd symlink and friends Johannes Schindelin
2022-02-21 13:36 ` [PATCH 2/2] Regenerate devices.cc Johannes Schindelin
2022-02-22 12:34 ` [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin,stdout,stderr} symlinks Corinna Vinschen
2022-02-25 15:46   ` [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin, stdout, stderr} symlinks Johannes Schindelin
2022-02-28  9:24     ` Corinna Vinschen
2022-02-28  9:57       ` Corinna Vinschen
2023-03-28  8:34         ` Johannes Schindelin
2022-02-25 18:35 ` [PATCH 0/2] Provide virtual /dev/fd and /dev/{stdin,stdout,stderr} symlinks Brian Inglis
2023-03-28  8:36   ` Johannes Schindelin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0814aec-3f82-673b-37b7-e7b20c9c1f15@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).