delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <396D3E12.FB3AFA79@murdoch.edu.au> |
Date: | Thu, 13 Jul 2000 11:57:06 +0800 |
From: | Stewart Greenhill <greenhil AT murdoch DOT edu DOT au> |
X-Mailer: | Mozilla 4.72 [en] (WinNT; I) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | cygwin AT sourceware DOT cygnus DOT com |
Subject: | Have rename() semantics changed? |
Hi, The latest cygwin seems not to allow open files to be renamed. This works under Unix. It is not normally allowed under Windows, but worked in previous versions of the cygwin environment. Is this an official change, or could it be a bug? I noticed this because it broke the OOC Oberon-2 compiler (ooc.sourgeforge.net) under cygwin. The following code snippet demonstrates the problem. #include <stdio.h> char * oldName = "test.file^"; char * newName = "test.file"; int main(int argc, char ** argv) { int result; FILE * f = fopen(oldName, "w"); result = rename(oldName, newName); if (result != 0) { perror("Rename"); } else { printf("OK!"); } fclose(f); } The latest cygwin (1.1.2) now returns an error 13 (permission denied). Cheers, - Stewart -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |