mirror of
https://github.com/kakwa/uts-server
synced 2024-12-04 23:15:54 +01:00
fix ordering between daemonize and get working dir
This commit is contained in:
parent
6e687f2fe2
commit
43984fd1b5
@ -63,9 +63,6 @@ int main(int argc, char **argv) {
|
||||
argp_parse(&argp, argc, argv, 0, 0, &args);
|
||||
int ret = EXIT_SUCCESS;
|
||||
|
||||
if (args.daemonize)
|
||||
skeleton_daemon();
|
||||
|
||||
// get the current path, the configuration can be relative to this path
|
||||
char conf_wd[PATH_MAX];
|
||||
if (getcwd(conf_wd, sizeof(conf_wd)) == NULL){
|
||||
@ -73,6 +70,9 @@ int main(int argc, char **argv) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (args.daemonize)
|
||||
skeleton_daemon();
|
||||
|
||||
syslog(LOG_NOTICE, "uts-server daemon starting with conf '%s' from working dir '%s'", args.conffile, conf_wd);
|
||||
|
||||
while (1) {
|
||||
|
Loading…
Reference in New Issue
Block a user