[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkstemp
From: |
Bruno Haible |
Subject: |
Re: mkstemp |
Date: |
Wed, 27 Apr 2011 04:24:30 +0200 |
User-agent: |
KMail/1.9.9 |
Reuben Thomas wrote:
> From mkstemp(3):
>
> More generally, the POSIX specification of mkstemp() does not
> say anything about file modes,
> so the application should make sure its file mode creation mask
> (see umask(2)) is set
> appropriately before calling mkstemp() (and mkostemp()).
... or the application should call chmod() after mkstemp() or mkostemp().
> Does setting a 0600 umask (as glibc does) sound like a good thing to
> add to the mkstemp-safer functions?
The application can call chmod() on its own. Why push this into mkstemp-safer?
Programmers who use mkstemp / mkstemps / etc. also need to care about
cleanup in case of Ctrl-C or SIGHUP, otherwise /tmp fills up. (Cf. module
'clean-temp'.) How do you want to deal with this extra requirement?
Bruno
--
In memoriam Heinrich Conradi <http://de.wikipedia.org/wiki/Heinrich_Conradi>
- mkstemp, Reuben Thomas, 2011/04/26
- Re: mkstemp,
Bruno Haible <=
- Re: mkstemp, Reuben Thomas, 2011/04/27
- Re: mkstemp, Eric Blake, 2011/04/27
- Re: mkstemp, Reuben Thomas, 2011/04/27
- Re: mkstemp, Eric Blake, 2011/04/27
- Re: mkstemp, Reuben Thomas, 2011/04/27
- Re: mkstemp, Bruno Haible, 2011/04/27
- Re: mkstemp, Eric Blake, 2011/04/27
- Re: mkstemp, Bruno Haible, 2011/04/27
- Re: mkstemp, Reuben Thomas, 2011/04/27
- Re: mkstemp, Eric Blake, 2011/04/27