On Tue, 2008-01-22 at 04:35 +0100, Erik wrote: > Alan McKinnon skrev: > > On Sunday 20 January 2008, Philip Webb wrote: > > > >> 080119 Kevin wrote: > >> > >>> To automatically wipe /tmp upon reboot, > >>> change WIPE_TMP to "yes" in /etc/conf.d/bootmisc > >>> > >> Thanks: I will consider the implications. > >> > > There aren't any implications. By *definition*, the contents of /tmp > > should not be relied on to survive a reboot or even subsequent > > invocations of the same program. > > > What definition? What if there is a script that calls a program and > redirects the output to /tmp and then calls another program that uses > the ouput? Would that be wrong? Does the script count as a program or > each command separately? See this example: > cat $(find -name regexps) > /tmp/all_regexps > egrep -f /tmp/all_regexps some_file
FHS defines that /tmp should not be used to store anything between reboots, but that /var/tmp should be used in this case. POSIX defines that /tmp cannot be relied upon between successive instances of the same program: /tmp A directory made available for applications that need a place to create temporary files. Applications shall be allowed to create files in this directory, but shall not assume that such files are preserved between invocations of the application. There is currently a looong discussion (flame?) going on about this on gentoo-dev: http://article.gmane.org/gmane.linux.gentoo.devel/54402 which quotes the appropriate "standards". HTH, -- Iain Buchanan <iaindb at netspace dot net dot au> Emperor Palpatine: Soon the Rebellion will be crushed and young Skywalker will be one of us! -- gentoo-user@lists.gentoo.org mailing list