Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2013 14:04:28 -0400 (EDT)
From:      "Kevin P. Neal" <kpneal@pobox.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/181785: Man page for tmpfile() is inconsistent
Message-ID:  <201309031804.r83I4Sed071275@gunsight1.neutralgood.org>
Resent-Message-ID: <201309031820.r83IK2jF020737@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181785
>Category:       bin
>Synopsis:       Man page for tmpfile() is inconsistent
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 03 18:20:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Kevin P. Neal
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD gunsight1.neutralgood.org 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Thu Dec 8 21:58:59 UTC 2011 root@:/usr/obj/usr/src/sys/GENERIC amd64


>Description:

The manual page for tmpfile(), which is shared with tmpnam() and tempnam(),
describes how tmpfile() respects the TMPDIR environment variable. It then
later on says:

     TMPDIR  [tempnam() only] If set, the directory in which the temporary
             file is stored.  TMPDIR is ignored for processes for which
             issetugid(2) is true.

Well, if tmpfile() respects TMPDIR then why does it say it doesn't?
Especially since it already went to the trouble of saying it did.

>How-To-Repeat:

man tmpfile

Scratch head and then check source.

While I'm on the subject, it may be a good idea to change the description
to state that at least some of these functions are part of POSIX. Or,
perhaps just remove the line that states:

     These interfaces are provided from System V and ANSI compatibility only.

>Fix:

*** /usr/src/lib/libc/stdio/tmpnam.3.orig	2013-09-03 13:51:31.000000000 -0400
--- /usr/src/lib/libc/stdio/tmpnam.3	2013-09-03 13:52:48.000000000 -0400
***************
*** 156,161 ****
--- 156,163 ----
  .Bl -tag -width Ds
  .It Ev TMPDIR
  .Pf [ Fn tempnam
+ and
+ .Fn tmpfile
  only]
  If set,
  the directory in which the temporary file is stored.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309031804.r83I4Sed071275>