From 7e287f591380d57626dc50bb2617fb0f6afe4dac Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 13 Feb 2021 21:52:15 +0100 Subject: [PATCH] Create log file if it does not exist already. --- src/rinetd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rinetd.c b/src/rinetd.c index cbe1bff..e613823 100644 --- a/src/rinetd.c +++ b/src/rinetd.c @@ -1,6 +1,6 @@ /* Copyright © 1997—1999 Thomas Boutell and Boutell.Com, Inc. - © 2003—2019 Sam Hocevar + © 2003—2021 Sam Hocevar This software is released for free use under the terms of the GNU Public License, version 2 or higher. NO WARRANTY @@ -238,7 +238,7 @@ static void readConfiguration(char const *file) { logFile = NULL; } if (logFileName) { - logFile = fopen(logFileName, "a"); + logFile = fopen(logFileName, "a+"); if (logFile) { setvbuf(logFile, NULL, _IONBF, 0); } else {