run_test.pl
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· PL 代码 · 共 62 行
PL
62 行
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
# run_test.pl,v 1.3 2002/07/28 21:28:16 crodrigu Exp
# -*- perl -*-
use lib '../../../../../bin';
use PerlACE::Run_Test;
# amount of delay between running the servers
$status = 0;
$pingior = PerlACE::LocalFile ("ping.ior");
$pongior = PerlACE::LocalFile ("pong.ior");
unlink $pingior, $pongior;
$PING = new PerlACE::Process ("ping", "-o $pingior");
$PONG = new PerlACE::Process ("pong", "-o $pongior");
$CTRL = new PerlACE::Process ("control", "-f file://$pingior -g file://$pongior");
print STDERR "Starting Ping\n";
$PING->Spawn ();
if (PerlACE::waitforfile_timed ($pingior, 20) == -1) {
print STDERR "ERROR: cannot find file <$pingior>\n";
$PING->Kill ();
exit 1;
}
print STDERR "Starting Pong\n";
$PONG->Spawn ();
if (PerlACE::waitforfile_timed ($pongior, 20) == -1) {
print STDERR "ERROR: cannot find file <$pongior>\n";
$PING->Kill ();
$PONG->Kill ();
exit 1;
}
print STDERR "Starting Control\n";
$CTRL->Spawn();
$PING->WaitKill(100);
$PONG->WaitKill(100);
$control = $CTRL->TerminateWaitKill (5);
if ($control != 0) {
print STDERR "ERROR: control returned $control\n";
$status = 1;
}
unlink $pingior, $pongior;
exit $status;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?