mirror of
https://github.com/samhocevar/rinetd.git
synced 2025-03-22 15:50:08 +08:00
Create log file if it does not exist already.
This commit is contained in:
parent
2f8fd87518
commit
7e287f5913
@ -1,6 +1,6 @@
|
|||||||
/* Copyright © 1997—1999 Thomas Boutell <boutell@boutell.com>
|
/* Copyright © 1997—1999 Thomas Boutell <boutell@boutell.com>
|
||||||
and Boutell.Com, Inc.
|
and Boutell.Com, Inc.
|
||||||
© 2003—2019 Sam Hocevar <sam@hocevar.net>
|
© 2003—2021 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
This software is released for free use under the terms of
|
This software is released for free use under the terms of
|
||||||
the GNU Public License, version 2 or higher. NO WARRANTY
|
the GNU Public License, version 2 or higher. NO WARRANTY
|
||||||
@ -238,7 +238,7 @@ static void readConfiguration(char const *file) {
|
|||||||
logFile = NULL;
|
logFile = NULL;
|
||||||
}
|
}
|
||||||
if (logFileName) {
|
if (logFileName) {
|
||||||
logFile = fopen(logFileName, "a");
|
logFile = fopen(logFileName, "a+");
|
||||||
if (logFile) {
|
if (logFile) {
|
||||||
setvbuf(logFile, NULL, _IONBF, 0);
|
setvbuf(logFile, NULL, _IONBF, 0);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user