vperf/main.c
2021-07-19 20:34:45 +08:00

31 lines
555 B
C

#include "src/init.h"
#include "src/server.h"
#include <stdio.h>
#include <sys/unistd.h>
#include <pthread.h>
int main() {
int rc;
pthread_t unix_domain_server;
//init
//get /data/data/dir
//get whitelist
//
init();
//test
char buf[80];
getcwd(buf, sizeof(buf));
printf("current working directory: %s\n", buf);
//server
rc = pthread_create(&unix_domain_server, NULL, (void *)&server, NULL);
if (rc != 0) {
perror("unix_domain_server thread fail");
}
sleep(100);
return 0;
}