X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bin%2Finetd_demo;fp=bin%2Finetd_demo;h=9556f69da7537bebb59090c7432b5fd713ce9d72;hb=3104a1f12a49e8a1ca779c32ce0dd91eb3752915;hp=9116feb5280adcc912553256fdad9f4740da2ea2;hpb=41984f7ec1e2807b47ec3bda65e0c6e41fa36c4d;p=urisagit%2FStem.git diff --git a/bin/inetd_demo b/bin/inetd_demo index 9116feb..9556f69 100755 --- a/bin/inetd_demo +++ b/bin/inetd_demo @@ -9,6 +9,13 @@ my @children ; 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 ) { @@ -42,13 +49,11 @@ print "CMD $cmd\n" ; sleep 4 unless $cmd =~ /localhost/ ; } +1 while wait() != -1; -while( ) { +exit; - next unless /^q/i ; - cleanup() ; -} sub cleanup {