[Twisted-Python] sending signal through SSHChannel
![](https://secure.gravatar.com/avatar/5536c76f764b2edb8f62a61ed48e9f40.jpg?s=120&d=mm&r=g)
Hello! I have written a python program that executes shell scripts on remote computers using the twisted conch SSHChannel. Several shell scripts are executed at once on several machines and the scripts range in execution time from minutes to hours. My question is regarding the behavior of Conch when it is shut down. What i would like to do is to send a SIGINT or SIGKILL to the remote script so that it can terminate in an orderly fashion. I am using the channel.SSHChannel as a base class for my task. Is there a mechanism in Conch for sending this signal? best regards frans
![](https://secure.gravatar.com/avatar/7cb174aac3d9e3cbc0ebb04868f710d6.jpg?s=120&d=mm&r=g)
On Tue, Sep 30, 2008 at 12:06 PM, Frans Mårtensson <frans.martensson@gmail.com> wrote:
There's a mechanism for sending signals in SSH, although Conch doesn't expose it directly. The code looks something like this: channel.conn.sendRequest(channel, 'signal', NS('KILL')) For more information on what kinds of signal names you can send and on the 'signal' request generally, you should read RFC4254 section 6.9 -p -- Paul Swartz paulswartz at gmail dot com http://z3p.jot.com/ AIM: z3penguin
![](https://secure.gravatar.com/avatar/7cb174aac3d9e3cbc0ebb04868f710d6.jpg?s=120&d=mm&r=g)
On Tue, Sep 30, 2008 at 12:06 PM, Frans Mårtensson <frans.martensson@gmail.com> wrote:
There's a mechanism for sending signals in SSH, although Conch doesn't expose it directly. The code looks something like this: channel.conn.sendRequest(channel, 'signal', NS('KILL')) For more information on what kinds of signal names you can send and on the 'signal' request generally, you should read RFC4254 section 6.9 -p -- Paul Swartz paulswartz at gmail dot com http://z3p.jot.com/ AIM: z3penguin
participants (2)
-
Frans Mårtensson
-
Paul Swartz