delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/03/27/08:11:09

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <016d01c0b6be$aea84a40$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Egor Duda" <cygwin-developers AT cygwin DOT com>
Cc: <cygwin-developers AT cygwin DOT com>
References: <011201c0b6ae$c3f7de20$0200a8c0 AT lifelesswks> <4895459403 DOT 20010327165505 AT logos-m DOT ru>
Subject: Re: whats a good magic number for fifo's?
Date: Tue, 27 Mar 2001 23:06:03 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 27 Mar 2001 13:00:52.0085 (UTC) FILETIME=[F3BF5250:01C0B6BD]

---- Original Message -----
From: "Egor Duda" <deo AT logos-m DOT ru>
To: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
Cc: <cygwin-developers AT cygwin DOT com>
Sent: Tuesday, March 27, 2001 10:55 PM
Subject: Re: whats a good magic number for fifo's?


> Hi!
>
> Tuesday, 27 March, 2001 Robert Collins robert DOT collins AT itdomain DOT com DOT au
wrote:
>
> RC> The title says it all.
>
> RC> I'm extending the magic number checks in fhandler_base... this
will have
> RC> a performance impact (the assume exe flag and/or ntsec will no
longer
> RC> shortcut the file open and read tests). I'm open to suggestions
for
> RC> marking the file as a fifo without magic numbers.
>
> how about using symlinks pointing to some special destination (for
> example to '/cygdrive/fifo')? all we need to do in this case is to
> slightly modify current symlink resolution code.
>
> Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet
2:5020/496.19
>
>
>

Hmm. Because I didn't think of that :]

Lets see if it passes the "poke holes in the idea test"

because it doesn't work with todays code (using /dev/clipboard as an
existing example):

administrator AT LIFELESSWKS /dev
$ ls

administrator AT LIFELESSWKS /dev
$ ls -s /dev/clipboard myclip
ls: myclip: No such file or directory
   0 /dev/clipboard

administrator AT LIFELESSWKS /dev
$ ls

administrator AT LIFELESSWKS /dev
$ cat /dev/clipboard
/usr/src/buildcygwin/i686-pc-cygwin/winsup/cygwin
administrator AT LIFELESSWKS /dev
$

And 1 challenge at a time is enough for me. Although it does work to
/dev/mem. Hmm. I might try and debug this one a little more.

On the other hand there are questions about users modifying the
shortcut, windows link tracking manager, and the time it takes to
resolve the shortcut (vs checking it's exactly 3 bytes long and reading
the special). note: I don't know the answers to these potential issues.

Finally, if we want to do an external interoperable (via a new .lib ?)
fifo implementation (it'd be neat to have mingw interoperate with this
fir example) then shortcuts may not be the best way. (We've got two
shortcut formats in cygwin - if a user is running the old form, then
that code has to be exported as well.)

Rob


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019