aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 01a24a9..13d9818 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2,6 +2,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
+#include <string.h>
char *progname;
@@ -174,7 +175,6 @@ main(int argc, char **argv)
pidfile_check(pid_file);
if (!foreground) {
- int i;
if (daemon(0, 1)) {
fprintf(stderr, "%s: daemon: %s\n",
progname, strerror(errno));
@@ -230,7 +230,6 @@ pidfile_create(char const *pid_file)
if (!fp) {
snmp_log(LOG_CRIT,
"cannot create pidfile `%s': %s\n",
- progname,
pid_file,
strerror(errno));
exit(1);
@@ -255,7 +254,7 @@ pidfile_check(char const *pid_file)
if (fp) {
if (fscanf(fp, "%lu", &pid) != 1) {
snmp_log(LOG_ERR,
- "cannot get pid from pidfile `%s'\n",
+ "cannot get pid from pidfile `%s': %s\n",
pid_file,
strerror(errno));
} else {

Return to:

Send suggestions and report system problems to the System administrator.