Much closer to complete cleanup before exit.

This commit is contained in:
Ian Gulliver
2016-02-21 13:57:35 -08:00
parent 71413f97e5
commit ec79ba0da1
8 changed files with 130 additions and 31 deletions

View File

@@ -2,10 +2,15 @@
#include <stdio.h>
#include <getopt.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include "common.h"
#include "wakeup.h"
#include "incoming.h"
#include "outgoing.h"
#include "receive.h"
#include "send.h"
@@ -92,6 +97,8 @@ static bool parse_opts(int argc, char *argv[]) {
}
int main(int argc, char *argv[]) {
assert(!close(0));
hex_init();
peer_init();
@@ -112,5 +119,8 @@ int main(int argc, char *argv[]) {
wakeup_cleanup();
send_cleanup();
incoming_cleanup();
outgoing_cleanup();
return EXIT_SUCCESS;
}