This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/14327] pthread uses mktemp(), causing link-time warning


http://sourceware.org/bugzilla/show_bug.cgi?id=14327

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aj at suse dot de

--- Comment #2 from Andreas Jaeger <aj at suse dot de> 2012-07-03 14:02:29 UTC ---
Initial analysis:
nptl/sem_open.c contains:

       {
          /* Add the suffix for mktemp.  */
          strcpy (xxxxxx, "XXXXXX");

          /* We really want to use mktemp here.  We cannot use mkstemp
             since the file must be opened with a specific mode.  The
             mode cannot later be set since then we cannot apply the
             file create mask.  */
          if (mktemp (tmpfname) == NULL)
            return SEM_FAILED;

          /* Open the file.  Make sure we do not overwrite anything.  */
          fd = __libc_open (tmpfname, O_RDWR | O_CREAT | O_EXCL, mode);


There's no function that does this directly. mktemp is short, we could use the
implementation directly in sem_open just avoiding the warning, I just don't
like duplication of code.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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