Skip to content

Commit

Permalink
Merge pull request #17 from pymumu/master
Browse files Browse the repository at this point in the history
Fork Sync
  • Loading branch information
PikuZheng authored Aug 5, 2022
2 parents 88a69e5 + 3605e6e commit 93718cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/smartdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void _help(void)
"Start smartdns server.\n"
" -f run forground.\n"
" -c [conf] config file.\n"
" -p [pid] pid file path\n"
" -p [pid] pid file path, '-' means don't create pid file.\n"
" -S ignore segment fault signal.\n"
" -x verbose screen.\n"
" -v dispaly version.\n"
Expand Down Expand Up @@ -571,7 +571,7 @@ int main(int argc, char *argv[])
_reg_signal();
}

if (create_pid_file(pid_file) != 0) {
if (strncmp(pid_file, "-", 2) != 0 && create_pid_file(pid_file) != 0) {
goto errout;
}

Expand Down

0 comments on commit 93718cd

Please sign in to comment.