[interchange-cvs] interchange - heins modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Thu Aug 9 09:20:02 EDT 2007
User: heins
Date: 2007-08-09 13:20:02 GMT
Modified: lib/Vend Control.pm Server.pm
Log:
* Remove catalog status files when removing catalog. Also call remove_catalog at
server stop -- would be nice for cleanup anyway.
Revision Changes Path
2.14 +15 -4 interchange/lib/Vend/Control.pm
rev 2.14, prev_rev 2.13
Index: Control.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Control.pm,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -r2.13 -r2.14
--- Control.pm 30 Mar 2007 11:39:44 -0000 2.13
+++ Control.pm 9 Aug 2007 13:20:01 -0000 2.14
@@ -1,6 +1,6 @@
# Vend::Control - Routines that alter the running Interchange daemon
#
-# $Id: Control.pm,v 2.13 2007/03/30 11:39:44 pajamian Exp $
+# $Id: Control.pm,v 2.14 2007/08/09 13:20:01 mheins Exp $
#
# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -156,16 +156,27 @@
@aliases = @{$g->{alias}};
}
+ my $c = delete $Global::Selector{$g->{script}};
+ delete $Global::Catalog{$name};
+
for(@aliases) {
delete $Global::Selector{$_};
delete $Global::SelectorAlias{$_};
}
+
+ if($c) {
+ my $sfile = "status.$name";
+ my $status_dir = -f "$c->{RunDir}/$sfile"
+ ? $c->{RunDir}
+ : $c->{ConfDir};
+ for( "$Global::RunDir/$sfile", "$status_dir/$sfile") {
+ unlink $_
+ or ::logGlobal("Error removing status file %s: %s", $_, $!);
+ }
+ }
- delete $Global::Selector{$g->{script}};
- delete $Global::Catalog{$name};
logGlobal("Removed catalog %s (%s)", $name, $g->{script});
}
-
sub add_catalog {
my($line) = @_;
2.76 +5 -2 interchange/lib/Vend/Server.pm
rev 2.76, prev_rev 2.75
Index: Server.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Server.pm,v
retrieving revision 2.75
retrieving revision 2.76
diff -u -r2.75 -r2.76
--- Server.pm 9 Aug 2007 11:08:36 -0000 2.75
+++ Server.pm 9 Aug 2007 13:20:01 -0000 2.76
@@ -1,6 +1,6 @@
# Vend::Server - Listen for Interchange CGI requests as a background server
#
-# $Id: Server.pm,v 2.75 2007/08/09 11:08:36 racke Exp $
+# $Id: Server.pm,v 2.76 2007/08/09 13:20:01 mheins Exp $
#
# Copyright (C) 2002-2007 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -26,7 +26,7 @@
package Vend::Server;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.75 $, 10);
+$VERSION = substr(q$Revision: 2.76 $, 10);
use Cwd;
use POSIX qw(setsid strftime);
@@ -2487,6 +2487,9 @@
join ",", keys %Page_pids,
);
kill 'TERM', @pids;
+ }
+ for(keys %Global::Catalog) {
+ ::remove_catalog($_);
}
}
More information about the interchange-cvs
mailing list