Skip to Content.
Sympa Menu

devel - [sympa-dev] close $filename ?

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Sylvain Amrani <address@concealed>
  • To: address@concealed, sympa-authors <address@concealed>
  • Subject: [sympa-dev] close $filename ?
  • Date: Thu, 14 Sep 2006 15:51:43 +0200

Hi,

Dealing with lock troubles on my sympa installation, I found such a code
in List.pm :

open FH, ">>$lock_file";
...
close $lock_file;

I think close FH would be better, isn't it ?

I attach a patch.

Regards,
Sylvain.

Index: src/List.pm
===================================================================
RCS file: /var/lib/cvs/sympa/src/List.pm,v
retrieving revision 1.664
diff -u -r1.664 List.pm
--- src/List.pm	6 Sep 2006 09:31:36 -0000	1.664
+++ src/List.pm	14 Sep 2006 13:45:37 -0000
@@ -5132,7 +5132,7 @@
 			return undef;
 		    }
 		}
-		close $lock_file;
+		close FH;
 
 		unless ($list_of_fh{$lock_file} = &tools::lock($lock_file,'read')) {
 		    return undef;
@@ -5461,7 +5461,7 @@
 	    }
 	}
 	
-	close $lock_file;
+	close FH;
 	
 	unless ($list_of_fh{$lock_file} = &tools::lock($lock_file,'read')) {
 		return undef;
@@ -5857,7 +5857,7 @@
 		    return undef;
 		}
 	    }
-	    close $lock_file;
+	    close FH;
 	    
 
 	    unless ($list_of_fh{$lock_file} = &tools::lock($lock_file,'read')) {



Archive powered by MHonArc 2.6.19+.

Top of Page