mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-07 23:00:19 +02:00
This was a requested feature. To make sure that FEXServer is running and managed by a parent process, we need to have a way to tell FEXServer to keep alive without any FEX clients. The best way to do this is to pass FEXServer a Pipe (like FEX does when a client starts it), but instead of FEXServer signaling to FEXInterpreter that it's ready. FEXServer listens to the pipe to see if the management process is still alive. The expectation here is that the management process passes FEXServer the read end of a pipe, and when the management software is done (or gets killed by the kernel!) then the write end of the pipe is closed, and FEXServer naturally closes (As long as there's no FEX processes remaining).
13 lines
323 B
C++
13 lines
323 B
C++
// SPDX-License-Identifier: MIT
|
|
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace ProcessPipe {
|
|
bool InitializeServerPipe();
|
|
bool InitializeServerSocket(bool abstract);
|
|
void WaitForRequests();
|
|
void SetConfiguration(bool Foreground, uint32_t PersistentTimeout);
|
|
void Shutdown();
|
|
void SetWatchFD(int FD);
|
|
} // namespace ProcessPipe
|