]> andersk Git - openssh.git/blobdiff - serverloop.c
- (stevesk) rijndael.c: cleanup missing declaration warnings.
[openssh.git] / serverloop.c
index c2b2d0222e0a68585b916fba808eeb24123e6203..25320348b527237f322b7dae32c39d60187cf079 100644 (file)
@@ -110,7 +110,6 @@ sigchld_handler2(int sig)
        int save_errno = errno;
        debug("Received SIGCHLD.");
        child_terminated = 1;
-       child_has_selected = 0;
        errno = save_errno;
 }
 
@@ -389,7 +388,7 @@ drain_output()
 void
 process_buffered_input_packets()
 {
-       dispatch_run(DISPATCH_NONBLOCK, NULL);
+       dispatch_run(DISPATCH_NONBLOCK, NULL, NULL);
 }
 
 /*
@@ -418,6 +417,7 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
        child_terminated = 0;
        child_has_selected = 0;
        signal(SIGCHLD, sigchld_handler);
+       signal(SIGPIPE, SIG_IGN);
 
        /* Initialize our global variables. */
        fdin = fdin_arg;
@@ -651,6 +651,7 @@ server_loop2(void)
        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();
@@ -677,8 +678,6 @@ server_loop2(void)
                        signal(SIGCHLD, sigchld_handler2);
                }
                channel_after_select(&readset, &writeset);
-               if (child_terminated && child_has_selected)
-                       break;
                process_input(&readset);
                process_output(&writeset);
        }
@@ -689,7 +688,7 @@ server_loop2(void)
 }
 
 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;
@@ -706,7 +705,7 @@ server_input_stdin_data(int type, int plen)
 }
 
 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
@@ -719,7 +718,7 @@ server_input_eof(int type, int plen)
 }
 
 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();
@@ -765,7 +764,7 @@ input_direct_tcpip(void)
 }
 
 void
-server_input_channel_open(int type, int plen)
+server_input_channel_open(int type, int plen, void *ctxt)
 {
        Channel *c = NULL;
        char *ctype;
@@ -780,7 +779,7 @@ server_input_channel_open(int type, int plen)
        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) {
This page took 0.042171 seconds and 4 git commands to generate.