wibble::sys Namespace Reference

## Namespaces

| fs
| process
| sig
| v2

## Classes

class | Buffer
| Variable-size, reference-counted memory buffer. More...
class | ChildProcess
| Fork a child process. More...
class | Exec
| Execute external commands, either forked as a ChildProcess or directly using exec(). More...
class | ShellCommand
| Execute a shell command using /bin/sh -c. More...
struct | MMap
| Map a file into memory. More...
class | Mutex
| pthread mutex wrapper; WARNING: the class allows copying and assignment, but this is not always safe. More...
class | MutexLockT
| Acquire a mutex lock, RAII-style. More...
class | Condition
class | NetBuffer
| Buffer whose starting can be moved back and forth, useful to decapsulate stacked network packets. More...
struct | Pipe
struct | PipeThrough
class | Thread
| Encapsulates a thread. More...

## Typedefs

typedef MutexLockT< Mutex > | MutexLock

## Functions

std::ostream & | operator<< (std::ostream &o, const Buffer &b)
void | funlockfile (FILE *)
void | flockfile (FILE *)
void | mkpipe (int *fds, int *infd, int *outfd, const char *err)
void | renamefd (int _old, int _new, const char *err="...")
void | sleep (int secs)
| Portable version of sleep. More...
void | usleep (int usecs)
| Portable version of usleep. More...

## Typedef Documentation

## MutexLock

typedef MutexLockT< Mutex > wibble::sys::MutexLock

## Function Documentation

## flockfile()

void wibble::sys::flockfile | ( | FILE * |  | ) |

## funlockfile()

void wibble::sys::funlockfile | ( | FILE * |  | ) |

Referenced by wibble::sys::ChildProcess::setupParent().

## mkpipe()

void wibble::sys::mkpipe | ( | int * | fds,
|  | int * | infd,
|  | int * | outfd,
|  | const char * | err
| ) |  |

Referenced by wibble::sys::ChildProcess::setupRedirects().

## operator<<()

std::ostream & wibble::sys::operator<< | ( | std::ostream & | o,
|  | const Buffer & | b
| ) |  |

References wibble::sys::Buffer::print_preview().

## renamefd()

void wibble::sys::renamefd | ( | int | _old,
|  | int | _new,
|  | const char * | err = `"..."`
| ) |  |

Referenced by wibble::sys::ChildProcess::setupChild().

## sleep()

void wibble::sys::sleep | ( | int | secs | ) |

Portable version of sleep.

Referenced by EndlessChild::main(), and wibble::sys::Pipe::wait().

## usleep()

void wibble::sys::usleep | ( | int | usecs | ) |

Portable version of usleep.