Chdir() to the configuration directory instead of /.
This commit is contained in:
parent
9bd978cc8e
commit
af9ee7ff00
2 changed files with 2 additions and 1 deletions
|
@ -203,7 +203,7 @@ bool detach(void) {
|
|||
|
||||
if(do_detach) {
|
||||
#ifndef HAVE_MINGW
|
||||
if(daemon(0, 0)) {
|
||||
if(daemon(1, 0)) {
|
||||
logger(DEBUG_ALWAYS, LOG_ERR, "Couldn't detach from terminal: %s", strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -338,6 +338,7 @@ int main(int argc, char **argv) {
|
|||
return 1;
|
||||
|
||||
make_names(true);
|
||||
chdir(confbase);
|
||||
|
||||
if(show_version) {
|
||||
printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE,
|
||||
|
|
Loading…
Reference in a new issue