This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14327] pthread uses mktemp(), causing link-time warning
- From: "aj at suse dot de" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 03 Jul 2012 14:02:29 +0000
- Subject: [Bug libc/14327] pthread uses mktemp(), causing link-time warning
- Auto-submitted: auto-generated
- References: <bug-14327-131@http.sourceware.org/bugzilla/>
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.