Merge pull request #17076 from oneandonlydean/fix/lock-release-nid-no-patch
fix(libkernel): name the instance lock release export so the NID patcher leaves it alone
This commit is contained in:
4 files changed
+6
-6
No files matched your search
@@ -145,7 +145,7 @@ HostLaunch PrepareLaunch(const char* path, const char* const* arguments) {
|
||||
|
||||
void StartHostExecutable(HostLaunch& launch) {
|
||||
LogFileRelease_nid_no_patch();
|
||||
ReleaseHostInstanceLock();
|
||||
ReleaseHostInstanceLock_nid_no_patch();
|
||||
STARTUPINFOW startup{};
|
||||
startup.cb = sizeof(startup);
|
||||
PROCESS_INFORMATION process{};
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
#include <memory>
|
||||
|
||||
std::unique_ptr<IInstanceLockBackend> MakeHostInstanceLockBackend();
|
||||
void ReleaseHostInstanceLock();
|
||||
void ReleaseHostInstanceLock_nid_no_patch();
|
||||
|
||||
#endif
|
||||
@@ -40,6 +40,6 @@ const bool InstanceLockChecked = [] {
|
||||
|
||||
}
|
||||
|
||||
void ReleaseHostInstanceLock() {
|
||||
void ReleaseHostInstanceLock_nid_no_patch() {
|
||||
HeldBackend().reset();
|
||||
}
|
||||
@@ -19,8 +19,8 @@ static void CheckHeldAndReleased() {
|
||||
auto other = MakeHostInstanceLockBackend();
|
||||
Require(std::filesystem::exists(LockFile()), "start-up must have created the lock file");
|
||||
Require(!other->TryLock(LockFile()), "start-up must hold the lock for the whole process");
|
||||
ReleaseHostInstanceLock();
|
||||
Require(other->TryLock(LockFile()), "ReleaseHostInstanceLock must free the lock");
|
||||
ReleaseHostInstanceLock_nid_no_patch();
|
||||
Require(other->TryLock(LockFile()), "ReleaseHostInstanceLock_nid_no_patch must free the lock");
|
||||
}
|
||||
|
||||
static void CheckNothingCreated() {
|
||||
@@ -68,7 +68,7 @@ static void CheckSecondInstance(const std::string& executable) {
|
||||
Require(message.find(std::filesystem::current_path().string()) != std::string::npos, "the error must name the directory: " + message);
|
||||
Require(message.find(LockFile().string()) != std::string::npos, "the error must name the lock file: " + message);
|
||||
Require(message.find("ANYPS5_INSTANCE_LOCK=off") != std::string::npos, "the error must name the variable: " + message);
|
||||
ReleaseHostInstanceLock();
|
||||
ReleaseHostInstanceLock_nid_no_patch();
|
||||
Require(RunChild(executable, "on", errors) == 0, "a copy must start once the holder released the lock: " + Read(errors));
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user