Nebula
Loading...
Searching...
No Matches
posixprocess.cc File Reference
#include "foundation/stdneb.h"
#include "ids/idpool.h"
#include "system/process.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#include <sys/wait.h>
#include <unistd.h>

Classes

struct  Posix::PosixProcess

Namespaces

namespace  Posix
 Posix implemention of a read-many write-few lock.
namespace  System

Functions

bool Posix::SetNonBlocking (int fd)
 Set a pipe read end to nonblocking so polling process output never stalls.
void Posix::ClosePipe (int &fd)
void Posix::ReportLaunchFailure (int fd)
 Report a child-side launch failure to the parent.
void Posix::UpdateStream (int fd, const Ptr< IO::Stream > &stream)
 Read all currently available data from a capture pipe.
void Posix::UpdateStreams (PosixProcess &process)
void Posix::CloseStreams (PosixProcess &process)
bool Posix::ValidProcessId (System::ProcessId processId)
System::ProcessId Posix::Launch (PosixProcess process)
ProcessId System::StartProcess (const ProcessStartInfo &createInfo)
 Create a process.
void System::UpdateProcessStreams (ProcessId processId)
 Update streams.
bool System::IsProcessRunning (ProcessId processId)
 Returns true if process is running (poll).
uint System::WaitForProcess (ProcessId processId)
 Wait for process, then frees it and returns the error code.

Variables

static Ids::IdPool Posix::idPool
static Util::Array< PosixProcessPosix::processes