[Bug 1424] Cannot signal a process over a channel (rfc 4254, section 6.9)

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Oct 20 06:16:54 EST 2009


https://bugzilla.mindrot.org/show_bug.cgi?id=1424

--- Comment #12 from Salvador Fandiño <sfandino at yahoo.com> 2009-10-20 06:16:51 EST ---
Created an attachment (id=1700)
 --> (https://bugzilla.mindrot.org/attachment.cgi?id=1700)
extend the signals patch to accept them over the mux socket

Note, Darren Tucker patch 1699 has to be applied first!

This patch adds support for two new -O commands: ps and kill

- ps will list the PIDs of slave ssh processes
- kill allows to send signals

It also adds support to sshd to accept signals by number.

Sample session:
===============
 $ ./ssh -S /tmp/mux -M localhost -f perl ~/g/my-ssh/tellsignal.pl 
 $ ./ssh -S /tmp/mux localhost -O ps      
 24140
 $ ./ssh -S /tmp/mux localhost -O kill HUP 24140
 Signal request sent.
 signal HUP received
 $ ./ssh -S /tmp/mux localhost -O kill 15 24140
 Signal request sent.
 signal TERM received
 $ ./ssh -S /tmp/mux localhost -O kill KILL 24140
 Signal request sent.
 $ 

Some notes:
===========
* A new field "tag" is added to Channel, it is used as the session
logical name. The current client implementation (muxclient) uses the
process PID as the tag.

* muxclient() now gets the arguments remaining in argv after getopt
processing so it can use them for the -O commands (currently, just
"kill"). I am not completely sure about this because it can be a bit
counterintuitive when the "-O cmd" part is used before the hostname:

  $ ssh -S /tmp/mux -O kill localhost TERM 24140


Bye,

 - Salva

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list