summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-31 18:24:36 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-05-31 18:24:36 +0000
commite340b3371ba4e9301427273830d9b2964ec53237 (patch)
tree31a80b60c7d7e8c675e18f76d13d7d9b8c3f1848
parent65d8f175b405b17b7c5c50f1880d4dbdeaa56ba7 (diff)
downloadtinyproxy-e340b3371ba4e9301427273830d9b2964ec53237.tar.gz
tinyproxy-e340b3371ba4e9301427273830d9b2964ec53237.zip
The log file is now opened in "append" mode so that you can restart tinyproxy without losing the log file.
-rw-r--r--src/tinyproxy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tinyproxy.c b/src/tinyproxy.c
index 9ade504..7c3cdee 100644
--- a/src/tinyproxy.c
+++ b/src/tinyproxy.c
@@ -1,4 +1,4 @@
-/* $Id: tinyproxy.c,v 1.34 2002-05-27 01:58:41 rjkaes Exp $
+/* $Id: tinyproxy.c,v 1.35 2002-05-31 18:24:36 rjkaes Exp $
*
* The initialize routine. Basically sets up all the initial stuff (logfile,
* listening socket, config options, etc.) and then sits there and loops
@@ -230,7 +230,7 @@ main(int argc, char **argv)
exit(EX_SOFTWARE);
}
- log_file_fd = create_file_safely(config.logf_name);
+ log_file_fd = create_file_safely(config.logf_name, FALSE);
if (log_file_fd < 0) {
fprintf(stderr,
"Could not safely create logfile \"%s\".\n",
@@ -238,7 +238,7 @@ main(int argc, char **argv)
exit(EX_CANTCREAT);
}
- config.logf = fdopen(log_file_fd, "w");
+ config.logf = fdopen(log_file_fd, "w+");
if (!config.logf) {
fprintf(stderr, "Could not write to log file \"%s\".\n",
config.logf_name);