[Hampshire] Bash script interruptions

Top Page

Reply to this message
Author: Graeme Hilton
Date:  
To: hampshire
Subject: [Hampshire] Bash script interruptions
Bash/ssh guru's,

I have a script which opens an ssh connection and runs a command; this is
an example:
#!/bin/bash
maxlines=$1
for (($lines=0;$lines<=$maxlines;lines+=1)); do
echo "run zacquire remote"
ssh 192.168.1.247 -X ./zacquire_maxlines --lines $lines --socket
done

The zacquire_maxlines program takes a few seconds to run. Occasionally I
will want to interrupt it to halt the script midway through the for loop.

If I do a Ctrl-C the zacquire_maxlines gets a SIGKILL, rather than a SIGINT?

Is this a feature of bash, or of the way the ssh command interprets the
SIGINT request?

Thanks,

Graeme Hilton