#include <wibble/sys/process.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <signal.h>
#include <stdio.h>
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
#include <errno.h>
#include <cstdlib>
#include <sstream>
Namespaces | |
namespace | wibble |
namespace | wibble::sys |
namespace | wibble::sys::process |
Functions | |
void | wibble::sys::process::detachFromTTY () |
Close stdin, stdout and stderr and detach from the tty. | |
string | wibble::sys::process::formatStatus (int status) |
Pretty-print the return value of a process into a string. | |
void | wibble::sys::process::chdir (const string &dir) |
std::string | wibble::sys::process::getcwd () |
Get the absolute path of the current working directory. | |
void | wibble::sys::process::chroot (const string &dir) |
mode_t | wibble::sys::process::umask (mode_t mask) |
Change umask (always succeeds and returns the previous umask). | |
struct passwd * | wibble::sys::process::getUserInfo (const string &user) |
struct group * | wibble::sys::process::getGroupInfo (const string &group) |
void | wibble::sys::process::initGroups (const string &name, gid_t gid) |
void | wibble::sys::process::setPerms (const string &user) |
void | wibble::sys::process::setPerms (const string &user, const string &group) |
void | wibble::sys::process::setPerms (uid_t user) |
void | wibble::sys::process::setPerms (uid_t user, gid_t group) |
void | wibble::sys::process::setLimit (__rlimit_resource_t rlim, int val) |
int | wibble::sys::process::getLimit (__rlimit_resource_t rlim, int *max=0) |
int | wibble::sys::process::getCPUTimeLimit (int *max=0) |
Get current resource limits; store also maximum resource limits in max if nonzero. | |
int | wibble::sys::process::getFileSizeLimit (int *max) |
int | wibble::sys::process::getDataMemoryLimit (int *max) |
int | wibble::sys::process::getCoreSizeLimit (int *max) |
int | wibble::sys::process::getChildrenLimit (int *max) |
int | wibble::sys::process::getOpenFilesLimit (int *max) |
void | wibble::sys::process::setCPUTimeLimit (int value) |
Set resource limits. | |
void | wibble::sys::process::setFileSizeLimit (int value) |
void | wibble::sys::process::setDataMemoryLimit (int value) |
void | wibble::sys::process::setCoreSizeLimit (int value) |
void | wibble::sys::process::setChildrenLimit (int value) |
void | wibble::sys::process::setOpenFilesLimit (int value) |