mirror of
https://github.com/zebrajr/SamRewritten.git
synced 2025-12-06 12:19:51 +01:00
17 lines
276 B
C++
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);
|
|
} |