mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-07 01:00:17 +02:00
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.
28 lines
529 B
C++
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
|