diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-12-11 12:18:55 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-12-11 12:18:55 +0100 |
commit | cce2446f02f2e85d78067ff696b5d2c212de3ad4 (patch) | |
tree | 1a533fd6077f36d90a5b01117ba9c23afc79f0c2 /TAO | |
parent | 132154fa12b98a56009b813262733a7f92e3a4d9 (diff) | |
parent | 8afe9a40cd22ddd77caded3c37764db3e5efbf0f (diff) | |
download | ATCD-cce2446f02f2e85d78067ff696b5d2c212de3ad4.tar.gz |
Merge branch 'rite-jwi-bugzilla-4192'
Fixed bugzilla 4192, incorrect status reported by tao_imr
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp | 12 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp | 81 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h | 10 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp | 10 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl | 52 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/manual_start/client.cpp | 12 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/ImplRepo/manual_start/run_test.pl | 36 |
12 files changed, 153 insertions, 70 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp b/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp index 605bfb6a268..960ec06398e 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Adapter_Activator.cpp @@ -76,7 +76,7 @@ ImR_Adapter::unknown_adapter (PortableServer::POA_ptr parent, catch (const CORBA::Exception& ex) { ORBSVCS_ERROR ((LM_ERROR, - "IMR_Adapter_Activator::unknown_adapter - %s\n", + "IMR_Adapter_Activator::unknown_adapter - %C\n", exception_message)); ex._tao_print_exception ("System Exception"); return 0; diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp index 1ea499b43c2..f0b42a0cf9f 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp @@ -205,7 +205,7 @@ AsyncAccessManager::notify_waiters (void) ("Unknown Failure"); } } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { rh->send_exception (ex._tao_duplicate()); } diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp index df811723224..36ed0e3ba1a 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp @@ -119,7 +119,7 @@ AsyncListManager::make_iterator (ImplementationRepository::ServerInformationIter ServerInformationIterator::_unchecked_narrow (obj.in ()); return true; } - catch (CORBA::SystemException& ex) + catch (const CORBA::SystemException& ex) { ex._tao_print_exception ("AsyncListManager:final state constructing iterator\n"); ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); @@ -127,12 +127,12 @@ AsyncListManager::make_iterator (ImplementationRepository::ServerInformationIter { this->primary_->list_excep (&h); } - catch (CORBA::Exception& ex2) + catch (const CORBA::Exception& ex2) { ex2._tao_print_exception ("AsyncListManager:final calling list_excep\n"); } } - catch (CORBA::UserException& ex) + catch (const CORBA::UserException& ex) { ex._tao_print_exception ("AsyncListManager:final state constructing iterator\n"); ImplementationRepository::AMH_AdministrationExceptionHolder h (new CORBA::INTERNAL); @@ -140,7 +140,7 @@ AsyncListManager::make_iterator (ImplementationRepository::ServerInformationIter { this->primary_->list_excep (&h); } - catch (CORBA::Exception& ex2) + catch (const CORBA::Exception& ex2) { ex2._tao_print_exception ("AsyncListManager:final calling list_excep\n"); } @@ -197,7 +197,7 @@ AsyncListManager::final_state (void) { this->primary_->list (*sil, server_iterator.in ()); } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { ex._tao_print_exception ("AsyncListManager:final state sending list\n"); ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); @@ -214,7 +214,7 @@ AsyncListManager::final_state (void) { this->secondary_->next_n (done, *sil); } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { ex._tao_print_exception ("AsyncListManager:final state sending secondary list\n"); ImplementationRepository::AMH_ServerInformationIteratorExceptionHolder h (ex._tao_duplicate()); diff --git a/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp b/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp index 7a5466bdf5b..b936a7d21de 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp @@ -88,7 +88,7 @@ ImR_DSI_Forwarder::_dispatch (TAO_ServerRequest &request, // Delegate to user. this->invoke (dsi_request, rh.in()); } - catch (CORBA::Exception& ex) + catch (const CORBA::Exception& ex) { // Only if the client is waiting. if (request.response_expected () && !request.sync_with_server ()) diff --git a/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp b/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp index 3528ad269a2..0cb69b4483f 100644 --- a/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp @@ -30,7 +30,7 @@ INS_Locator::locate (const char* object_key) this->imr_locator_.activate_server_by_object (object_key); return located._retn(); } - catch (CORBA::Exception &) + catch (const CORBA::Exception &) { throw CORBA::TRANSIENT (CORBA::SystemException::_tao_minor_code (TAO_IMPLREPO_MINOR_CODE, 0), diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp index b745aaa67a7..10f043d5dd5 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp @@ -531,7 +531,7 @@ ImR_Activator_i::handle_exit_i (pid_t pid) { this->locator_->child_death_pid (name.c_str(), pid); } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { if (debug_ > 1) { diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp index 6254e6c583c..a3cb9866759 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp @@ -203,7 +203,7 @@ ImR_Locator_i::init_with_orb (CORBA::ORB_ptr orb) active->death_notify = !CORBA::is_nil (actx.in ()) && actx->still_alive (active->pid); } - catch (CORBA::Exception &) + catch (const CORBA::Exception &) { } if (this->debug_ > 0) @@ -305,7 +305,7 @@ ImR_Locator_i::shutdown acts[i]->shutdown (); acts[i] = ImplementationRepository::Activator::_nil (); } - catch (CORBA::Exception& ex) + catch (const CORBA::Exception& ex) { ++shutdown_errs; if (debug_ > 1) @@ -355,7 +355,7 @@ ImR_Locator_i::fini (void) if (debug_ > 0) ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("ImR: Shut down successfully.\n"))); } - catch (CORBA::Exception& ex) + catch (const CORBA::Exception& ex) { ex._tao_print_exception (ACE_TEXT ("ImR_Locator_i::fini")); throw; @@ -629,10 +629,11 @@ ImR_Locator_i::activate_server_by_name (const char* name, bool manual_start, if (info.null ()) { rh->send_exception ( new ImplementationRepository::NotFound ); - return; } - - this->activate_server_i (info, manual_start, rh); + else + { + this->activate_server_i (info, manual_start, rh); + } } void @@ -701,7 +702,7 @@ ImR_Locator_i::set_timeout_policy (CORBA::Object_ptr obj, const ACE_Time_Value& ret = CORBA::Object::_duplicate (obj); } } - catch (CORBA::Exception& ex) + catch (const CORBA::Exception& ex) { ex._tao_print_exception ( ACE_TEXT ("ImR_Locator_i::set_timeout_policy ()")); @@ -951,7 +952,7 @@ ImR_Locator_i::findPOA (const char* name) bool activate_it = false; return root_poa_->find_POA (name, activate_it); } - catch (CORBA::Exception&) + catch (const CORBA::Exception&) {// Ignore } return PortableServer::POA::_nil (); @@ -962,6 +963,7 @@ ImR_Locator_i::shutdown_server (ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, const char* id) { + const CORBA::ULong TAO_MINOR_MASK = 0x00000f80; if (debug_ > 0) ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("ImR: Shutting down server <%C>.\n"), @@ -992,7 +994,7 @@ ImR_Locator_i::shutdown_server { _tao_rh->shutdown_server_excep (&h); } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { ex._tao_print_exception (ACE_TEXT ("reporting connect error\n")); } @@ -1011,7 +1013,7 @@ ImR_Locator_i::shutdown_server // in which case the shutdown will need to be reissued. info.edit ()->reset_runtime (); } - catch (CORBA::TIMEOUT &to_ex) + catch (const CORBA::TIMEOUT &ex) { info.edit ()->reset_runtime (); // Note : This is a good thing. It means we didn't waste our time waiting for @@ -1022,11 +1024,47 @@ ImR_Locator_i::shutdown_server ACE_TEXT ("ImR: Timeout while waiting for <%C> shutdown.\n"), id)); } - ImplementationRepository::AMH_AdministrationExceptionHolder h (to_ex._tao_duplicate()); + ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); _tao_rh->shutdown_server_excep (&h); return; } - catch (CORBA::Exception &ex) + catch (const CORBA::COMM_FAILURE& ex) + { + info.edit ()->reset_runtime (); + if (debug_ > 1) + { + ORBSVCS_DEBUG ((LM_DEBUG, + ACE_TEXT ("ImR: COMM_FAILURE while waiting for <%C> shutdown.\n"), + id)); + } + if (this->opts_->throw_shutdown_exceptions ()) + { + ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); + _tao_rh->shutdown_server_excep (&h); + return; + } + } + catch (const CORBA::TRANSIENT& ex) + { + CORBA::ULong minor = ex.minor () & TAO_MINOR_MASK; + if (minor != TAO_POA_DISCARDING && minor != TAO_POA_HOLDING) + { + info.edit ()->reset_runtime (); + } + if (debug_ > 1) + { + ORBSVCS_DEBUG ((LM_DEBUG, + ACE_TEXT ("ImR: TRANSIENT while waiting for <%C> shutdown.\n"), + id)); + } + if (this->opts_->throw_shutdown_exceptions ()) + { + ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); + _tao_rh->shutdown_server_excep (&h); + return; + } + } + catch (const CORBA::Exception &ex) { if (debug_ > 1) { @@ -1042,7 +1080,6 @@ ImR_Locator_i::shutdown_server } } - _tao_rh->shutdown_server (); } @@ -1155,8 +1192,8 @@ ImR_Locator_i::server_is_running void ImR_Locator_i::server_is_shutting_down -(ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, - const char* fqname) + (ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, + const char* fqname) { UpdateableServerInfo info (this->repository_.get(), fqname); if (info.null ()) @@ -1194,8 +1231,8 @@ ImR_Locator_i::server_is_shutting_down void ImR_Locator_i::find -(ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, - const char* id) + (ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, + const char* id) { Server_Info_Ptr si = this->repository_->get_active_server (id); ImplementationRepository::ServerInformation_var imr_info; @@ -1220,7 +1257,7 @@ ImR_Locator_i::find id)); } } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); _tao_rh->find_excep (&h); @@ -1247,7 +1284,7 @@ ImR_Locator_i::list AsyncListManager_ptr lister (l); l->list (_tao_rh, how_many); } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); _tao_rh->find_excep (&h); @@ -1302,7 +1339,7 @@ ImR_Locator_i::connect_activator (Activator_Info& info) ACE_TEXT ("ImR: Connected to activator <%C>\n"), info.name.c_str ())); } - catch (CORBA::Exception&) + catch (const CORBA::Exception&) { info.reset_runtime (); } @@ -1334,7 +1371,7 @@ ImR_Locator_i::auto_start_servers (void) this->activate_server_i (info, true, &rh); } } - catch (CORBA::Exception& ex) + catch (const CORBA::Exception& ex) { if (debug_ > 1) { @@ -1400,7 +1437,7 @@ ImR_Locator_i::connect_server (UpdateableServerInfo& info) } - catch (CORBA::Exception&) + catch (const CORBA::Exception&) { sip->reset_runtime (); } diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h index 8c5fb27ca6c..c9ff837871b 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h @@ -223,16 +223,6 @@ private: auto_ptr<Locator_Repository> repository_; Options *opts_; -#if 0 - bool read_only_; - ACE_Time_Value startup_timeout_; - bool ping_external_; - ACE_Time_Value ping_interval_; - ACE_Time_Value ping_timeout_; - - bool unregister_if_address_reused_; - bool throw_shutdown_exceptions_; -#endif }; //---------------------------------------------------------------------------- diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp index f6122cdc77c..3ec2ffc78ee 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp @@ -437,7 +437,7 @@ LiveEntry::do_ping (PortableServer::POA_ptr poa) ACE_TEXT ("sendc_ping returned OK\n"))); } } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { if (ImR_Locator_i::debug () > 3) { @@ -483,7 +483,7 @@ PingReceiver::cancel (void) PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this); poa_->deactivate_object (oid.in()); } - catch (CORBA::Exception &ex) + catch (const CORBA::Exception &ex) { if (ImR_Locator_i::debug () > 4) { @@ -526,7 +526,7 @@ PingReceiver::ping_excep (Messaging::ExceptionHolder * excep_holder) } excep_holder->raise_exception (); } - catch (CORBA::TRANSIENT &ex) + catch (const CORBA::TRANSIENT &ex) { switch (ex.minor () & TAO_MINOR_MASK) { @@ -550,7 +550,7 @@ PingReceiver::ping_excep (Messaging::ExceptionHolder * excep_holder) } } } - catch (CORBA::TIMEOUT &ex) + catch (const CORBA::TIMEOUT &ex) { if (this->entry_ != 0) { @@ -565,7 +565,7 @@ PingReceiver::ping_excep (Messaging::ExceptionHolder * excep_holder) } } } - catch (CORBA::Exception &) + catch (const CORBA::Exception &) { if (this->entry_ != 0) { diff --git a/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl index d67d5bcf60d..cbcf8beb827 100755 --- a/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl +++ b/TAO/orbsvcs/tests/ImplRepo/RestartServer/run_test.pl @@ -61,7 +61,11 @@ my $actlogfile = "act.log"; # Use client strategy factory for one of retry parameters. $c1_conf = "client.conf"; +my $stdout_file = "test.out"; +my $stderr_file = "test.err"; +my $ti_stdout_file = $ti->LocalFile ($stdout_file); +my $ti_stderr_file = $ti->LocalFile ($stderr_file); my $imr_imriorfile = $imr->LocalFile ($implrepo_ior); my $act_imriorfile = $act->LocalFile ($implrepo_ior); my $ti_imriorfile = $ti->LocalFile ($implrepo_ior); @@ -70,6 +74,20 @@ my $c1_srviorfile = $c1->LocalFile ($messenger_ior); my $c1_conffile = $c1->LocalFile ($c1_conf); my $act_srviorfile = $ti->LocalFile ($messenger_ior); +sub redirect_output() +{ + open(OLDOUT, ">&", \*STDOUT) or die "Can't dup STDOUT: $!"; + open(OLDERR, ">&", \*STDERR) or die "Can't dup STDERR: $!"; + open STDERR, '>', $ti_stderr_file; + open STDOUT, '>', $ti_stdout_file; +} + +sub restore_output() +{ + open(STDERR, ">&OLDERR") or die "Can't dup OLDERR: $!"; + open(STDOUT, ">&OLDOUT") or die "Can't dup OLDOUT: $!"; +} + # Make sure the files are gone, so we can wait on them. sub delete_files { @@ -81,6 +99,8 @@ sub delete_files $imr->DeleteFile ($implrepo_ior); $act->DeleteFile ($implrepo_ior); $ti->DeleteFile ($implrepo_ior); + $ti->DeleteFile ($stdout_file); + $ti->DeleteFile ($stderr_file); $act->DeleteFile ($activator_ior); $act->DeleteFile ($messenger_ior); $c1->DeleteFile ($messenger_ior); @@ -161,7 +181,26 @@ sub list return kill_imr ("tao_imr list returned $TI_status"); } return 0; +} +sub list_active_servers +{ + # Redirect output so we can count number of lines in output + redirect_output(); + $TI->Arguments ("$tiinitref list -v"); + $TI_status = $TI->SpawnWaitKill ($ti->ProcessStartWaitInterval() + $extra_timeout); + restore_output(); + if ($TI_status != 0 && $TI_status != 4) { + return kill_imr ("tao_imr list returned $TI_status"); + } + open (FILE, $stderr_file) or die "Can't open $stderr_file: $!"; + $active_servers = 0; + while (<FILE>) { + print STDERR $_; + $active_servers++ if (/Running/); + } + close FILE; + return $active_servers; } $IR_status = $IR->Spawn (); @@ -252,6 +291,8 @@ elsif ($C1_status != 0) { exit 1; } +list (); + if ($lockout eq " --lockout" ) { $C1_status = $C1->SpawnWaitKill ($c1->ProcessStartWaitInterval() + $extra_timeout); list (); @@ -263,6 +304,17 @@ if ($lockout eq " --lockout" ) { } ti_cmd ("shutdown"); + +list (); + +$running = list_active_servers (); +if ($running != 0) { + print STDERR "ERROR We shouldn't have any reported running servers but have $running.\n"; + ++$status; +} else { + print STDOUT "Ok, no servers running.\n"; +} + kill_imr (); exit $status; diff --git a/TAO/orbsvcs/tests/ImplRepo/manual_start/client.cpp b/TAO/orbsvcs/tests/ImplRepo/manual_start/client.cpp index 2c68f11cce2..b789f3e2276 100644 --- a/TAO/orbsvcs/tests/ImplRepo/manual_start/client.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/manual_start/client.cpp @@ -59,19 +59,23 @@ do_test (void) int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + int retval = 0; + + orb = CORBA::ORB_init( argc, argv ); + try { - orb = CORBA::ORB_init( argc, argv ); if (parse_args (argc, argv) != 0) return 1; do_test (); - return 0; - } catch(const CORBA::Exception& ex) { ex._tao_print_exception (ACE_TEXT ("client:")); + retval = -1; } - return -1; + orb->destroy(); + + return retval; } diff --git a/TAO/orbsvcs/tests/ImplRepo/manual_start/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/manual_start/run_test.pl index 5c52465fe0e..d6f5e2614d3 100755 --- a/TAO/orbsvcs/tests/ImplRepo/manual_start/run_test.pl +++ b/TAO/orbsvcs/tests/ImplRepo/manual_start/run_test.pl @@ -23,23 +23,23 @@ $kill = 0; $server_pid = 0; if ($#ARGV >= 0) { - for (my $i = 0; $i <= $#ARGV; $i++) { - if ($ARGV[$i] eq '-debug') { - $debuglevel = 10; - } - elsif ($ARGV[$i] eq '-cd') { - $i++; - $cltdbg = $ARGV[$i]; - } - elsif ($ARGV[$i] eq '-kill') { - $kill = 1; - $cltpause = 5; - } - else { - usage(); - exit 1; - } + for (my $i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq '-debug') { + $debuglevel = 10; + } + elsif ($ARGV[$i] eq '-cd') { + $i++; + $cltdbg = $ARGV[$i]; + } + elsif ($ARGV[$i] eq '-kill') { + $kill = 1; + $cltpause = 5; + } + else { + usage(); + exit 1; } + } } my $tgt_num = 0; @@ -373,8 +373,8 @@ sub list_active_servers open (FILE, $stderr_file) or die "Can't open $stderr_file: $!"; $active_servers = 0; while (<FILE>) { - print STDERR $_; - $active_servers++; + print STDERR $_; + $active_servers++; } close FILE; print STDERR "List took $list_time seconds.\n"; |