From: Jimmy Chu on
I have a perl script that folked and do a ssh connection to another
machine and run off some processes.

I expect that when I kill the ssh connection, by kill -2 (SIGINT), I
will kill both the ssh connection and the children processes spawned in
the ssh.

But this is not the case, ssh got killed but the children remain. I am
not aware of running nohup and I am using ksh.

Thanks for any response.

JC

From: alexs on


Jimmy Chu wrote:
> I have a perl script that folked and do a ssh connection to another
> machine and run off some processes.
>
> I expect that when I kill the ssh connection, by kill -2 (SIGINT), I
> will kill both the ssh connection and the children processes spawned in
> the ssh.
>
> But this is not the case, ssh got killed but the children remain. I am
> not aware of running nohup and I am using ksh.
>
> Thanks for any response.
>
> JC

Hi,

I don't know too much about why this should be, but it might be worth
trying other signals (SIGHUP say) too see if that makes a difference.

From: Jimmy Chu on
Thanks for the reply. Actually, I realize the culprit is while I am
ssh-ing to other machine, I also do an

export DISPLAY=<SOMEOTHERMACHINE>; <x windows process>

with this statement, when I kill the ssh, the x-app will still stay
alive. But without the export DISPLAY statement, the x windows process
will get killed accordingly.

I guess this is an undocumented feature. But is there a way to
circumvene it so I can use export DISPLAY but still able to kill
children processes?

 | 
Pages: 1
Next: Unix scripting