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";
13 $iorfile = "chapter_test.ior";
19 $server = Process
::Create
("exec ".$EXEPREFIX."server".$EXE_EXT.">$iorfile",
22 #$server = Process::Create ($EXEPREFIX."server".$EXE_EXT, ">$iorfile");
24 if (ACE
::waitforfile_timed
($iorfile, $PerlACE::wait_interval_for_process_creation
) == -1) {
25 print STDERR
"ERROR: timedout waiting for file <$iorfile>\n";
26 $server->Kill (); $server->TimedWait (1);
30 open(ior_handle
, "$iorfile");
31 $ior_content = <ior_handle
>;
33 $client = Process
::Create
($EXEPREFIX."client$EXE_EXT", "$ior_content");
35 if ($client->TimedWait (60) == -1) {
36 print STDERR
"ERROR: client timedout\n";
38 $client->Kill (); $client->TimedWait (1);
44 $server->Terminate ();
45 if ($server->TimedWait (5) == -1) {
46 print STDERR
"ERROR: cannot terminate the server\n";
47 $server->Kill (); $server->TimedWait (1);