|
Lines 875-880
out:
Link Here
|
| 875 |
xfree(fwd.connect_host); |
875 |
xfree(fwd.connect_host); |
| 876 |
} |
876 |
} |
| 877 |
|
877 |
|
|
|
878 |
static void |
| 879 |
process_signal(void) |
| 880 |
{ |
| 881 |
void (*handler)(int); |
| 882 |
char *sig; |
| 883 |
|
| 884 |
leave_raw_mode(); |
| 885 |
handler = signal(SIGINT, SIG_IGN); |
| 886 |
sig = read_passphrase("SIG", RP_ECHO); |
| 887 |
if (sig != NULL && *sig != '\0') { |
| 888 |
debug("sending signal %s to session %d", sig, session_ident); |
| 889 |
channel_request_start(session_ident, "signal", 0); |
| 890 |
packet_put_cstring(sig); |
| 891 |
packet_send(); |
| 892 |
packet_write_wait(); |
| 893 |
} |
| 894 |
if (sig != NULL) |
| 895 |
xfree(sig); |
| 896 |
signal(SIGINT, handler); |
| 897 |
enter_raw_mode(); |
| 898 |
} |
| 899 |
|
| 878 |
/* |
900 |
/* |
| 879 |
* Process the characters one by one, call with c==NULL for proto1 case. |
901 |
* Process the characters one by one, call with c==NULL for proto1 case. |
| 880 |
*/ |
902 |
*/ |
|
Lines 1051-1056
Supported escape sequences:\r\n\
Link Here
|
| 1051 |
%cB - send a BREAK to the remote system\r\n\ |
1073 |
%cB - send a BREAK to the remote system\r\n\ |
| 1052 |
%cC - open a command line\r\n\ |
1074 |
%cC - open a command line\r\n\ |
| 1053 |
%cR - Request rekey (SSH protocol 2 only)\r\n\ |
1075 |
%cR - Request rekey (SSH protocol 2 only)\r\n\ |
|
|
1076 |
%cS - Send a signal (SSH protocol 2 only)\r\n\ |
| 1054 |
%c^Z - suspend ssh\r\n\ |
1077 |
%c^Z - suspend ssh\r\n\ |
| 1055 |
%c# - list forwarded connections\r\n\ |
1078 |
%c# - list forwarded connections\r\n\ |
| 1056 |
%c& - background ssh (when waiting for connections to terminate)\r\n\ |
1079 |
%c& - background ssh (when waiting for connections to terminate)\r\n\ |
|
Lines 1062-1068
Supported escape sequences:\r\n\
Link Here
|
| 1062 |
escape_char, escape_char, |
1085 |
escape_char, escape_char, |
| 1063 |
escape_char, escape_char, |
1086 |
escape_char, escape_char, |
| 1064 |
escape_char, escape_char, |
1087 |
escape_char, escape_char, |
| 1065 |
escape_char); |
1088 |
escape_char, escape_char); |
| 1066 |
} |
1089 |
} |
| 1067 |
buffer_append(berr, string, strlen(string)); |
1090 |
buffer_append(berr, string, strlen(string)); |
| 1068 |
continue; |
1091 |
continue; |
|
Lines 1074-1079
Supported escape sequences:\r\n\
Link Here
|
| 1074 |
s = channel_open_message(); |
1097 |
s = channel_open_message(); |
| 1075 |
buffer_append(berr, s, strlen(s)); |
1098 |
buffer_append(berr, s, strlen(s)); |
| 1076 |
xfree(s); |
1099 |
xfree(s); |
|
|
1100 |
continue; |
| 1101 |
|
| 1102 |
case 'S': |
| 1103 |
if (compat20) |
| 1104 |
process_signal(); |
| 1077 |
continue; |
1105 |
continue; |
| 1078 |
|
1106 |
|
| 1079 |
case 'C': |
1107 |
case 'C': |