print "CHAT DEMO\n" ;
+use File::Basename qw( basename );
+$ENV{PATH} .= ':' . basename( $0 ) . ':.';
+for my $prog qw( run_stem xterm telnet ) {
+ die "Can't find $prog in PATH\n" if
+ system( "which $prog >/dev/null 2>&1" ) != 0;
+}
+
my @children ;
$SIG{ 'INT' } = \&cleanup ;
sleep 4 unless $cmd =~ /localhost/ ;
}
+1 while wait() != -1;
-while( <STDIN> ) {
+exit;
- next unless /^q/i ;
- cleanup() ;
-}
sub cleanup {