delorie.com/archives/browse.cgi | search |
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 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: mkstemp bug |
Mail-Copies-To: | never |
Reply-To: | sds AT gnu DOT org |
X-Attribution: | Sam |
X-Disclaimer: | You should not expect anyone to agree with me. |
From: | Sam Steingold <sds AT gnu DOT org> |
In-Reply-To: | <usm1cb0aa.fsf@gnu.org> (Sam Steingold's message of "Wed, 27 Apr 2005 13:24:29 -0400") |
References: | <usm1cb0aa DOT fsf AT gnu DOT org> |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Date: | Wed, 27 Apr 2005 18:06:09 -0400 |
Message-ID: | <u8y33c1ta.fsf@gnu.org> |
User-Agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
MIME-Version: | 1.0 |
> * 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 -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.openvotingconsortium.org/> <http://www.camera.org> <http://www.jihadwatch.org/> <http://www.memri.org/> <http://pmw.org.il/> Do not worry about which side your bread is buttered on: you eat BOTH sides. -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |