summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-05 10:43:26 -0700
committerScott Gasch <[email protected]>2026-10-05 10:43:26 -0700
commite5c845d7e0b936641158909dbc516a79958c74e8 (patch)
treeeaa8113b67d21ecea04a2dbae860c7fe0e3b10cd /src/main.c
parent64b5d3307a7a95975f7f8c0248f3f1febedd8617 (diff)
Update makefile and logfile to work with linux.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index f96ba4a..ecc9430 100644
--- a/src/main.c
+++ b/src/main.c
@@ -21,6 +21,7 @@ Revision History:
**/
#include "chess.h"
+#include <errno.h>
FILE *g_pfLogfile = NULL;
GAME_OPTIONS g_Options;
@@ -157,12 +158,10 @@ Return value:
g_pfLogfile = fopen(g_Options.szLogfile, "wb+");
if (NULL == g_pfLogfile) {
- UtilPanic(INITIALIZATION_FAILURE,
- (void *)"Can't open logfile",
- (void *)&(g_Options.szLogfile),
- (void *)"write",
- NULL,
- __FILE__, __LINE__);
+ Trace("WARNING: Can't open logfile %s for write (%s); "
+ "continuing without logging.\n",
+ g_Options.szLogfile, strerror(errno));
+ return(FALSE);
}
return(TRUE);
}