Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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