From 173f27236bbb289557da6f173704ced70aa73564 Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 20 Jan 2002 13:41:39 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'Release103'. svn path=/tags/Release103/; revision=15390 --- tools/killev | 142 ----------------------------------------------------------- 1 file changed, 142 deletions(-) delete mode 100755 tools/killev (limited to 'tools/killev') diff --git a/tools/killev b/tools/killev deleted file mode 100755 index 14b9f501cd..0000000000 --- a/tools/killev +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/perl - -# set to 1 if you want some extra spew -$debug=0; - -# Interfaces of CORBA servers that need to die. -@idls = ("IDL:GNOME/Evolution/ShellComponent:1.0", - "IDL:GNOME/Evolution/CalFactory:1.0", - "IDL:GNOME/Evolution/BookFactory:1.0", - "IDL:GNOME/Evolution/Importer:1.0", - "IDL:GNOME/Evolution/IntelligentImporter:1.0", - "IDL:GNOME/Evolution/Shell:1.0", - "IDL:GNOME/Spell/Checker:0.1"); - - -# IIDs of specific CORBA servers that need to die that don't implement -# useful interfaces (for querying, anyway) -@iids = ("OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory", - "OAFIID:GNOME_GtkHTML_Editor_Factory", - "OAFIID:Bonobo_Moniker_xmldb_Factory"); - -## -## You shouldn't have to change anything below this point -## - -$sysname=`uname -s`; -chop $sysname; - -if ($sysname eq "SunOS") { - $killcmd="pkill"; -} -else { - $killcmd="killall"; -} - -sub kill_exe { - my ($exe_name) = @_; - my $lt_name = "lt-$exe_name"; - my $sub_exe_name = substr ($exe_name, 0, 16); - my $sub_lt_name = substr ($lt_name, 0, 16); - - printf ("killing $exe_name\n"); - - $redirect = "2> /dev/null"; - - print "$killcmd -9 $exe_name\n" if ($debug); - `$killcmd -9 $exe_name $redirect`; - - print "$killcmd -9 $lt_name\n" if ($debug); - `$killcmd -9 $lt_name $redirect`; - - print "$killcmd -9 $sub_exe_name\n" if ($debug); - `$killcmd -9 $sub_exe_name $redirect`; - - print "$killcmd -9 $sub_lt_name\n" if ($debug); - `$killcmd -9 $sub_lt_name $redirect`; -} - -sub kill_exes { - while (($key, $value) = each %things_to_kill) { - &kill_exe($key); - } -} - -sub add_exe { - my ($exe_name) = @_; - $things_to_kill{$exe_name} = $exe_name; -} - -sub add_factory { - my ($factory_iid) = @_; - - open (FACTORY_QUERY, "oaf-client -q -s \"iid == '$factory_iid'\"|"); - while () { - if (/type exe, location (.*)$/) { - &add_exe ($1); - } - } - close (FACTORY_QUERY); -} - -# we need to do separate queries for iids because cvs OAF loses when -# you do more than one 'iid ==' separated by OR's. It returns a list -# of all CORBA servers. Cool, eh? - -sub run_iid_query { - my $iid_query; - - for ($i = 0; $i < @iids; $i++) { - $iid_query = "iid == '$iids[$i]'"; - - #printf ("$iid_query\n"); - - open (QUERY, "oaf-client -q -s \"$iid_query\"|"); - while () { - if (/type exe, location (.*)$/) { - &add_exe ($1); - } - elsif (/type factory, location (.*)$/) { - &add_factory ($1); - } - } - close (QUERY); - } -} - -sub run_query { - my ($idl_query, $iid_query, $oaf_query); - - $idl_query = ""; - for ($i = 0; $i < @idls; $i++) { - $idl_query .= "repo_ids.has('$idls[$i]')"; - $idl_query .= " OR " if ($i < @idls - 1); - } - - #$iid_query = ""; - #for ($i = 0; $i < @iids; $i++) { - # $iid_query .= "iid == '$iids[$i]'"; - # $iid_query .= " OR " if ($i < @iids - 1); - #} - - $oaf_query = $idl_query; - #$oaf_query .= " OR $iid_query" if (@iids > 0); - - #printf ("$oaf_query\n"); - - open (QUERY, "oaf-client -q -s \"$oaf_query\"|"); - - while () { - if (/type exe, location (.*)$/) { - &add_exe ($1); - } - elsif (/type factory, location (.*)$/) { - &add_factory ($1); - } - } - close (QUERY); -} - -&run_query (); -&run_iid_query (); -&kill_exes(); -- cgit v1.2.3