This commit is contained in:
nullifiedcat 2017-12-19 23:58:58 +03:00
parent 4eaa9080e6
commit b5d67b257e
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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, ...)