Avoid error message after handling TID req.
authorJennifer Richards <jennifer@painless-security.com>
Tue, 17 May 2016 19:53:20 +0000 (15:53 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Tue, 17 May 2016 19:53:20 +0000 (15:53 -0400)
Replace the return 0 with an exit(0) after a forked subprocess finishes
handling a request. This prevents an erroneous error message from
indicating that the tids server has unexpectedly exited.

tid/tids.c

index b9e2430..eb081dd 100644 (file)
@@ -372,6 +372,7 @@ TIDS_INSTANCE *tids_create (void)
   return tids;
 }
 
+/* Process tids requests forever. Should not return except on error. */
 int tids_start (TIDS_INSTANCE *tids, 
                TIDS_REQ_FUNC *req_handler,
                tids_auth_func *auth_handler,
@@ -411,7 +412,7 @@ int tids_start (TIDS_INSTANCE *tids,
       close(listen);
       tids_handle_connection(tids, conn);
       close(conn);
-      return 0;
+      exit(0); /* exit to kill forked child process */
     } else {
       close(conn);
     }