diff --git a/src/hack.cpp b/src/hack.cpp index eb2782d2..9723bb50 100644 --- a/src/hack.cpp +++ b/src/hack.cpp @@ -155,13 +155,13 @@ void hack::Initialize() { signal(SIGPIPE, SIG_IGN); time_injected = time(nullptr); - passwd *pwd = getpwuid(getuid()); + /*passwd *pwd = getpwuid(getuid()); char *logname = strfmt("/tmp/cathook-game-stdout-%s-%u.log", pwd->pw_name, time_injected); freopen(logname, "w", stdout); free(logname); logname = strfmt("/tmp/cathook-game-stderr-%s-%u.log", pwd->pw_name, time_injected); freopen(logname, "w", stderr); - free(logname); + free(logname);*/ // Essential files must always exist, except when the game is running in text // mode. #if ENABLE_VISUALS == 1 diff --git a/src/logging.cpp b/src/logging.cpp index 407a183b..06d902ba 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -18,7 +18,7 @@ void logging::Initialize() { // FIXME other method of naming the file? passwd *pwd = getpwuid(getuid()); - logging::handle = fopen(strfmt("/tmp/cathook-%s.log", pwd->pw_name), "w"); + logging::handle = fopen(strfmt("/tmp/cathook-%s-%d.log", pwd->pw_name, getpid()), "w"); } void logging::Info(const char *fmt, ...)