As discussed at https://github.com/FirebirdSQL/firebird/pull/6937: > > But as well, we may just use process id instead of session id in > > the ConfigStorage::ConfigStorage creating filename. That would be > > even better, fitting better into our per-process temp dir policy. > I tend to agree with you here. It looks safe assuming LO uses > SuperServer only. Let's not replace the session id with process id, but instead append process id after session id, to avoid (unlikely?) accidental overlap of process id and session id, which would produce the same name as already used by, say, isql tool. Change-Id: Ibce8a8c75d405aae3e8949e7daf2476accdff22b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121457 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
19 lines
750 B
Groff
19 lines
750 B
Groff
diff --git a/src/jrd/trace/TraceConfigStorage.cpp b/src/jrd/trace/TraceConfigStorage.cpp
|
|
index 05fce3211ae7..d267713e85de 100644
|
|
--- a/src/jrd/trace/TraceConfigStorage.cpp
|
|
+++ b/src/jrd/trace/TraceConfigStorage.cpp
|
|
@@ -103,11 +103,11 @@ ConfigStorage::ConfigStorage()
|
|
pfnProcessIdToSessionId(GetCurrentProcessId(), &sesID) == 0 ||
|
|
sesID == 0)
|
|
{
|
|
- filename.printf(TRACE_FILE); // TODO: it must be per engine instance
|
|
+ filename.printf("%s.0.%u", TRACE_FILE, GetCurrentProcessId()); // TODO: it must be per engine instance
|
|
}
|
|
else
|
|
{
|
|
- filename.printf("%s.%u", TRACE_FILE, sesID);
|
|
+ filename.printf("%s.%u.%u", TRACE_FILE, sesID, GetCurrentProcessId());
|
|
}
|
|
#else
|
|
filename.printf(TRACE_FILE); // TODO: it must be per engine instance
|