Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
I can't find a way to force a unix ssh client to send an interrupt signal, but it seems easy to force the break.
Unfortunately, the break message isn't implemented.
It was easy to patch in my needs...
In ChannelSession:
protected boolean handleRequest(String type, Buffer buffer) throws IOException {
if ("env".equals(type))
if ("pty-req".equals(type))
{ return handlePtyReq(buffer); }if ("window-change".equals(type))
{ return handleWindowChange(buffer); }if ("signal".equals(type))
{ return handleSignal(buffer); }if ("break".equals(type))
{ return handleBreak(buffer); }....
protected boolean handleBreak(Buffer buffer) throws IOException {
boolean wantReply = buffer.getBoolean();
int length = buffer.getInt();
log.debug("Break received on channel {}: {}", id, length);
getEnvironment().signal( Signal.INT );
if (wantReply)
{ buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_SUCCESS, 0); buffer.putInt(recipient); session.writePacket(buffer); } return true;
}