summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0bf04eb)
raw | patch | inline | side by side (parent: 0bf04eb)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 28 Sep 2008 19:09:34 +0000 (19:09 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 28 Sep 2008 19:09:34 +0000 (19:09 +0000) |
have STDERR open. If it cannot be created, it complains verbosely to
stderr.
The PID file is written in the child process. The only way the fdopen()
will fail on a fd that is already open is if you're completely out of
memory. As in other places in the code, I didn't consider this a case
that required a very verbose message. (Search for "strdup failed"). If
you still think a more verbose message is called for, please suggest one.
The attached patch corrects the error message to complain about fdopen()
vs fopen(). I hadn't noticed that until you brought it up.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1532 a5681a0c-68f1-0310-ab6d-d61299d08faa
stderr.
The PID file is written in the child process. The only way the fdopen()
will fail on a fd that is already open is if you're completely out of
memory. As in other places in the code, I didn't consider this a case
that required a very verbose message. (Search for "strdup failed"). If
you still think a more verbose message is called for, please suggest one.
The attached patch corrects the error message to complain about fdopen()
vs fopen(). I hadn't noticed that until you brought it up.
-- kevin brintnall
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1532 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_daemon.c | patch | blob | history |
diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index d30893ed98e779e2215e5da0433c9056c1702063..18b7143765935969a2467746ea473ab22a753a1d 100644 (file)
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
fh = fdopen (fd, "w");
if (fh == NULL)
{
- RRDD_LOG (LOG_ERR, "write_pidfile: fopen() failed.");
+ RRDD_LOG (LOG_ERR, "write_pidfile: fdopen() failed.");
close(fd);
return (-1);
}