@@ -138,7 +138,7 @@ static void _help(void)
138
138
char * help = ""
139
139
"Usage: smartdns [OPTION]...\n"
140
140
"Start smartdns server.\n"
141
- " -f run forground .\n"
141
+ " -f run foreground .\n"
142
142
" -c [conf] config file.\n"
143
143
" -p [pid] pid file path, '-' means don't create pid file.\n"
144
144
" -S ignore segment fault signal.\n"
@@ -518,7 +518,7 @@ static int _smartdns_init_pre(void)
518
518
int main (int argc , char * argv [])
519
519
{
520
520
int ret = 0 ;
521
- int is_forground = 0 ;
521
+ int is_foreground = 0 ;
522
522
int opt = 0 ;
523
523
char config_file [MAX_LINE_LEN ];
524
524
char pid_file [MAX_LINE_LEN ];
@@ -535,7 +535,7 @@ int main(int argc, char *argv[])
535
535
while ((opt = getopt (argc , argv , "fhc:p:SvxN:" )) != -1 ) {
536
536
switch (opt ) {
537
537
case 'f' :
538
- is_forground = 1 ;
538
+ is_foreground = 1 ;
539
539
break ;
540
540
case 'c' :
541
541
snprintf (config_file , sizeof (config_file ), "%s" , optarg );
@@ -568,7 +568,7 @@ int main(int argc, char *argv[])
568
568
goto errout ;
569
569
}
570
570
571
- if (is_forground == 0 ) {
571
+ if (is_foreground == 0 ) {
572
572
if (daemon (0 , 0 ) < 0 ) {
573
573
fprintf (stderr , "run daemon process failed, %s\n" , strerror (errno ));
574
574
return 1 ;
0 commit comments