Skip to content

Commit a8aeb66

Browse files
committed
L: added option -e to enable Deamon Mode
1 parent a5e3a1f commit a8aeb66

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

general/lib/io/config_file.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#include "utils.h"
99
#include <math.h>
1010

11-
#if defined(__unix__) || defined(__APPLE__)
12-
#endif
13-
1411

1512
/*
1613
int utParseConfigurationFile(char *path) {
@@ -40,8 +37,6 @@ int conf_opts_port_number(char *opt) {
4037
}
4138

4239

43-
44-
4540
char conf_opts_mode_concurrency(char *opt) {
4641

4742
Assert((strcmp(opt, "Thread") != 0) ^ (strcmp(opt, "Process") != 0), "Unsupported mode_concurrency");
@@ -97,8 +92,9 @@ int conf_read_opt(int argc, char *argv[], struct Configs *configs) {
9792
exit(-1);
9893
}
9994
configs->hostname = ip_buffer;
100-
if (deamon){run_in_daemon();}
101-
95+
#if defined(__unix__) || defined(__APPLE__)
96+
if (deamon) { run_in_daemon(); }
97+
#endif
10298
return 0;
10399
}
104100

@@ -248,7 +244,8 @@ int conf_parseConfigFile(char *path, struct Configs *config) {
248244

249245
free(StringsArray);
250246
// log_ut("\n%d\n", wrong);
251-
if (Assert_nb(count_ip == 1 && count_mode == 1 && count_port == 1 && count_root_dir == 1 && wrong == 0, "Something gone wrong in configuration file") == ASS_CRASH ) {
247+
if (Assert_nb(count_ip == 1 && count_mode == 1 && count_port == 1 && count_root_dir == 1 && wrong == 0,
248+
"Something gone wrong in configuration file") == ASS_CRASH) {
252249
//free(config->root_dir);
253250
exit(1);
254251
}

0 commit comments

Comments
 (0)