vperf/main.c
Your Name 8c5dd9ca47 init
2021-07-19 19:38:43 +08:00

28 lines
503 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
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;
}