SamRewritten/common/c_processes.cpp
2018-02-16 22:27:42 +01:00

17 lines
276 B
C++

#include "c_processes.h"
pid_t create_process()
{
pid_t pid;
do {
pid = fork();
} while ((pid == -1) && (errno == EAGAIN));
return pid;
}
bool file_exists(const std::string& name) {
struct stat buffer;
return (stat (name.c_str(), &buffer) == 0);
}