X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=main.cpp;h=4a5904b0715f1905817210138e3c9b7091329fae;hp=8825631771ffe80fe4ca3a7baa5261e2748f1083;hb=0d72f384a1de672824298262ba5c427ec0aee2d6;hpb=3ce04a3c410c5836394417b19e70f2a95bc8a5e7 diff --git a/main.cpp b/main.cpp index 8825631..4a5904b 100644 --- a/main.cpp +++ b/main.cpp @@ -197,14 +197,14 @@ bool dry_run_config(const std::string &argv0, const std::string &config_filename pid_t pid = fork(); switch (pid) { case -1: - perror("fork()"); + log_perror("fork()"); free(argv0_copy); free(config_filename_copy); return false; case 0: // Child. execlp(argv0_copy, argv0_copy, "--test-config", config_filename_copy, NULL); - perror(argv0_copy); + log_perror(argv0_copy); _exit(1); default: // Parent. @@ -221,7 +221,7 @@ bool dry_run_config(const std::string &argv0, const std::string &config_filename } while (err == -1 && errno == EINTR); if (err == -1) { - perror("waitpid()"); + log_perror("waitpid()"); return false; } @@ -402,7 +402,7 @@ start: for ( ;; ) { execlp(argv[0], argv[0], config_filename.c_str(), "--state", buf, NULL); open_logs(config.log_destinations); - perror("execlp"); + log_perror("execlp"); log(ERROR, "re-exec of %s failed. Waiting 0.2 seconds and trying again...", argv[0]); shut_down_logging(); usleep(200000);