Re: Cryptic error message from collect2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonas Karlsson wrote:

> open("/tmp/ccc72aCK.ld", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EEXIST (File exists)

I don't know why your filesystem returns an error for this syscall, but
with a normal filesystem driver the exact same sequence occurs and
succeeds:

open("/tmp/ccPxl0Fa.ld", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
gettimeofday({1218326107, 17028}, NULL) = 0
getpid()                                = 16870
open("/tmp/ccCsztRa.le", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
open("/tmp/ccPxl0Fa.ld", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3

open() should fail with an existing file with O_CREAT|O_EXCL, but with
O_CREAT|O_TRUNC it should succeed and truncate the file.

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux