< prev index next >

src/os/bsd/vm/os_bsd.cpp

Print this page

        

*** 3843,3868 **** } // This code originates from JDK's sysOpen and open64_w // from src/solaris/hpi/src/system_md.c - #ifndef O_DELETE - #define O_DELETE 0x10000 - #endif - - // Open a file. Unlink the file immediately after open returns - // if the specified oflag has the O_DELETE flag set. - // O_DELETE is used only in j2se/src/share/native/java/util/zip/ZipFile.c - int os::open(const char *path, int oflag, int mode) { if (strlen(path) > MAX_PATH - 1) { errno = ENAMETOOLONG; return -1; } int fd; - int o_delete = (oflag & O_DELETE); - oflag = oflag & ~O_DELETE; fd = ::open(path, oflag, mode); if (fd == -1) return -1; // If the open succeeded, the file might still be a directory --- 3843,3858 ----
*** 3911,3923 **** ::fcntl(fd, F_SETFD, flags | FD_CLOEXEC); } } #endif - if (o_delete != 0) { - ::unlink(path); - } return fd; } // create binary file, rewriting existing file if required --- 3901,3910 ----
< prev index next >