$base_off = 0 ;
$xskip = ( $^O eq 'solaris' ) ? 600 : 500 ;
+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 2 unless $cmd =~ /localhost/ ;
}
-while( <STDIN> ) {
+1 while wait() != -1;
+
+exit;
- next unless /^q/i ;
- cleanup() ;
-}
sub cleanup {
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 {
use warnings ;
our $s ;
-if ( -d 'conf' && -e 'bin/run_stem' ) {
+print "HELLO DEMO\n" ;
- $ENV{PERL5LIB} = 'lib' ;
- $ENV{PATH} = "bin:$ENV{PATH}" ;
+use File::Basename qw( basename );
+$ENV{PATH} .= ':' . basename( $0 ) . ':.';
+for my $prog qw( run_stem xterm ) {
+ die "Can't find $prog in PATH\n" if
+ system( "which $prog >/dev/null 2>&1" ) != 0;
}
-print "HELLO DEMO\n" ;
$SIG{ 'INT' } = \&cleanup ;
fork_exec( @cmd ) ;
-while( <STDIN> ) {
+1 while wait() != -1;
+
+exit;
- next unless /^q/i ;
- cleanup() ;
-}
sub cleanup {
print "INETD: $ENV{PATH}\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;
+}
+
$SIG{ 'INT' } = \&cleanup ;
if ( $s ) {
sleep 4 unless $cmd =~ /localhost/ ;
}
+1 while wait() != -1;
-while( <STDIN> ) {
+exit;
- next unless /^q/i ;
- cleanup() ;
-}
sub cleanup {
$base_off = 0 ;
$xskip = ( $^O eq 'solaris' ) ? 600 : 500 ;
+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 ;
my $tail_dir = 'tail' ;
sleep 2 ;
}
-while( <STDIN> ) {
+1 while wait() != -1;
+
+exit;
- next unless /^q/i ;
- cleanup() ;
-}
sub cleanup {