bin/181785: Man page for tmpfile() is inconsistent

Kevin P. Neal kpneal at pobox.com
Tue Sep 3 18:20:03 UTC 2013


>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:


More information about the freebsd-bugs mailing list