X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53F283857C44
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1691568121;
	bh=geVtJCpIjGvIfjLa/lLM9NDzwdowOrbBK3pZ7zPsRxA=;
	h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=ovF5u4ykmy5SccnXFn/AOHq3rOeIEVbMqvLEZsfZBRIwT0w+lnEVfCcEDsejW4pze
	 3QJ+opeifno72bqf6E/mSkKPjOOnkb4pR+Biuwjqzy8yvPJj42KIoZXeixS7ZBpAyk
	 gP6HfRA8WNd4oFF/JtWR+H8apPuI29WmXk69QiVo=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B00C63858D20
Date: Wed, 9 Aug 2023 10:01:22 +0200
To: Martin Wege <martin.l.wege@gmail.com>
Subject: Re: mkfifo: cannot set permissions of 'x.fifo': Not a directory
Message-ID: <ZNNH0hbsCqH98ioK@calimero.vinschen.de>
Mail-Followup-To: Martin Wege <martin.l.wege@gmail.com>, cygwin@cygwin.com
References: <CANH4o6O-8O-iMaHowDuy0y7H=pVfZ-3EvubDmTdjGVSST8FkAQ@mail.gmail.com>
 <c8daacfa-b441-ebbb-90da-03318080479c@Shaw.ca>
 <ZNFCjtiVOhpRYhHI@calimero.vinschen.de>
 <CANH4o6P2fBmxvOZKVrrxDuMByHEMgs2qg14p710aUuLsFYG4rA@mail.gmail.com>
 <ZNH62q/fs9Lt78dD@calimero.vinschen.de>
 <CANH4o6Pjfsgijcf3rHEeB+YsVQTQYm8EvepwFVdj_PrKuP4NHA@mail.gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <CANH4o6Pjfsgijcf3rHEeB+YsVQTQYm8EvepwFVdj_PrKuP4NHA@mail.gmail.com>
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Corinna Vinschen <corinna-cygwin@cygwin.com>, cygwin@cygwin.com
Content-Type: text/plain; charset="utf-8"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 379821aI017018

On Aug  8 21:38, Martin Wege via Cygwin wrote:
> On Tue, Aug 8, 2023 at 10:20 AM Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> >
> > On Aug  7 23:14, Martin Wege via Cygwin wrote:
> > > On Mon, Aug 7, 2023 at 9:14 PM Corinna Vinschen
> > > <corinna-cygwin@cygwin.com> wrote:
> > > >
> > > > On Aug  7 12:26, Brian Inglis via Cygwin wrote:
> > > > > On 2023-08-07 08:42, Martin Wege via Cygwin wrote:
> > > > > > We get a weird mkfifo failure in Cygwin on NTFS:
> > > > > >
> > > > > > /usr/bin/mkfifo -m 600 x.fifo
> > > > > > mkfifo: cannot set permissions of 'x.fifo': Not a directory
> > > > >
> > > > > This error is also reproducible with default fifo permissions 666 or
> > > > > anything else, and appears to be returned by gen_full_path_at() in
> > > > > syscalls.cc when called with a fifo:
> > > >
> > > > This will be fixed in 3.4.8,
> > >
> > > Thank you
> > >
> > > > see
> > > > https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=b56b4d7fd85b
> > >
> > > First, Can I download a beta of  3.4.8, or any other version with that
> > > fix? It's pretty urgent
> >
> > You can install a test release of Cygwin, simply by using the setup tool
> > These test releases are always created from the git main branch, though,
> > so they are always test releases of the next major version, currently
> > 3.5.0.
> 
> Where can I download the Setup.exe tool for those test releases?

You already have it: https://cygwin.com/install.html

> > > Secondly, how are fifos, other device nodes and mknod implemented? You
> > > encode them as softlinks on ntfs?
> >
> > Not only on NTFS.  FIFOs on the disk are always created as symlinks
> > with a special target string, recognized by Cygwin.  No differece on
> > NFS.  Microsoft NFSv3 has no way to specify creating a "real" FIFO
> > on the remote filesystem.  It wouldn't make sense anyway, because
> > there's no way to share the FIFO across systems.
> 
> So no Windows ioctl to do a mknod?

Windows does not have provisions to store FIFOs on disk.  The closest
you get in Windows are Windows named pipes, and those are stored
non-permanently in a special, temporary filesystem inside the native NT
namespace.  Try this in Cygwin:

  $ cd /proc/sys/Device/NamedPipe/    <-- trailing slash!
  $ ls -l

FIFOs in the normal Windows filesystem are a Cygwin fake.

> What does a Linux/FreeBSD FIFO file look like, if you export that
> filesystem via NFSv3, and mount it via the native Windows NFSv3
> driver, and do a ls -l in Cygwin?

It looks like a FIFO because MSFT NFSv3 exports the stat(2) info
verbatim:

linux$ mkfifo blubb

cygwin$ ls -l blubb
prw-r--r-- 1 corinna vinschen 0 Aug  8 10:22 blubb

In Windows Explorer and cmd.exe its a file of size 0 with the
"System" attribute set.

In Samba it looks like an ordinary file of size 0.


Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

