diff options
| author | Andre Noll <maan@tuebingen.mpg.de> | 2024-10-23 18:45:30 +0200 |
|---|---|---|
| committer | Andre Noll <maan@tuebingen.mpg.de> | 2025-03-23 19:13:50 +0100 |
| commit | 07b73ad8272084b706d18ee2286bf25711dbaabb (patch) | |
| tree | c79ef9a311120433f4ebe72dbbaa492bab449c19 /sig.c | |
| parent | 5770e00c6e59528762be20610af6d8bd24d6872f (diff) | |
This essentially reverts commit 66cdd5bc99a5 which aimed to make the
dss log facility C89 conform. While this was a worthwhile goal in
2012, it has little value today, since in 2025 we can safely assume
a C99 compliant compiler.
The patch was created with
git revert -Xours 66cdd5bc
followed by manual tweaks to make it compile again.
Diffstat (limited to 'sig.c')
| -rw-r--r-- | sig.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -55,7 +55,7 @@ int signal_init(void) goto err_out; return signal_pipe[0]; err_out: - DSS_EMERG_LOG(("%s\n", dss_strerror(-ret))); + DSS_EMERG_LOG("%s\n", dss_strerror(-ret)); exit(EXIT_FAILURE); } @@ -76,9 +76,9 @@ static void generic_signal_handler(int s) return; } if (ret < 0) - DSS_EMERG_LOG(("%s\n", strerror(errno))); + DSS_EMERG_LOG("%s\n", strerror(errno)); else - DSS_EMERG_LOG(("short write to signal pipe\n")); + DSS_EMERG_LOG("short write to signal pipe\n"); exit(EXIT_FAILURE); } @@ -99,13 +99,13 @@ int reap_child(pid_t *pid, int *status) if (*pid < 0) return -ERRNO_TO_DSS_ERROR(errno); if (WIFEXITED(*status)) - DSS_DEBUG_LOG(("child %i exited. Exit status: %i\n", (int)*pid, - WEXITSTATUS(*status))); + DSS_DEBUG_LOG("child %i exited. Exit status: %i\n", (int)*pid, + WEXITSTATUS(*status)); else if (WIFSIGNALED(*status)) - DSS_DEBUG_LOG(("child %i was killed by signal %i\n", (int)*pid, - WTERMSIG(*status))); + DSS_DEBUG_LOG("child %i was killed by signal %i\n", (int)*pid, + WTERMSIG(*status)); else - DSS_WARNING_LOG(("child %i terminated abormally\n", (int)*pid)); + DSS_WARNING_LOG("child %i terminated abormally\n", (int)*pid); return 1; } @@ -115,7 +115,7 @@ int reap_child(pid_t *pid, int *status) */ int install_sighandler(int sig) { - DSS_DEBUG_LOG(("catching signal %d\n", sig)); + DSS_DEBUG_LOG("catching signal %d\n", sig); if (signal(sig, &generic_signal_handler) != SIG_ERR) return 1; return -E_SIGNAL_SIG_ERR; @@ -134,14 +134,14 @@ int next_signal(void) r = read(signal_pipe[0], &s, sizeof(s)); if (r == sizeof(s)) { - DSS_DEBUG_LOG(("next signal: %d\n", s)); + DSS_DEBUG_LOG("next signal: %d\n", s); return s; } err = errno; assert(r < 0); if (err == EAGAIN) return 0; - DSS_ERROR_LOG(("failed to read from signal pipe\n")); + DSS_ERROR_LOG("failed to read from signal pipe\n"); return -ERRNO_TO_DSS_ERROR(err); } |
