delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/27/22:32:14

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 27 Apr 2005 22:29:34 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: mkstemp bug
Message-ID: <20050428022934.GC31448@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <usm1cb0aa DOT fsf AT gnu DOT org> <u8y33c1ta DOT fsf AT gnu DOT org> <20050427222031 DOT GB24021 AT trixie DOT casa DOT cgf DOT cx> <u4qdrbxhi DOT fsf AT gnu DOT org>
Mime-Version: 1.0
In-Reply-To: <u4qdrbxhi.fsf@gnu.org>
User-Agent: Mutt/1.5.8i

On Wed, Apr 27, 2005 at 07:39:37PM -0400, Sam Steingold wrote:
>> * Christopher Faylor <pts-ab-crefbany-ercyl-cyrnfr AT pltjva DOT pbz> [2005-04-27 18:20:31 -0400]:
>>
>> On Wed, Apr 27, 2005 at 06:06:09PM -0400, Sam Steingold wrote:
>>>> * Sam Steingold <fqf AT tah DOT bet> [2005-04-27 13:24:29 -0400]:
>>>>
>>>> it appears that mkstemp() returns a temp FD pointing to the same file:
>>>> mkstemp ("/tmp/clisp-x-io-XXXXXX");
>>>> ==> "/tmp/clisp-x-io-000592"
>>>> mkstemp ("/tmp/clisp-x-io-XXXXXX");
>>>> ==> "/tmp/clisp-x-io-000592"
>>>> mkstemp ("/tmp/clisp-x-io-XXXXXX");
>>>> ==> "/tmp/clisp-x-io-000592"
>>>
>>>this is note quite as easy to reproduce.  sorry.
>>>
>>>the problem is that mkstemp() does not regard FIFOs (as created by
>>>mkfifo() or mknod()) as existing files.
>>>
>>>e.g.
>>>
>>>  char s1[] = "/tmp/foo-XXXXXX";
>>>  char s2[] = "/tmp/foo-XXXXXX";
>>>  int fd = mkstemp(s1);
>>>  close(fd); remove(s1);
>>>  mkfifo(s1,0644);
>>>  mkstemp(s2);
>>>  strcmp(s1,s2) ===> 0
>>
>> fifos just barely work under cygwin.  I wouldn't recommend using them.
>
>Yes, it appears that they are heavily broken.

So when I say "fifos just barely work" you felt the need to inform me that
they don't work?  And that advances the discussion how, exactly?

cgf

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

- Raw text -


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