This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

rename() broken??


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@wilmington.net

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]