1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
7 use lib
"$ENV{ACE_ROOT}/bin";
14 # amount of delay between starting servers and client
21 my $prog = "..$DIR_SEPARATOR".
24 "orbsvcs$DIR_SEPARATOR".
25 "Naming_Service$DIR_SEPARATOR".
26 "tao_cosnaming$EXE_EXT";
27 $NS = Process
::Create
($prog,"");
32 # create naming service, server, client
36 $server = Process
::Create
($EXEPREFIX."server".$EXE_EXT, "");
39 $client = Process
::Create
($EXEPREFIX."client".$EXE_EXT, "");
43 # wait for client to finish
44 if ($client->TimedWait (60) == -1) {
45 print STDERR
"ERROR: client timedout\n";
47 $client->Kill (); $client->TimedWait (1);
51 # gracefully kill the server
52 $server->Terminate ();
53 if ($server->TimedWait (5) == -1) {
54 print STDERR
"ERROR: cannot terminate the server\n";
55 $server->Kill (); $server->TimedWait (1);
59 # gracefully kill the Naming Service
61 if ($NS->TimedWait (5) == -1) {
62 print STDERR
"ERROR: cannot terminate the server\n";
63 $NS->Kill (); $server->TimedWait (1);