Subject: lib/23158: mkstemp manpage suggests non-portable usage
To: None <gnats-bugs@gnats.netbsd.org>
From: Johan Danielsson <joda@pdc.kth.se>
List: netbsd-bugs
Date: 10/14/2003 14:52:23
>Number:         23158
>Category:       lib
>Synopsis:       mkstemp manpage suggests non-portable usage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 14 12:53:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Johan Danielsson
>Release:        NetBSD 1.6T
>Organization:
>Environment:
System: NetBSD blubb.pdc.kth.se 1.6T NetBSD 1.6T (BLUBB) #531: Thu May 29 13:09:25 CEST 2003 joda@blubb.pdc.kth.se:/usr/misc/src/netbsd/netbsd-cvs/src/sys/arch/i386/compile/BLUBB i386
Architecture: i386
Machine: i386
>Description:

     The template may be any file name with some number of `Xs'
     appended to it, for example /tmp/temp.XXXX.  The trailing `Xs'
     are replaced with the current process number and/or a unique
     letter combination.  The number of unique file names mktemp() can
     return depends on the number of `Xs' provided; six `Xs' will
     result in mktemp() testing roughly 26 ** 6 combinations.  At
     least 6 `X's should be used, though 10 is much better.

This is true for our (and many other) implementation, but SUSv2
mandates that there be exactly 6 trailing X, and I've certainly seen
implementations that did not work properly with less that 6 X.

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: