On Tue, Jun 17, 2008 at 1:26 PM, Nico Golde <[EMAIL PROTECTED]> wrote:
> * Denver Gingerich <[EMAIL PROTECTED]> [2008-06-17 19:20]:
>> On Tue, Jun 17, 2008 at 12:17 PM, Nico Golde <[EMAIL PROTECTED]> wrote:
>> > [...]
>> >> Secondly, the manpage for mkstemp has the following note: "Don't use
>> >> this function, use tmpfile(3) instead.".
>> >
>> > What manpage do you have there? At least this is not the
>> > case in the posix manuals I have.
>>
>> This line can be found in the NOTES section of the mkstemp(3) manpage
>> on Debian 4.0 or Ubuntu 7.10.
>
> Ah I see, this is not mentioned in the posix (3p) however.
> Anyway both functions should be fine at least for the use in
> Debian.

As long as /tmp is generally writable by any user on a Debian system,
mkstemp should be fine.  I suspect the portability concerns expressed
by the mkstemp manpage author are referring primarily to the need to
explicitly specify a path for mkstemp, which tmpfile does not require.

I will have to do some further work on portability when I implement
mkstemp in 0.6.  I'll probably follow the model used by glibc
expressed in the tmpfile manpage: "Glibc will try the path prefix
P_tmpdir defined in <stdio.h>, and if that fails the directory /tmp".

Denver



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to