int save_errno = errno;
debug("Received SIGCHLD.");
child_terminated = 1;
- child_has_selected = 0;
errno = save_errno;
}
void
process_buffered_input_packets()
{
- dispatch_run(DISPATCH_NONBLOCK, NULL);
+ dispatch_run(DISPATCH_NONBLOCK, NULL, NULL);
}
/*
child_terminated = 0;
child_has_selected = 0;
signal(SIGCHLD, sigchld_handler);
+ signal(SIGPIPE, SIG_IGN);
/* Initialize our global variables. */
fdin = fdin_arg;
debug("Entering interactive session for SSH2.");
signal(SIGCHLD, sigchld_handler2);
+ signal(SIGPIPE, SIG_IGN);
child_terminated = 0;
connection_in = packet_get_connection_in();
connection_out = packet_get_connection_out();
signal(SIGCHLD, sigchld_handler2);
}
channel_after_select(&readset, &writeset);
- if (child_terminated && child_has_selected)
- break;
process_input(&readset);
process_output(&writeset);
}
}
void
-server_input_stdin_data(int type, int plen)
+server_input_stdin_data(int type, int plen, void *ctxt)
{
char *data;
unsigned int data_len;
}
void
-server_input_eof(int type, int plen)
+server_input_eof(int type, int plen, void *ctxt)
{
/*
* Eof from the client. The stdin descriptor to the
}
void
-server_input_window_size(int type, int plen)
+server_input_window_size(int type, int plen, void *ctxt)
{
int row = packet_get_int();
int col = packet_get_int();
}
void
-server_input_channel_open(int type, int plen)
+server_input_channel_open(int type, int plen, void *ctxt)
{
Channel *c = NULL;
char *ctype;
rwindow = packet_get_int();
rmaxpack = packet_get_int();
- debug("channel_input_open: ctype %s rchan %d win %d max %d",
+ debug("server_input_channel_open: ctype %s rchan %d win %d max %d",
ctype, rchan, rwindow, rmaxpack);
if (strcmp(ctype, "session") == 0) {