aboutsummaryrefslogtreecommitdiffstats
path: root/src/dmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dmon.c')
-rw-r--r--src/dmon.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dmon.c b/src/dmon.c
index 6a24739..be1fda7 100644
--- a/src/dmon.c
+++ b/src/dmon.c
@@ -49,7 +49,7 @@
#define DMON_LOG(...) do { \
if (dmon.log) \
- (void)io_fprintln (path_dmon_log, __VA_ARGS__); \
+ io_fprintln (path_dmon_log, __VA_ARGS__); \
} while (0)
#define DMON_ABRT(...) do { \
@@ -131,15 +131,15 @@ daemonize (int status)
/* Redirect standard file descriptors to /dev/null. */
if ((fd = open (_PATH_DEVNULL, O_RDWR, 0)) != -1)
{
- (void)dup2 (fd, STDIN_FILENO);
- (void)dup2 (fd, STDOUT_FILENO);
- (void)dup2 (fd, STDERR_FILENO);
+ dup2 (fd, STDIN_FILENO);
+ dup2 (fd, STDOUT_FILENO);
+ dup2 (fd, STDERR_FILENO);
if (fd > 2)
- (void)close (fd);
+ close (fd);
}
/* Write access for the owner only. */
- (void)umask (0022);
+ umask (0022);
if (!sigs_set_hdlr (SIGINT, dmon_sigs_hdlr)
|| !sigs_set_hdlr (SIGTERM, dmon_sigs_hdlr)
@@ -165,7 +165,7 @@ dmon_start (int parent_exit_status)
if (!io_file_exist (path_conf))
DMON_ABRT (_("Could not access \"%s\": %s\n"),
path_conf, strerror (errno));
- custom_load_conf (&conf, 0);
+ custom_load_conf (&conf);
if (!io_file_exist (path_apts))
DMON_ABRT (_("Could not access \"%s\": %s\n"),
@@ -194,8 +194,9 @@ dmon_start (int parent_exit_status)
DMON_LOG (_("error while sending notification\n"));
}
- DMON_LOG (_("sleeping at %s for %d seconds\n"), nowstr (),
- DMON_SLEEP_TIME);
+ DMON_LOG (ngettext ("sleeping at %s for %d second\n",
+ "sleeping at %s for %d seconds\n",
+ DMON_SLEEP_TIME), nowstr (), DMON_SLEEP_TIME);
psleep (DMON_SLEEP_TIME);
DMON_LOG (_("awakened at %s\n"), nowstr ());
}