Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 41443
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.092
  • 1.093_02
Fixed in: (no value)



Subject: Cleaning up temporary directory
While cleaning up my /tmp directory I found a couple of files fedt over from Perl-Critic 1.093_02 and 1.092 (I haven't checked other versions): -rw------- 1 sand sand 16 2008-12-05 06:25:16 9nG3DIi01M -rw------- 1 sand sand 26 2008-12-05 06:25:16 AkRdWl1uyS -rw------- 1 sand sand 22 2008-12-05 06:25:16 CTezwmWzyS -rw------- 1 sand sand 26 2008-12-05 06:25:16 EOJ8aptG5m -rw------- 1 sand sand 7 2008-12-05 06:25:16 ILusaaY8oI -rw------- 1 sand sand 8 2008-12-05 06:25:16 qFuF_lpc_X -rw------- 1 sand sand 16 2008-12-05 06:25:16 qpZpoDmqpx -rw------- 1 sand sand 18 2008-12-05 06:25:16 qrAwwsniYk -rw------- 1 sand sand 20 2008-12-05 06:25:16 SssTStcDEa I'm sure you want to know about this, Regards && Thanks!
On Fri Dec 05 00:29:12 2008, ANDK wrote: Show quoted text
> While cleaning up my /tmp directory I found a couple of files fedt over > from Perl-Critic 1.093_02 and 1.092
Thanks! Perl-Critic does create a few temp files & directories during testing. But we always use File::Temp or File::Spec to create these files, so they *should* get cleaned up automatically. A `kill -9` or some other abnormal termination could prevent the cleanup, but I don't know how to get around that. Can you suggest a way to ensure that we never leave any litter behind?
The usage of the various File::Temp methods and functions is not very intuitive, it may help to unify the way it is used so you really know what you are doing. Maybe this already catches bugs. Another useful step were to give all the temporary files an identifier. What File::Temp calls TEMPLATE could be something like "Perl-Critic-file-foo-XXXX". Then you can wait for the next bugreport which will not list 9 anonymous files but each filename will give a clue as to where we have to look next. You're not responsible for kill -9 sent by others. But if the testsuite sends kill -9 itself, it should send a kill INT or some appropriate catchable signal first and give the other processes a chance to clean up.
I've fixed this in my branch, rt41443.
I've fixed this in my branch, rt41443.
Subject: Re: [rt.cpan.org #41443] Cleaning up temporary directory
Date: Sat, 17 Jan 2009 14:21:39 -0600
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Kyle Hasselbacher via RT wrote: Show quoted text
> I've fixed this in my branch, rt41443.
Merged to trunk.
This has been fixed and released as Perl-Critic-1.095_001 to a CPAN near you. Thanks for reporting this bug. -Jeff