Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (27 sloc) 623 Bytes
#include <unistd.h>
#include <stdio.h>
void read_config() {
int success = 0;
while (!success) {
FILE *fp;
fp = fopen("/etc/tracing-server-example.conf", "r");
if (fp) {
success = 1;
printf("[*] Read configuration successfully.\n");
fclose(fp);
} else {
usleep(1);
}
}
}
int main() {
printf("[*] Server starting...\n");
read_config();
printf("[*] Server started successfully.\n");
while (1) {
printf("[*] Processing request... ");
sleep(1);
printf("DONE.\n");
}
return 0;
}
You can’t perform that action at this time.