1 |
On Tue, 2008-01-22 at 04:35 +0100, Erik wrote: |
2 |
> Alan McKinnon skrev: |
3 |
> > On Sunday 20 January 2008, Philip Webb wrote: |
4 |
> > |
5 |
> >> 080119 Kevin wrote: |
6 |
> >> |
7 |
> >>> To automatically wipe /tmp upon reboot, |
8 |
> >>> change WIPE_TMP to "yes" in /etc/conf.d/bootmisc |
9 |
> >>> |
10 |
> >> Thanks: I will consider the implications. |
11 |
> >> |
12 |
> > There aren't any implications. By *definition*, the contents of /tmp |
13 |
> > should not be relied on to survive a reboot or even subsequent |
14 |
> > invocations of the same program. |
15 |
> > |
16 |
> What definition? What if there is a script that calls a program and |
17 |
> redirects the output to /tmp and then calls another program that uses |
18 |
> the ouput? Would that be wrong? Does the script count as a program or |
19 |
> each command separately? See this example: |
20 |
> cat $(find -name regexps) > /tmp/all_regexps |
21 |
> egrep -f /tmp/all_regexps some_file |
22 |
|
23 |
FHS defines that /tmp should not be used to store anything between |
24 |
reboots, but that /var/tmp should be used in this case. |
25 |
|
26 |
POSIX defines that /tmp cannot be relied upon between successive |
27 |
instances of the same program: |
28 |
|
29 |
/tmp |
30 |
A directory made available for applications that need a place to create |
31 |
temporary files. Applications shall be allowed to create files in this |
32 |
directory, but shall not assume that such files are preserved between |
33 |
invocations of the application. |
34 |
|
35 |
There is currently a looong discussion (flame?) going on about this on |
36 |
gentoo-dev: |
37 |
|
38 |
http://article.gmane.org/gmane.linux.gentoo.devel/54402 |
39 |
|
40 |
which quotes the appropriate "standards". |
41 |
|
42 |
HTH, |
43 |
-- |
44 |
Iain Buchanan <iaindb at netspace dot net dot au> |
45 |
|
46 |
Emperor Palpatine: |
47 |
Soon the Rebellion will be crushed and young Skywalker |
48 |
will be one of us! |
49 |
|
50 |
-- |
51 |
gentoo-user@l.g.o mailing list |