X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bin%2Fchat_demo;h=435af509b281a5575255ed8a03011bc6b5e9be79;hb=afbe012678ecefed824b148a88598a7240e6198b;hp=8437913a8acb6604751222cb7a0e2b4c13e5d082;hpb=4536f6551e07988483a419d1094bdbe80a77b322;p=urisagit%2FStem.git diff --git a/bin/chat_demo b/bin/chat_demo index 8437913..435af50 100755 --- a/bin/chat_demo +++ b/bin/chat_demo @@ -7,6 +7,13 @@ $xskip = ( $^O eq 'solaris' ) ? 600 : 500 ; 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 ; @@ -42,13 +49,11 @@ print "$cmd\n" ; sleep 4 unless $cmd =~ /localhost/ ; } +1 while wait() != -1; -while( ) { +exit; - next unless /^q/i ; - cleanup() ; -} sub cleanup {