1 #ifndef WIBBLE_SYS_PROCESS_H
2 #define WIBBLE_SYS_PROCESS_H
28 #include <sys/types.h>
35 std::string formatStatus(
int status);
38 void chdir(
const std::string& dir);
44 void chroot(
const std::string& dir);
47 mode_t umask(mode_t mask);
50 void setPerms(
const std::string& user);
51 void setPerms(
const std::string& user,
const std::string& group);
52 void setPerms(uid_t user);
53 void setPerms(uid_t user, gid_t group);
57 int getCPUTimeLimit(
int* max = 0);
58 int getFileSizeLimit(
int* max = 0);
59 int getDataMemoryLimit(
int* max = 0);
60 int getChildrenLimit(
int* max = 0);
61 int getOpenFilesLimit(
int* max = 0);
62 int getCoreSizeLimit(
int* max = 0);
65 void setCPUTimeLimit(
int value);
66 void setFileSizeLimit(
int value);
67 void setDataMemoryLimit(
int value);
68 void setChildrenLimit(
int value);
69 void setOpenFilesLimit(
int value);
70 void setCoreSizeLimit(
int value);
81 void initproctitle(
int argc,
char **argv);
89 void setproctitle(
const std::string& title);