Files
LC 9575506391 FEXServer: Fix some missing declaration warnings
Makes sure prototypes are visible to their implementation. Also marks
functions internally linked where applicable.

Also makes it a little more visibly obvious which bits are exposed for
use elsewhere.
2026-07-16 07:10:32 -04:00

28 lines
529 B
C++

// SPDX-License-Identifier: MIT
#include "PipeScanner.h"
#include <dirent.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <vector>
namespace PipeScanner {
static std::vector<int> IncomingPipes {};
void SetWaitPipe(int FD) {
int flags = fcntl(FD, F_GETFD);
flags |= FD_CLOEXEC;
fcntl(FD, F_SETFD, flags);
IncomingPipes.emplace_back(FD);
}
void ClosePipes() {
for (auto pipe : IncomingPipes) {
close(pipe);
}
IncomingPipes.clear();
}
} // namespace PipeScanner