Files
FEX-Emu--FEX/Source/Common/RootFSSetup.h
T
Ryan Houdek 4ccd68af8a FEXMountDaemon: Fixes shutdown race conditions
This solves a problem where sometimes FEX would spin up a new process
while FEXMountDaemon was in the process of shutting down. Breaking
things on both sides.

Now the race conditions are squashed that I could see.

Also fixes one race where FEX is starting up and FEXMountDaemon is
spinning up. This case is where FEX managed to pull the lock file just
before it got deleted. Then sent the FEXMountDaemon a request to be
observed. With DGRAM sockets we would fire and forget. Use a STREAM with
a ack result so we know we can return.
2021-09-07 19:30:38 -07:00

18 lines
667 B
C++

#pragma once
#include <string>
namespace FEX::RootFS {
// Updates the RootFS path in the case of squashfs
// Doesn't mount the rootfs if it doesn't exist
// Returns true if the rootfs is accessible regularly, mounted or folder
bool UpdateRootFSPath();
// Returns where the rootfs lock file lives even if the squashfs isn't mounted
std::string GetRootFSLockFile();
// Returns the socket file for a mount path
std::string GetRootFSSocketFile(std::string const &MountPath);
// Checks if the rootfs lock exists
bool CheckLockExists(std::string const &LockPath, std::string *MountPath = nullptr);
bool Setup(char **const envp);
void Shutdown();
}