]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
server: Shutdown the scheduler before handling commands.
[paraslash.git] / command.c
index cd24c0350ef90fbeccf713325738a6b03eba1000..84b7d9438fa21a3fd491ab4a0ee0918f6ff9c086 100644 (file)
--- a/command.c
+++ b/command.c
@@ -877,7 +877,7 @@ static int run_command(struct command_context *cc, struct iovec *iov)
  *
  * \sa alarm(2), \ref crypt.c, \ref crypt.h.
  */
-__noreturn void handle_connect(int fd)
+int handle_connect(int fd)
 {
        int ret;
        unsigned char rand_buf[CHALLENGE_SIZE + 2 * SESSION_KEY_LEN];
@@ -987,5 +987,5 @@ out:
        }
        sc_free(cc->scc.recv);
        sc_free(cc->scc.send);
-       exit(ret < 0? EXIT_FAILURE : EXIT_SUCCESS);
+       return ret;
 }