ui-utilcpp 1.10.3
Data Structures | Namespaces
Sys.hpp File Reference
#include <cstdio>
#include <ctime>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/file.h>
#include <pwd.h>
#include <grp.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <netdb.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <iconv.h>
#include <ui-utilcpp/Exception.hpp>
Include dependency graph for Sys.hpp:
This graph shows which files directly or indirectly include this file:

Data Structures

class  UI::Util::Sys::Exception
 Use this exception class if you want to catch failures on system/library calls. More...
 

Namespaces

namespace  UI
 Namespace for any Schlund+Partner C++ code.
 
namespace  UI::Util
 Namespace for ui-utilcpp.
 
namespace  UI::Util::Sys
 Namespace for system/library calls.
 

Functions

Drop-in replacements for system(2) and library(3) calls w/ exception handling on errors.
voidUI::Util::Sys::calloc (size_t nmemb, size_t size)
 
voidUI::Util::Sys::malloc (size_t size)
 
void UI::Util::Sys::free (void *ptr)
 
int UI::Util::Sys::system (char const *s)
 
charUI::Util::Sys::getenv (char const *name)
 
void UI::Util::Sys::realpath (char const *path, char *resolved_path)
 
FILEUI::Util::Sys::fopen (char const *path, char const *mode)
 
FILEUI::Util::Sys::fdopen (int fildes, char const *mode)
 
FILEUI::Util::Sys::freopen (char const *path, char const *mode, FILE *stream)
 
void UI::Util::Sys::fclose (FILE *fp)
 
mode_t UI::Util::Sys::umask (mode_t mask)
 
void UI::Util::Sys::chdir (char const *path)
 
void UI::Util::Sys::chown (char const *path, uid_t owner, gid_t group)
 
void UI::Util::Sys::chmod (char const *path, mode_t mode)
 
void UI::Util::Sys::stat (char const *file_name, struct stat *buf)
 
void UI::Util::Sys::fstat (int filedes, struct stat *buf)
 
void UI::Util::Sys::lstat (char const *file_name, struct stat *buf)
 
void UI::Util::Sys::statvfs (char const *path, struct statvfs *buf)
 
void UI::Util::Sys::unlink (char const *pathname)
 
void UI::Util::Sys::remove (char const *pathname)
 
void UI::Util::Sys::rename (char const *oldpath, char const *newpath)
 
int UI::Util::Sys::open (char const *pathname, int flags)
 
int UI::Util::Sys::open (char const *pathname, int flags, mode_t mode)
 
void UI::Util::Sys::close (int fd)
 
void UI::Util::Sys::mkdir (char const *pathname, mode_t mode)
 
void UI::Util::Sys::rmdir (char const *pathname)
 
ssize_t UI::Util::Sys::write (int fd, void const *buf, size_t count)
 
ssize_t UI::Util::Sys::read (int fd, void *buf, size_t count)
 
int UI::Util::Sys::dup (int oldfd)
 
int UI::Util::Sys::dup2 (int oldfd, int newfd)
 
int UI::Util::Sys::fcntl (int fd, int cmd, long arg)
 
int UI::Util::Sys::fcntl (int fd, int cmd, struct flock *lock)
 
int UI::Util::Sys::flock (int fd, int operation)
 
struct passwdUI::Util::Sys::getpwnam (char const *name)
 
struct groupUI::Util::Sys::getgrnam (char const *name)
 
pid_t UI::Util::Sys::fork (void)
 
pid_t UI::Util::Sys::getpid ()
 
pid_t UI::Util::Sys::gettid ()
 
pid_t UI::Util::Sys::getppid ()
 
pid_t UI::Util::Sys::getpgid (pid_t pid)
 
pid_t UI::Util::Sys::waitpid (pid_t pid, int *status, int options)
 
pid_t UI::Util::Sys::setsid ()
 
uid_t UI::Util::Sys::getuid ()
 
gid_t UI::Util::Sys::getgid ()
 
uid_t UI::Util::Sys::geteuid ()
 
gid_t UI::Util::Sys::getegid ()
 
void UI::Util::Sys::seteuid (uid_t euid)
 
void UI::Util::Sys::setegid (gid_t egid)
 
void UI::Util::Sys::setuid (uid_t uid)
 
void UI::Util::Sys::setgid (gid_t gid)
 
uid_t UI::Util::Sys::getfsuid (pid_t const pid)
 
gid_t UI::Util::Sys::getfsgid (pid_t const pid)
 
void UI::Util::Sys::setfsuid (uid_t fsuid)
 
void UI::Util::Sys::setfsgid (gid_t fsgid)
 
void UI::Util::Sys::getrlimit (int resource, struct rlimit *rlim)
 
void UI::Util::Sys::getrusage (int who, struct rusage *usage)
 
void UI::Util::Sys::setrlimit (int resource, struct rlimit const *rlim)
 
unsigned int UI::Util::Sys::sleep (unsigned int seconds)
 
int UI::Util::Sys::socket (int domain, int type, int protocol)
 
void UI::Util::Sys::getaddrinfo (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
 
void UI::Util::Sys::getnameinfo (const struct sockaddr *sa, socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags)
 
std::string UI::Util::Sys::getnameinfo (const struct sockaddr *sa, socklen_t salen)
 
void UI::Util::Sys::getpeername (int s, struct sockaddr *name, socklen_t *namelen)
 
void UI::Util::Sys::getsockname (int s, struct sockaddr *name, socklen_t *namelen)
 
void UI::Util::Sys::setsockopt (int s, int level, int optname, void const *optval, socklen_t optlen)
 
void UI::Util::Sys::setsockopt_to (int s, int level, int optname, struct timeval const &tv)
 
ssize_t UI::Util::Sys::recv (int s, void *buf, size_t len, int flags)
 
ssize_t UI::Util::Sys::send (int s, void const *buf, size_t len, int flags)
 
void UI::Util::Sys::listen (int s, int backlog)
 
void UI::Util::Sys::bind (int sockfd, struct sockaddr *my_addr, socklen_t addrlen)
 
void UI::Util::Sys::connect (int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen)
 
int UI::Util::Sys::select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
 
void UI::Util::Sys::socketpair (int d, int type, int protocol, int sv[2])
 
void UI::Util::Sys::gettimeofday (struct timeval *tv, struct timezone *tz)
 
void UI::Util::Sys::settimeofday (struct timeval const *tv, struct timezone const *tz)
 
iconv_t UI::Util::Sys::iconv_open (char const *tocode, char const *fromcode)
 
void UI::Util::Sys::iconv_close (iconv_t cd)
 
void UI::Util::Sys::quotactl (int cmd, char const *special, int id, caddr_t addr)
 
size_t UI::Util::Sys::confstr (int name, char *buf, size_t len)
 
std::string UI::Util::Sys::getconf (int id)
 Loosely like the shell utility "getconf".