summaryrefslogtreecommitdiffstats
path: root/tools/pidfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-10-22 11:41:23 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-10-22 11:41:23 +0200
commit163acd9d9fd5e01975e99ad26af8a9c8097b3260 (patch)
treed5901dfca0f2e38ddcf8b973086343ab23a866a1 /tools/pidfile.c
parentbee73d2d93105b187171a1cc51ecf4125b39b65d (diff)
parent82d0b37dc86385cd239b03da1e57eaba88720589 (diff)
downloadrsyslog-163acd9d9fd5e01975e99ad26af8a9c8097b3260.tar.gz
rsyslog-163acd9d9fd5e01975e99ad26af8a9c8097b3260.tar.bz2
rsyslog-163acd9d9fd5e01975e99ad26af8a9c8097b3260.zip
Merge branch 'v6-beta' into v6-stable
Diffstat (limited to 'tools/pidfile.c')
-rw-r--r--tools/pidfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pidfile.c b/tools/pidfile.c
index e7744513..e9601232 100644
--- a/tools/pidfile.c
+++ b/tools/pidfile.c
@@ -125,7 +125,7 @@ int write_pid (char *pidfile)
char errStr[1024];
rs_strerror_r(errno, errStr, sizeof(errStr));
printf("Can't write pid , %s.\n", errStr);
- close(fd);
+ fclose(f);
return 0;
}
fflush(f);
@@ -135,11 +135,11 @@ int write_pid (char *pidfile)
char errStr[1024];
rs_strerror_r(errno, errStr, sizeof(errStr));
printf("Can't unlock pidfile %s, %s.\n", pidfile, errStr);
- close(fd);
+ fclose(f);
return 0;
}
#endif
- close(fd);
+ fclose(f);
return pid;
}