1 #ifndef WIBBLE_SYS_PROCESS_H
2 #define WIBBLE_SYS_PROCESS_H
27 #include <sys/types.h>
39 std::string formatStatus(
int status);
42 void chdir(
const std::string& dir);
45 void chroot(
const std::string& dir);
48 mode_t umask(mode_t mask);
51 void setPerms(
const std::string& user);
52 void setPerms(
const std::string& user,
const std::string& group);
53 void setPerms(uid_t user);
54 void setPerms(uid_t user, gid_t group);
58 int getCPUTimeLimit(
int* max = 0);
59 int getFileSizeLimit(
int* max = 0);
60 int getDataMemoryLimit(
int* max = 0);
61 int getChildrenLimit(
int* max = 0);
62 int getOpenFilesLimit(
int* max = 0);
63 int getCoreSizeLimit(
int* max = 0);
66 void setCPUTimeLimit(
int value);
67 void setFileSizeLimit(
int value);
68 void setDataMemoryLimit(
int value);
69 void setChildrenLimit(
int value);
70 void setOpenFilesLimit(
int value);
71 void setCoreSizeLimit(
int value);
82 void initproctitle(
int argc,
char **argv);
90 void setproctitle(
const std::string& title);
std::string getcwd()
Get the absolute path of the current working directory.