From: Keetnet AT wilmington DOT net (Keet) Subject: rename() broken?? 29 May 1997 00:24:02 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <2.2.32.19970529014620.006afc98.cygnus.gnu-win32@wilmington.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Sender: keetnet AT wilmington DOT net X-Mailer: Windows Eudora Pro Version 2.2 (32) X-Priority: 1 (Highest) Original-To: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com This is a restatement of what you might have read earlier, except more facts have been gathered in relation to the problem. The problem is rename() in B18 produces a 'Access Denied' message, where as in LINUX and B17.1, this problem never occured. The following segment of code is the original source, that is causing the problem: if (rename(tmpfile, dumpfile) < 0) perror(tmpfile); the file called 'tmpfile' is named './data/minimal.new.#2#' and 'dumpfile' is named './data/minimal.new' when trying to rename tmpfile to dumpfile, it produces: './data/minimal.new.#2#: Access Denied'. 'dumpfile' already exists from a previous dump, and is never removed or modified. (hence the timestamp not changing) the following section is what the code was changed to in an attempt to fix the problem, by removing 'dumpfile' first and then renaming 'tmpfile' to 'dumpfile', hopefully eliminating the problem. if ((temp = fopen(dumpfile, "r")) != NULL) { fclose(temp); (void) unlink(dumpfile); if (rename(tmpfile, dumpfile) < 0) perror(tmpfile); } else { rename(tmpfile, dumpfile); } this section of code returned the following errors: './data/minimal.new.#2#: Permission Denied' './data/minimal.new: No such file or directory' ... i'm not sure why the Permission denied comes before the access denied message.. but it does.. appearently, something isn't right here. but when it hits this loop a second time.. it freezes with a CYGWIN_EXCEPT_HANDLER error, and that's all she wrote.. consider the following, before telling me to check my sources and mounts: 1. It works fine as the oringal source under LINUX 2. It worked fine as the original source under B17.1 3. The mounts are all set the same, and are original as set by the installation 4. a /tmp dir is on each drive of my system and is mounted 5. the GCC_EXEC_PREFIX is set correctly 6. the two paths into the GnuWin32 binaries are set in my path if you can offer any help at all.. please let me know asap... thanks in advance.. - Greg Neujahr Foxbird - Keet keetnet AT wilmington DOT net - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".