Re: [Hampshire] Bash script interruptions

Top Page

Reply to this message
Author: Graeme Hilton
Date:  
To: hampshire
Subject: Re: [Hampshire] Bash script interruptions
> Damian Brasher wrote:
>> Graeme Hilton wrote:
>>
>>> 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?
>>>
>>
>> Could it be that the initial Ctrl-C SIGINT stops the ssh process which
>> in
>> turn SIGKILL's the remotely executed process - I'd test this to be
>> absolutely sure.
>>
>
> My test shows that SIGINT does not automatically SIGKILL a remote process.
>
>>From local machine (this command takes a few minutes):
>
> ]#ssh dbrasher@192.168.*.*** "find / -name test123"
>
> Then on the remote machine:
>
> ]#ps -e |grep find
> ]#strace -p PID
>
> Local machine:
>
> ]#Ctrl-C
> Killed by signal 2.
>
> find is still running on the remote machine.


I did the same kind of thing and got the same answer...

> I can't see any relevant options in /etc/sshd_config to control how
> remote commands are handled on loss of the ssh session responsible for
> executing the remote command, find is run in a subshell.


I've contacted the author of the program I'm running remotely and he's
trying to debug this issue - unfortunately that means he's nicked the
hardware I was doing my testing on!

> I'm interested to know the precise answer to this one too:)


And me!

--
Graeme Hilton