Index: main/asterisk.c =================================================================== --- main/asterisk.c (revision 378145) +++ main/asterisk.c (working copy) @@ -1662,8 +1662,13 @@ { int a = 0, save_errno = errno; printf("Received HUP signal -- Reloading configs\n"); - if (restartnow) + if (restartnow) { + const char *pwd = getenv("PWD"); + if (pwd) { + chdir(pwd); + } execvp(_argv[0], _argv); + } sig_flags.need_reload = 1; if (sig_alert_pipe[1] != -1) { if (write(sig_alert_pipe[1], &a, sizeof(a)) < 0) { @@ -1950,8 +1955,13 @@ pthread_kill(consolethread, SIGHUP); /* Give the signal handler some time to complete */ sleep(2); - } else + } else { + const char *pwd = getenv("PWD"); + if (pwd) { + chdir(pwd); + } execvp(_argv[0], _argv); + } } else { /* close logger */