aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.c b/main.c
index 0707216..f90a788 100644
--- a/main.c
+++ b/main.c
@@ -44,10 +44,14 @@ void run_tests(void)
sp_test();
}
-int main()
+int main(int argc, char *argv[])
{
//run_tests();
+ int logleaves = 10;
+ if(argc == 2)
+ logleaves = atol(argv[1]);
+
const char *socket_name = "socket";
int sockfd;
if((sockfd = bind_unix_socket(socket_name)) < 0)
@@ -56,7 +60,7 @@ int main()
return 1;
}
- printf("Listening on '%s'\n", socket_name);
+ printf("Listening on socket '%s'...\n", socket_name);
cleanup_socket = socket_name;
@@ -65,5 +69,5 @@ int main()
signal(SIGTERM, signal_handler);
signal(SIGSEGV, signal_handler);
- sp_main(sockfd);
+ sp_main(sockfd, logleaves);
}