Re: [gentoo-user] stuff accumulating in /tmp

2008-01-21 Thread Erik
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
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-21 Thread Iain Buchanan

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



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-20 Thread Alan McKinnon
On Sunday 20 January 2008, Dale wrote:
 Philip Webb wrote:
  A problem I have is that Firefox is not deleting  .pdf  files from 
  /tmp after I have viewed  saved them elsewhere (using Kpdf).
  There seems to be no place in Firefox or Kpdf settings to change
  this. Does anyone have a useful suggestion for automatically
  deleting them ?

 Since /tmp has been talked about on -dev, reboot will do it.

Only if /tmp is a tmpfs.

On a machine used as a desktop, this is a good idea as they are rebooted 
often and the FHS states that the contents of /tmp should not be relied 
on to survive a reboot.

On a server style machine that is not rebooted often, tmpwatch running 
in a cron does a good job of this.

alan


-- 
Alan McKinnon
alan dot mckinnon at gmail dot com
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-20 Thread Alan McKinnon
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.

Any app that does rely on the contents of /tmp still being there is thus 
fundamentally broken in it's behaviour and should be avoided or fixed.


-- 
Alan McKinnon
alan dot mckinnon at gmail dot com
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-20 Thread Philip Webb
080120 Alan McKinnon wrote:
 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.
 Any app that does rely on the contents of /tmp still being there is thus 
 fundamentally broken in it's behaviour and should be avoided or fixed.

Strictly, you are correct -- that's the POSIX rule, which I know about -- ,
but there is a problem when using Mutt (another user mentioned this).
By default, Mutt creates its temporary files in  /tmp ,
which applies to the working file for new msgs even when editing with Vim
(which defaults to keeping its  .swp  running-back-up files in '.').
Leaving the defaults in place, if power fails while composing a msg,
the surviving  .swp  files wb preserved in  /tmp ,
but only if you don't set  WIPE_TMP=yes .  If you set that to yes,
when you reboot after the power failure, the  .swp  back-up wb lost.
You need to change  .muttrc  to include 'set tmpdir=/var/tmp',
which should always survive a reboot (acc to POSIX).

-- 
,,
SUPPORT ___//___,  Philip Webb : [EMAIL PROTECTED]
ELECTRIC   /] [] [] [] [] []|  Centre for Urban  Community Studies
TRANSIT`-O--O---'  University of Toronto
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-19 Thread Dale
Philip Webb wrote:
 A problem I have is that Firefox is not deleting  .pdf  files from  /tmp
 after I have viewed  saved them elsewhere (using Kpdf).
 There seems to be no place in Firefox or Kpdf settings to change this.
 Does anyone have a useful suggestion for automatically deleting them ?

   

Since /tmp has been talked about on -dev, reboot will do it. 

Dale

:-)  :-)
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-19 Thread Philip Webb
080119 Dale wrote:
 Philip Webb wrote:
 A problem I have is that Firefox is not deleting  .pdf  files from  /tmp
 after I have viewed  saved them elsewhere (using Kpdf).
 There seems to be no place in Firefox or Kpdf settings to change this.
 Does anyone have a useful suggestion for automatically deleting them ?
 Since /tmp has been talked about on -dev, reboot will do it. 

No, it doesn't: some system setting I'm missing ?

-- 
,,
SUPPORT ___//___,  Philip Webb : [EMAIL PROTECTED]
ELECTRIC   /] [] [] [] [] []|  Centre for Urban  Community Studies
TRANSIT`-O--O---'  University of Toronto
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-19 Thread Kevin
Philip Webb wrote:
 080119 Dale wrote:
 Philip Webb wrote:
 A problem I have is that Firefox is not deleting  .pdf  files from  /tmp
 after I have viewed  saved them elsewhere (using Kpdf).
 There seems to be no place in Firefox or Kpdf settings to change this.
 Does anyone have a useful suggestion for automatically deleting them ?
 Since /tmp has been talked about on -dev, reboot will do it. 
 
 No, it doesn't: some system setting I'm missing ?
 

To automatically wipe /tmp upon reboot. Change WIPE_TMP to yes in
/etc/conf.d/bootmisc
-- 
gentoo-user@lists.gentoo.org mailing list



Re: [gentoo-user] stuff accumulating in /tmp

2008-01-19 Thread Philip Webb
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.

-- 
,,
SUPPORT ___//___,  Philip Webb : [EMAIL PROTECTED]
ELECTRIC   /] [] [] [] [] []|  Centre for Urban  Community Studies
TRANSIT`-O--O---'  University of Toronto
-- 
gentoo-user@lists.gentoo.org mailing list