[ale] Expect?

Robert L. Harris robert.l.harris at gmail.com
Wed Feb 9 19:51:22 EST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oh, I like this one.

Thanks.

On 2/9/11 4:19 PM, Chris Fowler wrote:
> #!/usr/bin/perl
>
> use Expect; use strict;
>
> sub worker { my $exp =
> Expect->spawn("/usr/local/streambaby/streambaby");
> $exp->expect(undef, "java.io.IOException"); print " ****
> Killing *****\n"; my $pid = `pgrep -f 'java.*streambaby.jar'`;
> chomp $pid; kill 9, $pid; return; }
>
> while(1) { worker(); }
>

- -- 

:wq!
====================================================================
Robert L. Harris                     | GPG Key ID: E344DA3B
                                         @ x-hkp://pgp.mit.edu
DISCLAIMER:
      These are MY OPINIONS             With Dreams To Be A King,
       ALONE.  I speak for              First One Should Be A Man
       no-one else.                       - Manowar

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iD8DBQFNUzaJ8+1vMONE2jsRAh2FAKCfypT3KQyRsmhhXNR95cNb18L/NgCgiuCc
Y5MGhkoCocAVBtScObxlARY=
=eWQ6
-----END PGP SIGNATURE-----



More information about the Ale mailing list