Merge branch 'stuck' into duke

This commit is contained in:
Jonathan "Duke" Leto
2019-05-15 09:32:43 -07:00
2 changed files with 10 additions and 0 deletions

View File

@@ -746,8 +746,12 @@ void CreatePidFile(const boost::filesystem::path &path, pid_t pid)
FILE* file = fopen(path.string().c_str(), "w");
if (file)
{
fprintf(stderr,"Creating pid file %s\n", path.string().c_str());
fprintf(file, "%d\n", pid);
fclose(file);
} else {
fprintf(stderr,"Unable to make a pidfile %s !\n", path.string().c_str());
exit(1);
}
}
#endif
@@ -878,6 +882,7 @@ void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) {
void ShrinkDebugFile()
{
fprintf(stderr,"Shrinking %s\n", GetDataDir().c_str() );
// Scroll debug.log if it's getting too big
boost::filesystem::path pathLog = GetDataDir() / "debug.log";
FILE* file = fopen(pathLog.string().c_str(), "r");