Commit 3a0a22f4 authored by Sergey Lyubka's avatar Sergey Lyubka

Add an ability to pass listening socket to mongoose binary

parent b4a4b158
......@@ -449,6 +449,14 @@ static void start_mongoose(int argc, char *argv[]) {
free(options[i + 1]);
}
// Add an ability to pass listening socket to mongoose
{
const char *env = getenv("MONGOOSE_LISTENING_SOCKET");
if (env != NULL && atoi(env) > 0 ) {
mg_set_listening_socket(server, atoi(env));
}
}
// Setup signal handler: quit on Ctrl-C
signal(SIGTERM, signal_handler);
signal(SIGINT, signal_handler);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment