bugRot[t]log - Bugs: bug #17846, Temporary directories not removed

 
 

bug #17846: Temporary directories not removed

Submitted by:  None
Submitted on:  Mon 25 Sep 2006 05:20:47 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: David Egan Evans <sinuhe>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 02 Jul 2008 06:14:23 PM UTC, comment #5:

meta_tmp_dir statement added. Not sure what you mean about mail_to_admin.

David Egan Evans <sinuhe>In charge of this item.
Mon 16 Oct 2006 10:27:31 PM UTC, comment #4:

My suspicion about the trap in mail_to_admin appears to be correct. If mail_to_admin is run, the new trap would replace the old one and neither the temporary directory nor the lock file would get removed.

Suggested fixes:
1) Call mail_to_admin in a subshell.
or
2) Include $TEMPDIR and $LOCK in the second trap statement.

Matthew Musgrove <mrmuskrat>
Mon 16 Oct 2006 10:21:24 PM UTC, comment #3:

Suggested fix to the meta_tmp_dir line:

if [ $meta_tmp_dir != "" ] # or if [ -d $meta_tmp_dir ]
then
rm -Rf $meta_tmp_dir
fi

Matthew Musgrove <mrmuskrat>
Mon 16 Oct 2006 08:13:50 PM UTC, comment #2:

Okay, I was wrong. This is fine:
rm -Rf $meta_tmp_dir
but it really should be wrapped in a conditional.

The real problem is that the exit trap doesn't always happen:
trap 'rm -rf $TEMPDIR $LOCK; exit $USCITA' 0

I don't yet understand why it wouldn't. Perhaps if it exits during mail_to_admin since it also has an exit trap?

Matthew Musgrove <mrmuskrat>
Wed 27 Sep 2006 06:23:42 PM UTC, comment #1:

+ rm -f /tmp/LfddYMLTKlgOrAiIUmMX/meta-prerotate.22436
+ rm -f /tmp/LfddYMLTKlgOrAiIUmMX/prerotate.22436
+ rm -f /tmp/LfddYMLTKlgOrAiIUmMX/meta-postrotate.22436
+ rm -f /tmp/LfddYMLTKlgOrAiIUmMX/postrotate.22436
+ rm -Rf
+ EXIT_CODE=0

Note the last rm doesn't have a file or directory to remove.

The code for that line is this:
rm -Rf $meta_tmp_dir

And $meta_tmp_dir is not set yet. I think the line should be:
rm -Rf $TEMPDIR

Matthew Musgrove <mrmuskrat>
Mon 25 Sep 2006 05:20:47 PM UTC, original submission:

The temporary directories that are created do not get removed (only their contents). This results in hundreds of empty directories cluttering the temp directory.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sinuhe (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Jul 2008 06:14:23 PM UTCsinuheStatusNone=>Fixed
      Assigned toNone=>sinuhe
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1