[ale] Expect?

Lightner, Jeff jlightner at water.com
Wed Feb 9 14:40:18 EST 2011


Have a look at "autoexpect".  It will create an expect script for you by
recording what you do.   You should have a man page for it if you have
expect package installed.

The resulting script sometimes requires tweaking but it is better than
writing from scratch.

Also "kill -9" should be a last resort - it tells programs not to clean
up after themselves so can leave memory hooks, open files, open shared
memory segments etc... that can either impact performance over time or
completely prevent things from starting because the memory address they
want isn't available or there isn't a big enough contiguous chunk of
memory to create the shared memory segment.

Try doing a progressive kill (e.g.  kill <PID>, use ps to see if it went
away, if not kill -1 <PID>, check with ps again and finally "kill -9
<PID>" if that didn't kill it.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Chris Fowler
Sent: Wednesday, February 09, 2011 2:22 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Expect?

On Wed, 2011-02-09 at 12:10 -0700, Robert L. Harris wrote:
> 
> Anyone working with expect? I have a prog that needs to be killed and
> restarted based on stdout from the prog. I have the spawn and
> detection working, just need the kill -9...
> -- 

Yes.  I've worked with Expect the scripting language and the Perl
module.  Works very well.


_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
 
Proud partner. Susan G. Komen for the Cure.
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------



More information about the Ale mailing list